SpectralData#

class madcubapy.coordinates.SpectralData(value, unit=None, frame_type='observed', radial_velocity=None, doppler_rest=None, doppler_convention=None, **kwargs)[source]#

Bases: SpectralCoord

Wrapper for SpectralCoord that adds support for rest-frame frequencies input.

Note

Frame conversion between observed and rest frequencies always uses the relativistic convention (matching Astropy behavior). For expressing spectral coordinates as velocities, the doppler_convention can be ‘radio’ or ‘relativistic’.

Parameters:
valueint, float, ndarray, or Quantity

Spectral values (wavelength, frequency, energy, wavenumber, or velocity)

unitUnit

Unit for the given spectral values. Mandatory if value is not a Quantity.

frame_type{“observed”, “rest”}, default: “observed”

Reference frame for input data.

radial_velocityQuantity, optional

Radial velocity of the source.

doppler_restQuantity, optional

Reference rest frequency (for velocity calculations).

doppler_convention{“radio”, “relativistic”}, optional

The Doppler convention to use when expressing the spectral value as velocity.

Other Parameters:
**kwargs

Additional arguments passed to SpectralCoord.