astrobase

Python modules for light curve work and variable star astronomy

https://github.com/waqasbhatti/astrobase

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    5 of 12 committers (41.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

astronomy light-curves python variable-stars
Last synced: 6 months ago · JSON representation ·

Repository

Python modules for light curve work and variable star astronomy

Basic Info
  • Host: GitHub
  • Owner: waqasbhatti
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 44 MB
Statistics
  • Stars: 57
  • Watchers: 4
  • Forks: 12
  • Open Issues: 6
  • Releases: 23
Topics
astronomy light-curves python variable-stars
Created about 9 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

DOI Documentation Status

Astrobase is a Python package for analyzing light curves and finding variable stars. It includes implementations of several period-finding algorithms, batch work drivers for working on large collections of light curves, and a small web-app useful for reviewing and classifying light curves by stellar variability type.

Most functions in this package that deal with light curves usually require three Numpy ndarrays as input: times, mags, and errs, so they should work with any time-series data that can be represented in this form. If you have flux time series measurements, most functions also take a magsarefluxes keyword argument that makes them handle flux light curves correctly.

  • Read the docs: https://astrobase.readthedocs.io/en/latest/
  • Jupyter notebooks that demonstrate some of the functionality are available in the astrobase-notebooks repository.
  • A overview of the modules and subpackages is provided below.

Install astrobase from the Python Package Index (PyPI):

bash $ pip install numpy # needed to set up Fortran wrappers $ pip install astrobase

See the installation instructions below for details. This package requires Python >= 3.5 as of version 0.5.0. Use pip install astrobase<0.5.0 for older Python versions.

Python 3.6: Python
3.6 Python 3.7: Python
3.7 Python 3.8: Python 3.8 Python 3.9: Python 3.9

Contents

  • astrokep: contains functions for dealing with Kepler and K2 Mission light curves from STScI MAST (reading the FITS files, consolidating light curves for objects over quarters), and some basic operations (converting fluxes to mags, decorrelation of light curves, filtering light curves, and fitting object centroids for eclipse analysis, etc.)

  • astrotess: contains functions for dealing with TESS 2-minute cadence light curves from STScI MAST (reading the FITS files, consolidating light curves for objects over sectors), and some basic operations (converting fluxes to mags, filtering light curves, etc.)

  • checkplot: contains functions to make checkplots: a grid of plots used to quickly decide if a period search for a possibly variable object was successful. Checkplots come in two forms:

Python pickles: If you want to interactively browse through large numbers of checkplots (e.g., as part of a large variable star classification project), you can use the checkplotserver webapp that works on checkplot pickle files. This interface allows you to review all phased light curves from all period-finder methods applied, set and save variability tags, object type tags, best periods and epochs, and comments for each object using a browser-based UI (see below). The information entered can then be exported as CSV or JSON for the next stage of a variable star classification pipeline.

The lightcurves-and-checkplots Jupyter notebook outlines how to do this. A more detailed example using light curves of an arbitrary format is available in the lc-collection-work notebook, which shows how to add in support for a custom LC format, add neighbor, cross-match, and color-mag diagram info to checkplots, and visualize these with the checkplotserver.

Checkplot Server

PNG images: Alternatively, if you want to simply glance through lots of checkplots (e.g. for an initial look at a collection of light curves), there's a checkplot-viewer webapp available that operates on checkplot PNG images. The lightcurve-work Jupyter notebook goes through an example of generating these checkplot PNGs for light curves. See the checkplot-viewer.js file for more instructions and checkplot-viewer.png for a screenshot.

  • coordutils: functions for dealing with coordinates (conversions, distances, proper motion)

  • fakelcs: modules and functions to conduct an end-to-end variable star recovery simulation.

  • hatsurveys: modules to read, filter, and normalize light curves from various HAT surveys.

  • lcfit: functions for fitting light curve models to observations, including sinusoidal, trapezoidal and full Mandel-Agol planet transits, eclipses, and splines.

  • lcmath: functions for light curve operations such as phasing, normalization, binning (in time and phase), sigma-clipping, external parameter decorrelation (EPD), etc.

  • lcmodels: first order models for fast fitting (for the purposes of variable classification) to various periodic variable types, including sinusoidal variables, eclipsing binaries, transiting planets, and flares.

  • lcproc: driver functions for running an end-to-end pipeline including: (i) object selection from a collection of light curves by position, cross-matching to external catalogs, or light curve objectinfo keys, (ii) running variability feature calculation and detection, (iii) running period-finding, and (iv) object review using the checkplotserver webapp for variability classification.

  • periodbase: parallelized functions (using multiprocessing.map) to run fast period searches on light curves, including: the generalized Lomb-Scargle algorithm from Zechmeister & Kurster (2008; periodbase.zgls), the phase dispersion minimization algorithm from Stellingwerf (1978, 2011; periodbase.spdm), the AoV and AoV-multiharmonic algorithms from Schwarzenberg-Czerny (1989, 1996; periodbase.saov, periodbase.smav), the BLS algorithm from Kovacs et al. (2002; periodbase.kbls and periodbase.abls), the similar TLS algorithm from Hippke & Heller (2019; periodbase.htls), and the ACF period-finding algorithm from McQuillan et al. (2013a, 2014; periodbase.macf).

  • plotbase: functions to plot light curves, phased light curves, periodograms, and download Digitized Sky Survey cutouts from the NASA SkyView service.

  • services: modules and functions to query various astronomical catalogs and data services, including GAIA, SIMBAD, TRILEGAL, NASA SkyView, and 2MASS DUST.

  • timeutils: functions for converting from Julian dates to Baryocentric Julian dates, and precessing coordinates between equinoxes and due to proper motion; this will automatically download and save the JPL ephemerides de430.bsp from JPL upon first import.

  • varbase: functions for calculating auto-correlation features, masking and pre-whitening periodic signals in light curves, and planet transit specific tools.

  • varclass: functions for calculating various variability, stellar color and motion, and neighbor proximity features, along with a Random Forest based classifier.

Changelog

Please see https://github.com/waqasbhatti/astrobase/blob/master/CHANGELOG.md for a list of changes applicable to tagged release versions.

Installation

Requirements

This package requires the following other packages:

  • numpy
  • scipy
  • astropy
  • matplotlib
  • Pillow
  • jplephem
  • requests
  • tornado
  • pyeebls
  • tqdm
  • scikit-learn

For optional functionality, some additional packages are required:

  • for astrobase.lcdb to work, you'll need psycopg2-binary.
  • for lcfit.transits.mandelagol_fit_magseries, you'll need batman-package, emcee, corner, and h5py.
  • for lcproc.awsrun, you'll need paramiko, boto3, and awscli.
  • for periodbase.tls, you'll need transitleastsquares

Installing with pip

If you're using:

  • 64-bit Linux and Python 2.7, 3.4, 3.5, 3.6, 3.7
  • 64-bit Mac OSX 10.12+ with Python 2.7 or 3.6
  • 64-bit Windows with Python 2.7 and 3.6

You can simply install astrobase with:

```bash

(venv)$ pip install astrobase ```

Otherwise, you'll need to make sure that a Fortran compiler and numpy are installed beforehand to compile the pyeebls package that astrobase depends on:

```bash

you'll need a Fortran compiler.

on Linux: dnf/yum/apt install gcc gfortran

on OSX (using homebrew): brew install gcc && brew link gcc

make sure numpy is installed as well!

this is required for the pyeebls module installation

(venv)$ pip install numpy # in a virtualenv

or use dnf/yum/apt install numpy to install systemwide

```

Once that's done, install astrobase.

bash (venv)$ pip install astrobase

Other installation methods

Install all the optional dependencies as well:

bash (venv)$ pip install astrobase[all]

Install the latest version (may be unstable at times):

bash $ git clone https://github.com/waqasbhatti/astrobase $ cd astrobase $ python setup.py install $ # or use pip install . to install requirements automatically $ # or use pip install -e . to install in develop mode along with requirements $ # or use pip install -e .[all] to install in develop mode along with all requirements

License

astrobase is provided under the MIT License. See the LICENSE file for the full text.

Owner

  • Name: Waqas Bhatti
  • Login: waqasbhatti
  • Kind: user
  • Location: Toronto, Canada

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Bhatti
    given-names: Waqas
  - family-names: Bouma
    given-names: Luke G.
  - family-names: Wallace
    given-names: Joshua
title: "Astrobase"
license: MIT
doi: 10.5281/zenodo.1011188

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 2,371
  • Total Committers: 12
  • Avg Commits per committer: 197.583
  • Development Distribution Score (DDS): 0.472
Top Committers
Name Email Commits
Waqas Bhatti w****i@a****u 1,251
Waqas Bhatti w****i@g****m 999
lgbouma b****e@g****m 50
lgbouma l****a@m****u 47
lgbouma l****a@u****m 8
Joshua j****w@p****u 6
Joshua j****0@g****m 3
lcserver on phn5 l****r@p****5 2
mchris42 6****2@u****m 2
Adrian Price-Whelan a****w@g****m 1
Waqas Bhatti w****i@s****u 1
John Hoffman j****5@p****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 42
  • Total pull requests: 60
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 6
  • Total pull request authors: 6
  • Average comments per issue: 2.55
  • Average comments per pull request: 1.73
  • Merged pull requests: 55
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • joshuawallace (24)
  • waqasbhatti (9)
  • lgbouma (6)
  • segasai (1)
  • SauravMaheshkar (1)
Pull Request Authors
  • lgbouma (51)
  • joshuawallace (7)
  • mchris42 (1)
  • waqasbhatti (1)
  • johnh2o2 (1)
  • adrn (1)
Top Labels
Issue Labels
bug (16) enhancement (12)
Pull Request Labels
enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 425 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 5
  • Total versions: 62
  • Total maintainers: 1
pypi.org: astrobase

Python modules and scripts useful for variable star work in astronomy.

  • Versions: 62
  • Dependent Packages: 0
  • Dependent Repositories: 5
  • Downloads: 425 Last month
Rankings
Dependent repos count: 6.6%
Stargazers count: 9.5%
Average: 10.1%
Dependent packages count: 10.1%
Forks count: 10.2%
Downloads: 13.9%
Maintainers (1)
Last synced: 6 months ago

Dependencies

doc-requirements.txt pypi
  • Pillow *
  • astropy >=1.3
  • awscli *
  • boto3 *
  • futures *
  • google-api-python-client *
  • google-cloud-pubsub *
  • google-cloud-storage *
  • jplephem *
  • matplotlib *
  • numpy >=1.4.0
  • paramiko *
  • psycopg2-binary *
  • pyeebls *
  • requests >=2.20
  • scikit-learn *
  • scipy *
  • tornado *
  • tqdm *
requirements.txt pypi
  • Pillow *
  • astropy >=1.3
  • futures *
  • jplephem *
  • matplotlib *
  • numpy >=1.14.0
  • pyeebls >=0.1.6
  • requests >=2.20
  • scikit-learn *
  • scipy >0.17.0
  • tornado *
  • tqdm *
Dockerfile docker
  • python 3.6-slim-stretch build
setup.py pypi