Reference / API
Models
Loading/saving a model
|
Generative model of transient light curves |
|
Load a ParSNIP model. |
Save the model |
|
|
Send the model to the specified device |
Interacting with a dataset
|
Preprocess an lcdata dataset |
|
Augment a set of light curves |
|
Get a PyTorch DataLoader for an lcdata Dataset |
|
Fit the model to a dataset |
|
Evaluate the loss function on a given dataset. |
Generating model predictions
|
Generate predictions for a light curve or set of light curves. |
|
Generate predictions for a dataset |
Generate predictions for a dataset with augmentation |
|
|
Predict the flux of a light curve on a grid |
|
Predict the spectrum of a light curve at a given time |
|
Package the predictions for a light curve as an sncosmo model |
Individual parts of the model
|
Run a set of light curves through the full ParSNIP model |
|
Predict the latent variables for a set of light curves |
|
Predict the light curves for a given set of latent variables |
|
Predict the spectra at a given set of latent variables |
|
Compute the loss function for a set of light curves |
Datasets
Loading datasets
|
Load a dataset using the lcdata package. |
|
Load a list of datasets and merge them |
|
Parse a dataset from the lcdata package. |
Parsers for specific instruments
|
Parse a PLAsTiCC dataset |
|
Parse a PanSTARRS-1 dataset |
|
Parse a ZTF dataset |
Tools for manipulating datasets
|
Split a dataset into training and testing parts. |
|
Retrieve a list of bands in a dataset |
Plotting
|
Plot a light curve |
|
Plot the representation of a ParSNIP model |
|
Plot the spectrum of a light curve predicted by a ParSNIP model |
|
Plot the spectral time series of a light curve predicted by a ParSNIP model |
|
Compare a ParSNIP spectrum prediction to a real spectrum from sne.space |
|
Plot a confusion matrix |
|
Return the plot color for a given band. |
|
Return the plot marker for a given band. |
Classification
LightGBM classifier that operates on ParSNIP predictions |
|
|
Extract the top classification for each row a classifications Table. |
|
Calculate a weighted log loss metric. |
SNCosmo Interface
|
SNCosmo interface for a ParSNIP model |
|
Package the predictions for a light curve as an sncosmo model |
Custom Neural Network Layers
|
1D residual convolutional neural network block |
|
1D convolutional neural network block |
|
Time max pooling layer for 1D sequences |
Settings
|
Parse the settings for a ParSNIP model |
|
Parse a string into a list of integers |
|
Build an argparse object that can handle all of the ParSNIP model settings. |
|
Update the derived settings for a model |
|
Update settings to a new version |
Light curve utilities
|
Preprocess a light curve for the ParSNIP model |
|
Convert a time in the original units to one on the internal ParSNIP grid |
|
Convert a time on the internal grid to a time in the original units |
Calculate the effective wavelength of a band |
|
Calculate the Milky Way extinction corrections for a set of bands |
|
|
Determine if we should correct the background levels for a set of bands |
General utilities
|
Calculate the normalize median absolute deviation (NMAD) |
|
Convert a fractional difference to a difference in magnitude. |
|
Figure out which PyTorch device to use |