flux_residuals#

lsst.analysis.ap.flux_residuals(matched, srcs2, flux_col='psfFlux', err_col='psfFluxErr', id_col='diaSourceId', plot=False)#

Compute per-pair flux residuals from a match_catalogs result.

Parameters#

matchedpandas.DataFrame

Output of match_catalogs (rows from catalog 1 with partner ids).

srcs2pandas.DataFrame

Catalog 2, indexed implicitly by id_col for partner lookup.

flux_col, err_colstr

Column names for the flux and its error in both catalogs.

id_colstr

Source-id column in both catalogs. matched is assumed to have f"{id_col}_2" populated by match_catalogs.

plotbool

If True, return a histogram + Q-Q plot in addition to the residuals.

Returns#

residualspandas.DataFrame

One row per pair with columns flux1, flux2, err1, err2, delta_flux, delta_flux_sigma, and xmatch_dist_arcsec.

figmatplotlib.figure.Figure, optional

Only returned when plot=True.