Python code for working with light curves of variable stars
pip install matplotlib pandas astropy requestsor
pip install -r requirements.txtpython 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]
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.
-h, --helpshow help message and exit-v, --verbosebe more verbose-l, --linesdraw lines on the light curve and phase plot to mark the epoch, maximum value, and max/min phase-s, --showshow interactive plots instead of saving figures-c RA DEC, --coord RA DECset the coordinates of the object in degrees-p PERIOD, --period PERIODset the period for phase plot in days-e EPOCH, --epoch EPOCHset the epoch for phase plot in HJD-r MIN MAX, --ztfran MIN MAXdelete all ZTF data out of range-o, --localpsuse local PS1 data instead of requesting it via the API-z, --zoomuse settings for zoomed plot-m, --modeldraw a simple light curve model-t, --plotwhat data to plot. Possible values are: zt ps as at cs ga og gd
python plot_merged_phase_data.py gusev4
python plot_merged_phase_data.py minkovskiy24 -lResult:
To iterate over number of objects:
for nam in gusev4 minkovskiy17 minkovskiy24; do python plot_merged_phased_data.py $nam; donefor PowerShell:
ForEach ($nam in "gusev4", "minkovskiy17", "minkovskiy24") { python .\plot_merged_phased_data.py $nam }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
- ZTF,
- PS1,
- ASAS-SN,
- ASAS-3,
- ATLAS,
- CRTS,
- Gaia DR3,
- GDS,
- SuperWASP,
- OGLE,
- MASCARA,
- SDSS,
- SkyMapper Southern Sky Survey,
- Hipparcos,
- TESS,
- CoRoT,
- Kepler,
- K2 photometry data available are:
{
"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]
}
}}-
Masci, F. J.; et al., 2019, The Zwicky Transient Facility: Data Processing, Products, and Archive, ZTF DR23 query form
-
Tonry, J. L.; et al., 2018, ATLAS: A High-cadence All-sky Survey System
-
Drake, A. J.; et al., 2009, Catalina Real-time Transient Survey
-
Butters, O. W.; et al., 2010, The first WASP public data release
-
Udalski, A.; et al., 2015, OGLE-IV: Fourth Phase of the Optical Gravitational Lensing Experiment
-
Perryman, M. A. C.; et al., 1997, The HIPPARCOS and TYCHO catalogues
-
Gaia collaboration; et al., 2022, Gaia Data Release 3 (Gaia DR3) Part 1 Main source
-
Han, T.; Brandt, T. D., 2023, TESS-Gaia Light Curve: A PSF-based TESS FFI Light-curve Product
-
Solano, E.; et al., 2009, The LAEX and NASA portals for CoRoT public data
-
Howell, S. B.; et al., 2014, The K2 Mission: Characterization and Early Results
Examples of light curves (presented in the VSX detail sheets)
- Gusev 4 settings, phase plot
- Minkovskiy 16 settings, phase plot
- GSC 02150-01562 phase plot
- UCAC3 170-058819 phase plot
- UCAC3 240-187355 phase plot
- UCAC3 248-199991 phase plot
- UCAC3 248-205306 phase plot
- USNO-B1.0 1534-0126575 phase plot
- USNO-B1.0 1534-0125222 phase plot, light curve
- ZTF19acdncga phase plot