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, objectId=None, ax=None, days_ago=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 (
DataFrame
) – Lightcurve history of a unique objectId. Must contain columns [‘jd’,’fid’,’magpsf’,’sigmapsf’,’diffmaglim’]objectId (
Optional
[str
]) – objectId identifying dflc. Used for plot title.ax (
Optional
[Axes
]) – matplotlib axes for the figure. If None, a new figure will be createddays_ago (
bool
) – 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