qsospec.Spectrum
- class qsospec.Spectrum(wave_obs, flux, err, z, metadata=<factory>, mask=None)[source]
Bases:
objectArray-only spectrum input for qsospec.
- Parameters:
- __init__(wave_obs, flux, err, z, metadata=<factory>, mask=None)
Methods
__init__(wave_obs, flux, err, z[, metadata, ...])from_arrays(wave, flux[, err, ivar, z, ...])Build a spectrum from plain arrays.
Attributes
Internal compatibility alias for the physical cgs scale.
Internal display label for the input f_lambda values.
observedorrest.Multiplicative scale from input f_lambda to physical cgs.
physical cgs or relative f_lambda.
Finite, positive-error pixels allowed for fitting.
Rest-frame wavelength array.
Wavelength unit label.
- property flux_density_scale_to_cgs: float | None
Internal compatibility alias for the physical cgs scale.
- classmethod from_arrays(wave, flux, err=None, ivar=None, z=0.0, wave_frame='observed', mask=None, survey=None, wave_unit=None, flux_unit=None, flux_scale=None, source=None, ra=None, dec=None, galactic_extinction_corrected=False, galactic_extinction=None, metadata=None)[source]
Build a spectrum from plain arrays.
wave_framemay be"observed"or"rest"and declares the frame of both wavelength and F_lambda. Internally the observed wavelength is stored and rest wavelength is derived fromz.- Parameters:
wave (ndarray)
flux (ndarray)
err (ndarray | None)
ivar (ndarray | None)
z (float)
wave_frame (str)
mask (ndarray | None)
survey (str | None)
wave_unit (str | None)
flux_unit (str | None)
flux_scale (float | None)
source (str | None)
ra (float | None)
dec (float | None)
galactic_extinction_corrected (bool)
metadata (SpectrumMetadata | None)
- Return type:
- metadata: SpectrumMetadata