convert_integrated_sb_unit#
- jdaviz.core.unit_conversion_utils.convert_integrated_sb_unit(u1, spectral_axis_unit, desired_freq_unit, desired_length_unit)[source]#
Converts an integrated surface brightness unit (moment 0 unit) to a surface brighntess unit that is compatible with the spectral axis unit that the surface brightness was integrated over.
This function adjusts an integrated flux unit to ensure compatibility with a given spectral axis unit (e.g., frequency or wavelength). The function handles conversions based on the physical type of the flux unit (per-frequency or per-wavelength) and the provided spectral axis unit.
- Parameters:
- u1astropy.units.Unit
The unit of the integrated flux that needs conversion.
- spectral_axis_unitastropy.units.Unit
The unit of the spectral axis over which the flux was integrated (e.g., Angstrom for wavelength or Hz for frequency).
- Returns:
- astropy.units.Unit
The converted flux unit compatible with the given spectral axis unit. If the units are already compatible, the input unit
u1
is returned unchanged.