Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Analysis script for sources with variability in their brightness

Project description


Analysis script for sources with variability in their brightness. The package was formerly called autovar but this clashes with an existing Python package.


It is strongly recommended you use python 3 and a virtual environment

Using the Anaconda distribution of Python:

conda create -n astrosource python=3
source activate astrosource

The package is available on PyPi and can be installed with pip.

pip install astrosource

Install development version

If you need to install the development branch, download from GitHub and from the root of the repo, run:

cd astrosource
pip install .

or directly with the setup script

cd astrosource
python install


There are a few input options when running the scripts. You can either run the whole analysis at once or the individual stages.

--ra [required parameter] Right Ascension of the target (in decimal)

--dec [required parameter] Declination of the target (in decimal)

--target-file [required parameter]

--indir [parameter] Path of directory containing LCO data files. If none is given, astrosource assumes the current directory

--format [parameter] input file format. If not fz, fits, or fit assumes the input files are photometry files with correct headers. If image files given, code will extra photometry from FITS extension. Defaults to fz.

--stars [boolean flag] Step 1: Identify and match stars from each data file

--comparison [boolean flag] Step 2: Identify non-varying stars to use for comparisons

--calc [boolean flag] Step 3: Calculate the brightness change of the target

--phot [boolean flag] Step 4: Photometry calculations for either differential or calibrated

--plot [boolean flag] Step 5: Produce lightcurve plots

--full [boolean flag] Run the whole code. This will run the following steps in this order stars > comparison > calc > phot > plot

Extra options

--detrend [boolean flag] Detrend exoplanet data

--eebls [boolean flag] EEBLS - box fitting to search for periodic transits

--calib [boolean flag] Perform calibrated

--imgreject [float] Image fraction rejection allowance. Defaults to 0.0. Increasing this will allow AstroSource to reject some of your data files if there are not enough comparison stars.

--clean [boolean flag] Remove all files except the original data files, and photometry files

Example Usage

astrosource --ra 154.9083708 --dec -9.8062778 --indir /path/to/your/data --full

All the files generated will be stored in the directory you specify in --indir


If you are developing this package, you will want to run the tests. You will need pytest installed and then, from the astrosource directory within this repo, run:


To suppress the warning messages use:

pytest --disable-pytest-warnings

You may also want to install this in developer mode

python develop


Written by Michael Fitzgerald and Edward Gomez

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for astrosource, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size astrosource-1.1.1-py3-none-any.whl (89.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size astrosource-1.1.1.tar.gz (29.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page