ztforce.lightcurve
Lightcurve: per-epoch storage, stacking, and I/O.
Attributes
Classes
Per-source forced-photometry lightcurve in absolute AB magnitudes. |
Module Contents
- class Lightcurve(ra: float, dec: float)[source]
Per-source forced-photometry lightcurve in absolute AB magnitudes.
- add_epoch(obsjd: float, band: str, flux: float, flux_err: float, mag: float, mag_err: float, zero_point: float, flags: int, x_fit: float | None = None, y_fit: float | None = None, mag_limit: float | None = None, image_id: str | None = None) None[source]
Append one exposure’s measurement.
- stack(jd_min: float | None = None, jd_max: float | None = None, bands: list[str] | None = None) pandas.DataFrame[source]
Inverse-variance-weighted stack of detections within a JD window.
- Returns a DataFrame indexed by band with columns:
flux_stack, flux_err_stack, mag_stack, mag_err_stack, n_epochs.
- rolling_stack(window: float, window_unit: str = 'days', bands: list[str] | None = None, step: float | None = None) pandas.DataFrame[source]
Rolling IVW stack in a sliding window.
- Returns a long-format DataFrame with columns:
obsjd_center, band, flux_stack, flux_err_stack, mag_stack, mag_err_stack, n_epochs.
- save(path: str | pathlib.Path) None[source]
Save to an Astropy ECSV file preserving all columns and metadata.
- classmethod load(path: str | pathlib.Path) Lightcurve[source]
Load from an Astropy ECSV file saved by save().