pgb_utils.figures

figures contains functions for plotting alert and history data.

pgb_utils.pgb_utils.figures.plot_cutouts(alert_dict)[source]

Adapted from: https://github.com/ZwickyTransientFacility/ztf-avro-alert/blob/master/notebooks/Filtering_alerts.ipynb

pgb_utils.pgb_utils.figures.plot_lightcurve(dflc: pandas.core.frame.DataFrame, objectId: Optional[str] = None, ax: Optional[matplotlib.axes._axes.Axes] = None, days_ago: bool = True)[source]

Plot the lighcurve (per band) of a single ZTF object. Adapted from: https://github.com/ZwickyTransientFacility/ztf-avro-alert/blob/master/notebooks/Filtering_alerts.ipynb

Parameters
  • dflc – Lightcurve history of a unique objectId. Must contain columns [‘jd’,’fid’,’magpsf’,’sigmapsf’,’diffmaglim’]

  • objectId – objectId identifying dflc. Used for plot title.

  • ax – matplotlib axes for the figure. If None, a new figure will be created

  • days_ago – If True, x-axis will be number of days in the past. Else x-axis will be Julian date.

pgb_utils.pgb_utils.figures.plot_lightcurve_cutouts(alert_dict)[source]

Adapted from: https://github.com/ZwickyTransientFacility/ztf-avro-alert/blob/master/notebooks/Filtering_alerts.ipynb

pgb_utils.pgb_utils.figures.plot_stamp(stamp, fig=None, subplot=None, **kwargs)[source]

Adapted from: https://github.com/ZwickyTransientFacility/ztf-avro-alert/blob/master/notebooks/Filtering_alerts.ipynb