parsnip. frac_to_mag — parsnip 1. 4. 1 documentation parsnip frac_to_mag (fractional_difference) Convert a fractional difference to a difference in magnitude Because this transformation is asymmetric for larger fractional changes, we take the average of positive and negative differences
parsnip. plot_spectrum — parsnip 1. 4. 1 documentation Plot the spectrum of a light curve predicted by a ParSNIP model Parameters: light_curve (Table) – Light curve model (ParsnipModel) – Model to use for the prediction time – Time to predict the spectrum at count (int, optional) – Number of spectra to sample, by default 100
parsnip. get_band_plot_color — parsnip 1. 4. 1 documentation parsnip get_band_plot_color parsnip get_band_plot_color (band) Return the plot color for a given band If the band does not yet have a color assigned to it, then a random color will be assigned (in a systematic way)
parsnip 0. 1. 0 documentation - parsnip-cif. readthedocs. io parsnip is a minimal Python library for parsing CIF files While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible Importing parsnip allows users to read CIF 1 1 files, as well as many features from the CIF 2 0 and mmCIF formats Creating a CifFile object provides easy access to name-value pairs, as well as loop_-delimited loops
parsnip. plot_representation — parsnip 1. 4. 1 documentation Plot the representation of a ParSNIP model Parameters: predictions (Table) – Predictions for a dataset from predict_dataset plot_labels (List) – Labels for each of the classes mask (array, optional) – Mask to apply to the predictions, by default None
parsnip. get_band_effective_wavelength — parsnip 1. 4. 1 documentation parsnip get_band_effective_wavelength parsnip get_band_effective_wavelength (band) Calculate the effective wavelength of a band The results of this calculation are cached, and the effective wavelength will only be calculated once for each band
SNCosmo Interface — parsnip 1. 4. 1 documentation - parsnip. readthedocs. io ParSNIP provides an SNCosmo interface with an implementation of the sncosmo Source class To load the built-in ParSNIP model trained on the PLAsTiCC dataset: >>> import parsnip >>> source = parsnip ParsnipSncosmoSource ('plasticc') This source can be used in any SNCosmo models or methods For example:
parsnip. ParsnipModel. encode — parsnip 1. 4. 1 documentation parsnip ParsnipModel encode ParsnipModel encode (input_data) Predict the latent variables for a set of light curves We use variational inference, and predict the parameters of a posterior distribution over the latent space
parsnip 0. 1. 0 documentation - parsnip-cif. readthedocs. io parsnip is a minimal Python library for parsing CIF files While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible Importing parsnip allows users to read CIF 1 1 files, as well as many features from the CIF 2 0 and mmCIF formats Creating a CifFile object provides easy access to name-value pairs, as well as loop_-delimited loops
parsnip. ParsnipModel. get_data_loader — parsnip 1. 4. 1 documentation parsnip ParsnipModel get_data_loader ParsnipModel get_data_loader (dataset, augment = False, ** kwargs) Get a PyTorch DataLoader for an lcdata Dataset Parameters: dataset (Dataset) – Dataset to load augment (bool, optional) – Whether to augment the dataset, by default False Returns: PyTorch DataLoader for the dataset
parsnip. build_default_argparse — parsnip 1. 4. 1 documentation Build an argparse object that can handle all of the ParSNIP model settings The resulting parsed namespace can be passed to parse_settings to get a ParSNIP settings object Parameters: description – Description for the argument parser Returns:
parsnip. ParsnipModel. to — parsnip 1. 4. 1 documentation parsnip ParsnipModel to ParsnipModel to (device, force = False) Send the model to the specified device Parameters: device – PyTorch device force (bool, optional) – If True, force the model to be sent to the device even if it is there already (useful if only parts of the model are there), by default False
parsnip. plot_sne_space — parsnip 1. 4. 1 documentation Compare a ParSNIP spectrum prediction to a real spectrum from sne space Parameters: light_curve (Table) – Light curve model (ParsnipModel) – ParSNIP Model to use for the prediction name – Name of the light curve on sne space
parsnip. get_band_plot_color — parsnip 1. 4. 1 documentation parsnip get_band_plot_color parsnip get_band_plot_color (band) Return the plot color for a given band If the band does not yet have a color assigned to it, then a random color will be assigned (in a systematic way)