This routine implements the RR Lyrae near-infrared light curve fitting techniques described by Hajdu et al. (2018).
This code is a fork of: https://github.com/gehjadu/pyfiner.
- Restructured code following PEP, with improved modularity and readibility
- All previous bugs leading to memory overflow by matplotlib were eliminated.
- The code computes uncertainties with bias corrections for small sample sizes.
- All algorithm parameters can be set on the command line or using an external parameter file.
- The list of input time series can be specified by a list file.
- Period fitting can be turned off.
The K-band light curve are fit with the Fourier transformed principal components coefficients; the H-band data is fit with the same light-curve shape; the shape of the J-band light curve is approximated with the K-band principal component amplitudes.
This code was tested in the following python environment:
Python
3.8.10Numpy
1.22Scipy
1.5Matplotlib
3.4
Simply use git clone <URL>
to clone this library into a local directory.
Subsequently, it can be added to your PYTHONPATH
environment variable
either temporarily by issuing the sys.path.append("/your/local/directory")
command in python, or permanantly by exporting your directory into
PYTHONPATH
.
For example, if using the bash shell, add the
export PYTHONPATH="${PYTHONPATH}:/your/local/directory"
to the content of the
~/.bashrc file.
The program can be run by:
python pyfiner.py [OPTIONS]
or by supplying a parameter file that contains the command-line arguments:
python pyfiner.py @<parameter_file>
The full list of command-line options can be printed on the STDOUT by:
python pyfiner.py --help
An example parameter file pyfiner.par
is provided, which is set up to run pyfiner on the test data
in the subdirectories. To quickly test the program, issue the following command:
python pyfiner.py @pyfiner.par
which will create output on STDOUT and a pdf file in the figures
subdirectory.
The two outputs should be identical with figures/b00088_pyfiner_test.pdf
and the contents of pyfiner.out
, respectively.
The program requires an ASCII input file that can be specified by the --input_list
parameter.
This file must contain two columns with the identifier and the (initial) period
of the stars, respectively, one star per line; and the header # id period
.
The K, J, and H light curve files (one file per object) should be located in their
respective subdirectories, following a similar naming scheme as the test data files.
The program will generate text output on the STDOUT and figure files in the subdirectory
specified by the --plotdir
parameter.
The text output will contain the following columns:
- ID: the star's identifier
- period: the fitted period (in units of days)
- meanK_mag: mean K magnitude (intercept of the fitted K light curve model)
- meanK_int: magnitude of the intercept of the fitted light curve transformed into intensity units
- nJ: the number of J-band data
- meanJ_mag: corrected mean J-band magnitude
- wmean_J_mag: corrected weighted mean J-band magnitude
- std_J_mag: residual std. deviation of the J-band magnitudes
- wmean_J_int: weighted residual std. deviation of the J-band magnitudes
- std_J_int: residual std. deviation of the J-band magnitudes around their intensity mean
- median_J_mag: corrected median J-band magnitude
- median_J_int: magnitude of the corrected median J-band intensity
- nH: the number of H-band data
- meanH_mag: corrected mean H-band magnitude
- wmean_H_mag: corrected weighted mean H-band magnitude
- std_H_mag: residual std. deviation of the H-band magnitudes
- wmean_H_int: weighted residual std. deviation of the H-band magnitudes
- std_H_int: residual std. deviation of the H-band magnitudes around their intensity mean
- median_H_mag: corrected median H-band magnitude
- median_H_int: magnitude of the corrected median H-band intensity
- U1, U2, U3, U4: fitted amplitudes of the K-band principal light-curve components
- RMSE: root mean squared error of the predicted K-band light curve
- COST: total loss of the K-band light curve regression
- COSTN: mean loss of the K-band light curve regression
- N_final: number of final K-band data points
- N_initial: initial number of K-band data points