{"id":47765229,"url":"https://github.com/waqasbhatti/astrobase","last_synced_at":"2026-04-03T06:13:36.546Z","repository":{"id":14778637,"uuid":"75150575","full_name":"waqasbhatti/astrobase","owner":"waqasbhatti","description":"Python modules for light curve work and variable star astronomy","archived":false,"fork":false,"pushed_at":"2024-07-15T18:31:35.000Z","size":46166,"stargazers_count":61,"open_issues_count":6,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-26T23:59:56.925Z","etag":null,"topics":["astronomy","light-curves","python","variable-stars"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waqasbhatti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-30T04:14:36.000Z","updated_at":"2025-12-01T08:38:00.000Z","dependencies_parsed_at":"2025-04-12T12:52:26.893Z","dependency_job_id":"762d76c7-2913-4a2f-9a26-68134956cd8e","html_url":"https://github.com/waqasbhatti/astrobase","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/waqasbhatti/astrobase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqasbhatti%2Fastrobase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqasbhatti%2Fastrobase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqasbhatti%2Fastrobase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqasbhatti%2Fastrobase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waqasbhatti","download_url":"https://codeload.github.com/waqasbhatti/astrobase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqasbhatti%2Fastrobase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31338526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T06:12:52.500Z","status":"ssl_error","status_checked_at":"2026-04-03T06:12:08.917Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astronomy","light-curves","python","variable-stars"],"created_at":"2026-04-03T06:13:34.831Z","updated_at":"2026-04-03T06:13:36.541Z","avatar_url":"https://github.com/waqasbhatti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/75150575.svg)](https://zenodo.org/badge/latestdoi/75150575) [![Documentation Status](https://readthedocs.org/projects/astrobase/badge/?version=latest)](https://astrobase.readthedocs.io/en/latest/?badge=latest)\n\nAstrobase is a Python package for analyzing light curves and finding variable\nstars. It includes implementations of several period-finding algorithms, batch\nwork drivers for working on large collections of light curves, and a small\nweb-app useful for reviewing and classifying light curves by stellar variability\ntype.\n\nMost functions in this package that deal with light curves usually require three\nNumpy ndarrays as input: `times`, `mags`, and `errs`, so they should work with\nany time-series data that can be represented in this form. If you have flux time\nseries measurements, most functions also take a `magsarefluxes` keyword argument\nthat makes them handle flux light curves correctly.\n\n- Read the docs: https://astrobase.readthedocs.io/en/latest/\n- Jupyter notebooks that demonstrate some of the functionality are available in\n  the [astrobase-notebooks](https://github.com/waqasbhatti/astrobase-notebooks)\n  repository.\n- A [overview](#contents) of the modules and subpackages is provided below.\n\nInstall **[astrobase](https://pypi.org/project/astrobase/)** from the\nPython Package Index (PyPI):\n\n```bash\n$ pip install numpy # needed to set up Fortran wrappers\n$ pip install astrobase\n```\n\nSee the [installation instructions](#installation) below for details. This\npackage requires Python \u003e= 3.5 as of version 0.5.0. Use `pip install\nastrobase\u003c0.5.0` for older Python versions.\n\nPython 3.6: [![Python\n3.6](https://ci.wbhatti.org/buildStatus/icon?job=astrobase-py3)](https://ci.wbhatti.org/job/astrobase-py3)\nPython 3.7: [![Python\n3.7](https://ci.wbhatti.org/buildStatus/icon?job=astrobase-py37)](https://ci.wbhatti.org/job/astrobase-py37)\nPython 3.8: [![Python 3.8](https://ci.wbhatti.org/buildStatus/icon?job=astrobase-py38)](https://ci.wbhatti.org/job/astrobase-py38)\nPython 3.9: [![Python 3.9](https://ci.wbhatti.org/buildStatus/icon?job=astrobase-py39)](https://ci.wbhatti.org/job/astrobase-py39)\n\n# Contents\n\n- **[astrokep](https://astrobase.readthedocs.io/en/latest/astrobase.astrokep.html)**:\n  contains functions for dealing with Kepler and K2 Mission light curves from\n  STScI MAST (reading the FITS files, consolidating light curves for objects\n  over quarters), and some basic operations (converting fluxes to mags,\n  decorrelation of light curves, filtering light curves, and fitting object\n  centroids for eclipse analysis, etc.)\n\n- **[astrotess](https://astrobase.readthedocs.io/en/latest/astrobase.astrotess.html)**:\n  contains functions for dealing with TESS 2-minute cadence light curves from\n  STScI MAST (reading the FITS files, consolidating light curves for objects\n  over sectors), and some basic operations (converting fluxes to mags, filtering\n  light curves, etc.)\n\n- **[checkplot](https://astrobase.readthedocs.io/en/latest/astrobase.checkplot.html)**:\n  contains functions to make checkplots: a grid of plots used to quickly decide\n  if a period search for a possibly variable object was successful. Checkplots\n  come in two forms:\n\n  Python pickles: If you want to interactively browse through large numbers of\n  checkplots (e.g., as part of a large variable star classification project),\n  you can use the `checkplotserver` webapp that works on checkplot pickle\n  files. This interface allows you to review all phased light curves from all\n  period-finder methods applied, set and save variability tags, object type\n  tags, best periods and epochs, and comments for each object using a\n  browser-based UI (see below). The information entered can then be exported as\n  CSV or JSON for the next stage of a variable star classification pipeline.\n\n  The\n  [lightcurves-and-checkplots](https://nbviewer.jupyter.org/github/waqasbhatti/astrobase-notebooks/blob/master/lightcurves-and-checkplots.ipynb)\n  Jupyter notebook outlines how to do this. A more detailed example using light\n  curves of an arbitrary format is available in the\n  [lc-collection-work](https://nbviewer.jupyter.org/github/waqasbhatti/astrobase-notebooks/blob/master/lc-collection-work.ipynb)\n  notebook, which shows how to add in support for a custom LC format, add\n  neighbor, cross-match, and color-mag diagram info to checkplots, and visualize\n  these with the checkplotserver.\n\n  ![Checkplot Server](https://raw.githubusercontent.com/waqasbhatti/astrobase/master/astrobase/data/checkplotserver.png)\n\n  PNG images: Alternatively, if you want to simply glance through lots of\n  checkplots (e.g. for an initial look at a collection of light curves), there's\n  a `checkplot-viewer` webapp available that operates on checkplot PNG\n  images. The\n  [lightcurve-work](https://nbviewer.jupyter.org/github/waqasbhatti/astrobase-notebooks/blob/master/lightcurve-work.ipynb)\n  Jupyter notebook goes through an example of generating these checkplot PNGs\n  for light curves. See the\n  [checkplot-viewer.js](https://github.com/waqasbhatti/astrobase/blob/master/astrobase/cpserver/checkplot-viewer.js) file for more\n  instructions and [checkplot-viewer.png](https://raw.githubusercontent.com/waqasbhatti/astrobase/master/astrobase/data/checkplot-viewer.png)\n  for a screenshot.\n\n- **[coordutils](https://astrobase.readthedocs.io/en/latest/astrobase.coordutils.html)**:\n  functions for dealing with coordinates (conversions, distances, proper motion)\n\n- **[fakelcs](https://astrobase.readthedocs.io/en/latest/astrobase.fakelcs.html)**:\n  modules and functions to conduct an end-to-end variable star recovery\n  simulation.\n\n- **[hatsurveys](https://astrobase.readthedocs.io/en/latest/astrobase.hatsurveys.html)**:\n  modules to read, filter, and normalize light curves from various HAT surveys.\n\n- **[lcfit](https://astrobase.readthedocs.io/en/latest/astrobase.lcfit.html)**:\n  functions for fitting light curve models to observations, including\n  sinusoidal, trapezoidal and full Mandel-Agol planet transits, eclipses, and\n  splines.\n\n- **[lcmath](https://astrobase.readthedocs.io/en/latest/astrobase.lcmath.html)**: functions for light curve operations such\n  as phasing, normalization, binning (in time and phase), sigma-clipping,\n  external parameter decorrelation (EPD), etc.\n\n- **[lcmodels](https://astrobase.readthedocs.io/en/latest/astrobase.lcmodels.html)**:\n  first order models for fast fitting (for the purposes of variable\n  classification) to various periodic variable types, including sinusoidal\n  variables, eclipsing binaries, transiting planets, and flares.\n\n- **[lcproc](https://astrobase.readthedocs.io/en/latest/astrobase.lcproc.html)**:\n    driver functions for running an end-to-end pipeline including: (i) object\n    selection from a collection of light curves by position, cross-matching to\n    external catalogs, or light curve objectinfo keys, (ii) running variability\n    feature calculation and detection, (iii) running period-finding, and (iv)\n    object review using the checkplotserver webapp for variability\n    classification.\n\n- **[periodbase](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.html)**: parallelized functions (using\n  `multiprocessing.map`) to run fast period searches on light curves, including:\n  the generalized Lomb-Scargle algorithm from Zechmeister \u0026 Kurster\n  ([2008](http://adsabs.harvard.edu/abs/2009A%26A...496..577Z);\n  **[periodbase.zgls](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.zgls.html)**), the phase dispersion\n  minimization algorithm from Stellingwerf\n  ([1978](http://adsabs.harvard.edu/abs/1978ApJ...224..953S),\n  [2011](http://adsabs.harvard.edu/abs/2011rrls.conf...47S);\n  **[periodbase.spdm](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.spdm.html)**), the AoV and\n  AoV-multiharmonic algorithms from Schwarzenberg-Czerny\n  ([1989](http://adsabs.harvard.edu/abs/1989MNRAS.241..153S),\n  [1996](http://adsabs.harvard.edu/abs/1996ApJ...460L.107S);\n  **[periodbase.saov](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.saov.html)**,\n  **[periodbase.smav](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.smav.html)**), the BLS algorithm from\n  Kovacs et al. ([2002](http://adsabs.harvard.edu/abs/2002A%26A...391..369K);\n  **[periodbase.kbls](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.kbls.html)**\n  and **[periodbase.abls](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.abls.html)**),\n  the similar TLS algorithm from Hippke \u0026 Heller\n  ([2019](https://ui.adsabs.harvard.edu/abs/2019A%26A...623A..39H/abstract);\n  **[periodbase.htls](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.htls.html)**),\n  and the ACF period-finding algorithm from McQuillan et al.\n  ([2013a](http://adsabs.harvard.edu/abs/2013MNRAS.432.1203M),\n  [2014](http://adsabs.harvard.edu/abs/2014ApJS..211...24M);\n  **[periodbase.macf](https://astrobase.readthedocs.io/en/latest/astrobase.periodbase.macf.html)**).\n\n- **[plotbase](https://astrobase.readthedocs.io/en/latest/astrobase.plotbase.html)**: functions to plot light curves, phased\n  light curves, periodograms, and download Digitized Sky Survey cutouts from the\n  NASA SkyView service.\n\n- **[services](https://astrobase.readthedocs.io/en/latest/astrobase.services.html)**: modules and functions to query various\n  astronomical catalogs and data services, including GAIA, SIMBAD, TRILEGAL,\n  NASA SkyView, and 2MASS DUST.\n\n- **[timeutils](https://astrobase.readthedocs.io/en/latest/astrobase.timeutils.html)**: functions for converting from\n  Julian dates to Baryocentric Julian dates, and precessing coordinates between\n  equinoxes and due to proper motion; this will automatically download and save\n  the JPL ephemerides **de430.bsp** from JPL upon first import.\n\n- **[varbase](https://astrobase.readthedocs.io/en/latest/astrobase.varbase.html)**:\n  functions for calculating auto-correlation features, masking and pre-whitening\n  periodic signals in light curves, and planet transit specific tools.\n\n- **[varclass](https://astrobase.readthedocs.io/en/latest/astrobase.varclass.html)**: functions for calculating various\n  variability, stellar color and motion, and neighbor proximity features, along\n  with a Random Forest based classifier.\n\n\n# Changelog\n\nPlease see https://github.com/waqasbhatti/astrobase/blob/master/CHANGELOG.md for\na list of changes applicable to tagged release versions.\n\n\n# Installation\n\n## Requirements\n\nThis package requires the following other packages:\n\n- numpy\n- scipy\n- astropy\n- matplotlib\n- Pillow\n- jplephem\n- requests\n- tornado\n- pyeebls\n- tqdm\n- scikit-learn\n\nFor optional functionality, some additional packages are required:\n\n- for `astrobase.lcdb` to work, you'll need `psycopg2-binary`.\n- for `lcfit.transits.mandelagol_fit_magseries`, you'll need `batman-package`,\n  `emcee`, `corner`, and `h5py`.\n- for `lcproc.awsrun`, you'll need `paramiko`, `boto3`, and `awscli`.\n- for `periodbase.tls`, you'll need `transitleastsquares`\n\n## Installing with pip\n\nIf you're using:\n\n- 64-bit Linux and Python 2.7, 3.4, 3.5, 3.6, 3.7\n- 64-bit Mac OSX 10.12+ with Python 2.7 or 3.6\n- 64-bit Windows with Python 2.7 and 3.6\n\nYou can simply install astrobase with:\n\n```bash\n\n(venv)$ pip install astrobase\n```\n\nOtherwise, you'll need to make sure that a Fortran compiler and numpy are\ninstalled beforehand to compile the pyeebls package that astrobase depends on:\n\n```bash\n## you'll need a Fortran compiler.                              ##\n## on Linux: dnf/yum/apt install gcc gfortran                   ##\n## on OSX (using homebrew): brew install gcc \u0026\u0026 brew link gcc   ##\n\n## make sure numpy is installed as well!                        ##\n## this is required for the pyeebls module installation         ##\n\n(venv)$ pip install numpy # in a virtualenv\n# or use dnf/yum/apt install numpy to install systemwide\n```\n\nOnce that's done, install astrobase.\n\n```bash\n(venv)$ pip install astrobase\n```\n\n### Other installation methods\n\nInstall all the optional dependencies as well:\n\n```bash\n(venv)$ pip install astrobase[all]\n```\n\nInstall the latest version (may be unstable at times):\n\n```bash\n$ git clone https://github.com/waqasbhatti/astrobase\n$ cd astrobase\n$ python setup.py install\n$ # or use pip install . to install requirements automatically\n$ # or use pip install -e . to install in develop mode along with requirements\n$ # or use pip install -e .[all] to install in develop mode along with all requirements\n```\n\n# License\n\n`astrobase` is provided under the MIT License. See the LICENSE file for the full\ntext.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaqasbhatti%2Fastrobase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaqasbhatti%2Fastrobase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaqasbhatti%2Fastrobase/lists"}