src.superphot_plus.plotting.lightcurves

This module includes scripts to plot fit light curves.

Module Contents

Functions

plot_lc_fit(ztf_name, ref_band, ordered_bands, ...[, ...])

Plot an existing light curve fit.

plot_sampling_lc_fit(ztf_name, out_dir, tdata, fdata, ...)

Plot lightcurve sampling fit using in-memory samples.

plot_sampling_lc_fit_numpyro(posterior_samples, tdata, ...)

Plot lightcurve sampling fit using in-memory samples.

plot_lightcurve_clipping(ztf_name, data_folder, save_dir)

Plot the lightcurve WITH clipped points and lines demonstrating

plot_lc_fit(ztf_name, ref_band, ordered_bands, data_dir, fit_dir, out_dir, sampling_method='dynesty', file_type='pdf', custom_formatting=None)[source]

Plot an existing light curve fit.

Parameters:
  • ztf_name (str) – ZTF name of the object.

  • data_dir (str) – Directory containing the data files.

  • fit_dir (str) – Directory containing the fit files.

  • out_dir (str) – Directory for saving the plot.

  • sampling_method (str, optional) – Sampling method used for the fit. Default is “dynesty”.

  • file_type (str, optional) – Type of file to output the resulting image to (e.g. png, pdf). Default is pdf.

plot_sampling_lc_fit(ztf_name, out_dir, tdata, fdata, ferrdata, bdata, eq_wt_samples, band_order, ref_band, sampling_method='dynesty', file_type='pdf', custom_formatting=None)[source]

Plot lightcurve sampling fit using in-memory samples.

Parameters:
  • ztf_name (str) – ZTF name of the object.

  • out_dir (str) – Directory for saving the plot.

  • tdata (array-like) – Time of data.

  • fdata (array-like) – Flux of data.

  • ferrdata (array-like) – Error in flux of data.

  • bdata (array-like) – Band of data.

  • eq_wt_samples (array-like) – Equally weighted samples from data.

  • sampling_method (str, optional) – Sampling method used for the fit. Default is “dynesty”.

plot_sampling_lc_fit_numpyro(posterior_samples, tdata, fdata, ferrdata, bdata, max_flux, lcs, ref_band, ordered_bands, output_folder, sampling_method='svi')[source]

Plot lightcurve sampling fit using in-memory samples.

Parameters:
  • posterior_samples – Posterior samples from the MCMC run.

  • tdata (array-like) – Time of data.

  • fdata (array-like) – Flux of data.

  • ferrdata (array-like) – Error in flux of data.

  • bdata (array-like) – Band of data.

  • max_flux (array-like) – Max flux of data.

  • lcs (array-like) – Light curve objects on which sampling was run.

  • output_folder (str or FITS_PLOTS_FOLDER, optional) – Directory where to store the light curve sampling fit.

plot_lightcurve_clipping(ztf_name, data_folder, save_dir)[source]

Plot the lightcurve WITH clipped points and lines demonstrating how those points are clipped.

Parameters:
  • ztf_name (str) – ZTF name of the plotted object.

  • data_folder (str) – The path to the folder holding the CSV data.

  • save_dir (str) – Directory path where to store the plot figure.