Generate noisified lightcurves based on the BTS sample and retrain Parsnip with these.
Project description
ztfparsnip
Retrain Parsnip for ZTF. This is achieved by using fpbot forced photometry lightcurves of the Bright Transient Survey. These are augmented (redshifted, noisifed and - when possible - K-corrected).
The package is maintained by A. Townsend (HU Berlin) and S. Reusch (DESY).
The following augmentation steps are taken:
- draw uniformly from a redshift distribution with maximum redshift increase
delta_z
- only accept lightcurves with at least one datapoint making the signal-to-noise threshold
SN_threshold
- only accept lightcurves with at least
n_det_threshold
datapoints - for those lightcurves that have an existing SNCosmo template, apply a K-correction at that magnitude (if
k_corr=True
) - randomly drop datapoints until
subsampling_rate
is reached - add some scatter to the observed dates (
jd_scatter_sigma
in days) - if
phase_lim=True
, only keep datapoints drugin a typical duration (depends on the type of source)
Usage
Create augmented training sample
from pathlib import Path
from ztfparsnip.create import CreateLightcurves
weights = {"sn_ia": 9400, "tde": 9400, "sn_other": 9400, "agn": 9400, "star": 9400}
if __name__ == "__main__":
sample = CreateLightcurves(
output_format="parsnip",
classkey="simpleclasses",
weights=weights,
train_dir=Path("train"),
plot_dir=Path("plot"),
seed=None,
phase_lim=True,
k_corr=True,
)
sample.select()
sample.create(plot_debug=False)
Train Parsnip with the augmented sample
from ztfparsnip.train import Train
if __name__ == "__main__":
train = Train(classkey="simpleclasses", seed=None)
train.run()
Evaluate
Coming soon.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ztfparsnip-0.2.2.tar.gz
(3.1 MB
view hashes)
Built Distribution
Close
Hashes for ztfparsnip-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8e8f8d41fd903635270c7052ff700463530b2a9dbba8047e90855d178c69f33 |
|
MD5 | 1ef7241292ea22f05ec3158293d6dc9f |
|
BLAKE2b-256 | b97d381d43dfd9c553d33e9bdc5005a171168c00d27eb48e3415c33195692941 |