LogMagUncertainty#
- class pygaia.errors.photometric.LogMagUncertainty#
Bases:
object
Estimate the log(mag) vs mag uncertainty for \(G\), \(G_\mathrm{BP}\), \(G_\mathrm{RP}\) based on Gaia EDR3 photometry.
The code in this class is a modified version of the Edr3LogMagUncertainty code in the Jypyter notebook EDR3_Photometric_Uncertainties.ipynb at gaia-dpci/gaia-dr3-photometric-uncertainties. The additional function estimate_for_maglist() is included to facilitate calculating the uncertainties for the number of observationis corresponding to a given Gaia data release and for the input list of magnitudes.
Methods Summary
estimate
(band[, nobs, mag_range, mag_samples])Estimate the log(mag) vs mag uncertainty
estimate_for_maglist
(band[, maglist, release])Estimate the log(mag) vs mag uncertainty
Methods Documentation
- estimate(band, nobs: array([], dtype=int64) = 0, mag_range=None, mag_samples=1000)#
Estimate the log(mag) vs mag uncertainty
- Parameters:
band (str) – name of the band for which the uncertainties should be estimated (case-insensitive). Must be one of “g”, “gbp”, or “grp”.
nobs (ndarray, int) – number of observations for which the uncertainties should be estimated. Must be a scalar integer value or an array of integer values.
mag_range (array_like) – Magnitude range over which the spline should be evaluated. The default and maximum valid range is (4, 21)
mag_samples (int) – Number evenly spaced magnitudes (over the mag_range interval) at which the splines will be estimated. Default: 1000
- Raises:
ValueError – For wrong inputs.
- Returns:
df – Pandas dataframe with the interpolated log(mag) uncertainty vs mag. The magnitude column is named mag_g, mag_bp, or mag_rp depending of the requested band. A column for each value of nobs is provided, in the default case the column is logU_200.
- Return type:
DataFrame
- estimate_for_maglist(band, maglist: array([], dtype=float64) = 15.0, release='dr4')#
Estimate the log(mag) vs mag uncertainty
- Parameters:
band (str) – name of the band for which the uncertainties should be estimated (case-insensitive). Must be one of “g”, “gbp”, or “grp”.
maglist (ndarray, float) – List of magnitudes (corresponding to the requested band) for which the uncertainties should be estimated. Must be a scalar float value or an array of float values. The values must be in the range [4, 21].
release (str) – Gaia data release for which the uncertainties are simulated (case-insensitive). Must be one of “dr3”, “dr4”, or “dr5”.
- Raises:
ValueError – For wrong inputs.
- Returns:
df – Pandas dataframe with the interpolated log(mag) uncertainty vs mag. The magnitude column is named mag_g, mag_bp, or mag_rp depending of the requested band. A column for each value of nobs is provided, in the default case the column is logU_200.
- Return type:
DataFrame