solspect.solspect_addcols
solspect.solspect_addcols(table, *, add_fnu=True, add_abmag=True)Add or refresh selected derived columns in place from wl and flam.
Parameters
table :~astropy.table.QTable-
Table with
wlin length units andflamin spectral irradiance per unit wavelength. Existing physical columns and metadata are kept. Call this after editingwlorflamto refresh derived columns. add_fnu : bool, default = True-
If
True, add or replace"fnu"column in MJy. IfFalse, leave any existing"fnu"column unchanged. add_abmag : bool, default = True-
If
True, add or replace"ABmag"column in magnitudes, independently ofadd_fnu. IfFalse, leave any existing"ABmag"column unchanged.
Raises
: ValueError-
Physical columns are missing, masked, nonfinite, or have invalid units or values. Wavelength must be positive; flux may be zero.
Notes
Both flags default to True. Setting both to False does nothing. Requested columns are computed from the physical columns before the table changes; existing "fnu" is never used to compute "ABmag". "ABmag" uses the existing 3631 Jy zero point and is infinite at zero flux.