ztfparsnip
Retrain Parsnip for ZTF. This is achieved by using fpbot forced photometry lightcurves of the Bright Transient Survey. These are augmented (redshifted, noisified and - when possible - K-corrected).
The package is maintained by A. Townsend (HU Berlin) and S. Reusch (DESY).
The following augmentation steps are taken for each parent lightcurve to generate a desired number of children (calculated via weights):
- draw a new redshift from a cubic distribution with maximum redshift increase
delta_z - only accept the lightcurve if at least
n_det_thresholddatapoints are above the signal-to-noise thresholdSN_threshold - if the lightcurve has an existing SNCosmo template, apply a K-correction at that magnitude (if
k_corr=True) - randomly drop datapoints until
subsampling_rateis reached - add some scatter to the observed dates (
jd_scatter_sigmain days) - if
phase_lim=True, only keep datapoints during a typical duration (depends on the type of source)
⚠️
Note that a high delta_z without loosening the SN_threshold and n_det_threshold will result in a large dropout rate, which will ultimately lead to far less lightcurves being generated than initially desired.
Usage
Create an 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 the Parsnip model
from ztfparsnip.train import Train
if __name__ == "__main__":
train = Train(classkey="simpleclasses", seed=None)
train.classify()
Metadata
Release files for ztfparsnip 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ztfparsnip-0.3.0.tar.gz | 3.1 MB | Without provenance | Details for ztfparsnip-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ztfparsnip-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for ztfparsnip-0.3.0-py3-none-any.whl |
Total release size: 6.3 MB
Release files / ztfparsnip-0.3.0.tar.gz
| Download URL | ztfparsnip-0.3.0.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4a214daf24b0b8bbc80ab5211724ef70211dd7bd3497f71aae432dd604af210
|
|
BLAKE2b-256 checksum How to use checksums |
3de8b4caa6671b13b23be052dd5e01db536abb560f6a676cb4426ec3d5175cb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure
|
Release files / ztfparsnip-0.3.0-py3-none-any.whl
| Download URL | ztfparsnip-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30a85b070a48119e1be06d61364865ec2fae76876e3fe2bcd3e61f3efb382589
|
|
BLAKE2b-256 checksum How to use checksums |
92ec73034df264cf13a22614b3b3f342701dcf4b7eb29efe26ee159fad80e88f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1042-azure
|
Security for ztfparsnip 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.