This is a model that can generate realistic m - dwarf flare instances and save them to an LCLIB file. Please refer to the instructions below to run the model.
Clone the repository and run :
pip install -r requirements.txt
We recommend using the a virtual environment to install the requirements and run the project.
Note: Please note that all tables are not required for the functioning of the model - some were just used for testing.
To download and save the light curves and dust maps, run
python download_initial_data.py
Alternatively, generator.py will download the light curves and store them as required. However the dust maps will need to be fetched manually. You can use the code from download_initial_data.py to do this.
Table 1 and Table 2 are already included in the repository. The Kepler Input Catalogue will be downloaded by this script too, or can be downloaded manually and placed in the data_files directory for all the functions to work correctly.
Article Link: https://iopscience.iop.org/article/10.1088/0004-6256/142/4/138
Article Link: https://iopscience.iop.org/article/10.3847/1538-4357/aa8ea2
Download the kepler_kic_v10.csv.gz file from
https://archive.stsci.edu/pub/kepler/catalogs/kepler_kic_v10.csv.gz
And save it to the data_files directory.
The LSST filter data is already included in the repo. They can be found here:
http://svo2.cab.inta-csic.es/svo/theory/fps3/index.php?mode=browse&gname=LSST&asttype=
Inside the repo, run
python -m pip install -e .
To download all the light curve and dustmap data, run:
mdwarf-download-data
Run
python -m m_dwarf_flare -h
To see the arguments for the LCLIB file generator.
If you want to create 10 simulations and save them to a file, you can run:
python -m m_dwarf_flare --flare_count 10 --spectrum_class bb_balmer_jump --dir_name sample --file_name sample.TEXT
This will save the modeled data to a file named sample.TEXT in a directory named sample.
If you want to tweak the thresholds for the flare filtering, you can do so in generator.py.
We are always working to improve the model! If you run into any issues, please feel free to report them in the Issues tab.