solspect.get_solspect
solspect.get_solspect(
wl_knots=None,
*,
source=None,
table=None,
cols2drop=(),
dflam_rho=1.0,
add_fnu=True,
add_abmag=True,
)Load all source columns, optionally interpolate, and add derived flux columns.
Parameters
wl_knots : array-like or~astropy.units.Quantity, default = None-
Output wavelengths; plain values are in µm.
Noneretains native rows. Otherwise, linearly interpolateflam, propagatedflam, and dropbandwidthwith an INFO log. Order and duplicates are kept; an empty sequence returns an empty table. Extrapolation is rejected. source : {"tsis_full", "tsis", "astm"}, default = None-
Bundled reference. Defaults to
"tsis_full"whentableis omitted. Supply eithersourceortable, not both. table :~astropy.table.QTable, default = None-
Custom source. Requires finite, unmasked
wlandflamwith physical units, positive wavelengths, and nonnegative flux. Interpolation requires a nonempty, strictly increasing grid. Retaineddflammust be nonnegative andbandwidthpositive, both finite, unmasked, and in compatible units. Other columns are copied on native grids; drop them before interpolation. cols2drop : str or sequence of str, default = ()-
Column names to omit; defaults to none. Use
cols2drop=("dflam", "bandwidth")to omit source uncertainties and widths. Known columns absent from a source are ignored; unknown names raiseValueError. Requiredwlandflamcannot be dropped. DroppingfnuorABmagoverrides its add flag. dflam_rho : float or array-like, default = 1.0-
Neighboring error correlation in [-1, 1], finite and dimensionless. Defaults to 1.0 (fully correlated, giving an upper bound). A scalar applies everywhere; an array needs one value per source interval. Nondefault values require interpolation with a retained
dflam. add_fnu : bool, default = True-
Add or recompute
fnu[MJy] from outputwlandflam. Defaults toTrue;Falseomits the column. add_abmag : bool, default = True-
Add or recompute
ABmag[mag] independently ofadd_fnu. Defaults toTrue;Falseomits the column.
Returns
result :~astropy.table.QTable-
Owned columns with deep-copied table metadata.
wlandbandwidthuse µm;flamanddflamuse W m^-2 um^-1. Other native columns keep their units. Source tables remain unchanged. Withwl_knots, the metadatabin_width_nm,sampling_interval_nm, andspectral_resolution_nmget the prefixsource_.
Raises
: ValueError-
Inputs, column selection, units, or correlations are invalid; extrapolation or interpolation of unsupported columns is requested.
Notes
Interpolation samples flux density; it does not conserve integrated flux when rebinning. Output covariance, wavelength errors, and interpolation model error are not included. dflam_propagation metadata identifies the correlation mode. Derived columns use the output flux; zero flux gives infinite ABmag.
See the bundled solar spectra README for dataset selection, coverage, uncertainty definitions, and provenance.