This repository contains a method for detecting transient astronomical events in realtime.
- A python3 (>3.4) installation with working pip3 and python3-venv.
git clone [email protected]:transientskp/lpf.git
Installation script is provided in activate.sh
which you can run as follows:
cd lpf/
. activate.sh
Otherwise, check the requirements.txt
file.
In the following, you have to setup a configuration file. Consider copying one of the ones provided in examples/
and editing it to your needs. We use examples/aartfaac12.yml
in the guidelines.
To train the neural network for inference, we first build a dataset.
- Create a parameter configuration file accustomed to your telescope. See the
examples
folder for inspiration. - Run the
lpf/simulation/scripts/transients.py
script with as argument the path to your configuration file. E.g.,
python lpf/simulation/scripts/transients.py examples/aartfaac12.yml
- Once the simulation is finished, some example PNGs will be given in the output folder that you provided in the configuration file. Make sure they look satisfactory.
This extracts background noise for the dynamic spectra. If skipped, you'll use Gaussian noise.
- Specify correct parameters in the noise extraction section of your configuration file.
- Run the noise extractor:
python lpf/simulation/scripts/extract_noise.py examples/aartfaac12.yml
- Edit the neural network section of your configuration file to your needs.
- Run
python lpf/_nn/scripts/train.py examples/aartfaac12.yml
- Wait until it's converged.
- Edit your configuration file to your needs.
- Run
python lpf/main.py examples/aartfaac12.yml
- The parameters of analyzed transients will be output to a
.csv
in the specified output folder. This can be opened for analysis. The.npy
file in the output folder constains all the dynamic spectra.
- The
.csv
file with the inferred parameters is in the output folder you specified. You can usepandas
to inspect it and filter it for interesting bursts. An example.ipynb
file is given inlpf/analysis/result_analysis.ipynb
. - Also: in the provided output folder a catalog video is saved to show the source-detection pipeline and an example of the estimated background and variability maps are saved.