/lcurvemaker

Python code for working with light curves of variable stars

Primary LanguagePython

lcurvemaker

Python code for working with light curves of variable stars

en ru

Dependencies

Installation

pip install matplotlib pandas astropy requests

or

pip install -r requirements.txt

Usage

python plot_merged_phase_data.py [-v] [-l] [-s] [-c RA DEC] [-p PERIOD] [-e EPOCH] [-r MIN MAX] [-o] [-z] [-m] [-t PLOT] nickname [savedir]

Positional arguments

nickname is an alias of the object, optionally with the directory name. It is used to search for files and assign names to data processing products.

savedir set default directory for saving plots (optional).

The script will search for a settings file named nickname.json in the objects directory. It should not contain spaces.

Options

  • -h, --help show help message and exit
  • -v, --verbose be more verbose
  • -l, --lines draw lines on the light curve and phase plot to mark the epoch, maximum value, and max/min phase
  • -s, --show show interactive plots instead of saving figures
  • -c RA DEC, --coord RA DEC set the coordinates of the object in degrees
  • -p PERIOD, --period PERIOD set the period for phase plot in days
  • -e EPOCH, --epoch EPOCH set the epoch for phase plot in HJD
  • -r MIN MAX, --ztfran MIN MAX delete all ZTF data out of range
  • -o, --localps use local PS1 data instead of requesting it via the API
  • -z, --zoom use settings for zoomed plot
  • -m, --model draw a simple light curve model
  • -t, --plot what data to plot. Possible values are: zt ps as at cs ga og gd

Examples

python plot_merged_phase_data.py gusev4
python plot_merged_phase_data.py minkovskiy24 -l

Result:

To iterate over number of objects:

for nam in gusev4 minkovskiy17 minkovskiy24; do python plot_merged_phased_data.py $nam; done

for PowerShell:

ForEach ($nam in "gusev4", "minkovskiy17", "minkovskiy24") { python .\plot_merged_phased_data.py $nam }

Object settings files

The settings for the object are located in a JSON file. sample.json contains most of the possible settings.

Basic settings for an object with

{
"sample-nickname": {
  "name": "ZTF19acdncga",
  "other": "USNO-B1.0 1462-0437198, 2MASS J22470763+5617523, GSC2.3 N1CQ180004",
  "coord": "22 47 07.629 +56 17 52.26",
  "coordeg": [341.781789, 56.297849],
  "gdr3": 2003952476707473152,
  "epphot": false,
  "tic": 343765322,
  "max": 14.35,
  "min": 14.93,
  "min2": 14.78,
  "system": "g",
  "period": 24.8435,
  "epoch": 2460161.091,
  "2ndmin": 0.399,
  "d": 0.016,
  "d2": 0.019,
  "ztfran": [15.0, 14.2], "ztflim": 0.05,
  "atlasfnam": "sample-nickname-atlas.txt", "atlaslim": {"o": 0.013, "c": 0.017},
  "asasfnam": "sample-nickname-asas.csv", "asaslim": {"V": 0.05, "g": 0.06},
  "pslim": 0.1, "pslocal": false,
  "gaiadr3fnam": "sample-nickname-gdr3.dat",
  "crtsfnam": "sample-nickname-crts.csv", "crtslim": 0.06,
  "oglefnam": "sample-nickname-ogle.dat",
  "corotfnam": "cr1029-crt.dat",
  "sdssfnam": "sample-nickname-sdss.dat",
  "zcatf": "ri",
  "curveshift": true,
  "clrshift": {
    "g": 0.3, "psg": 0.32, "r": 0, "psr": 0.01, "i": -0.1, "psi": -0.1, "I": 0.1,
    "psz": -0.2, "psy": -0.3, "o": -0.05, "c": 0.1, "V": 0.3, "asasg": 0.7,
    "G": 0.05, "CV": -0.1, "gr": 0.02, "gi": -0.1
  },
  "plot": {
    "ztffilt": "gri", "psfilt": "grizy", "atlasfilt": "oc", "asasfilt": "gV", "gdsfilt": "r",
    "atlasms": {"o": 2.8, "c": 2.8}, "atlaselw": 0.26, "atledgclr": "darkred",
    "asasms": {"V": 3.5, "g": 3.5}, "asaselw": 0.26,
    "zms": 4, "gms": 4, "psms": 6, "crtsms": 5,
    "xmal": 500, "xmil": 100, "ymal": 0.1, "ymil": 0.01, "leg": "lower left",
    "xlim": [-0.5, 1.0], "xedges": 90, "xlima": [56963, 60331],
    "ylim": [14.7, 13.94], "ylima": [14.88, 13.8]
  }
}}

References for files in the data directory

Examples of light curves (presented in the VSX detail sheets)

Eclipsing binaries

Cataclysmic variables

Pulsating variables

Image optimization applied