UnitConversion#
- class jdaviz.configs.specviz.plugins.unit_conversion.unit_conversion.UnitConversion(*args, **kwargs)[source]#
Bases:
PluginTemplateMixin,DatasetSelectMixinPublic constructor
Attributes Summary
A trait for unicode strings.
A trait for unicode strings.
An instance of a Python list.
A trait which allows any value.
A trait which allows any value.
An instance of a Python list.
Methods Summary
process_unit_conversion(spectrum[, ...])- Parameters:
vue_unit_conversion(*args, **kwargs)Runs when the
applybutton is hit.Attributes Documentation
- current_flux_unit#
A trait for unicode strings.
- current_spectral_axis_unit#
A trait for unicode strings.
- flux_unit_equivalencies#
An instance of a Python list.
- new_flux_unit#
A trait which allows any value.
- new_spectral_axis_unit#
A trait which allows any value.
- spectral_axis_unit_equivalencies#
An instance of a Python list.
- template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/pllim/envs/yessss-dark-mode-doc/lib/python3.11/site-packages/jdaviz/configs/specviz/plugins/unit_conversion/unit_conversion.py', 'unit_conversion.vue')#
- update_ui#
Methods Documentation
- process_unit_conversion(spectrum, new_flux=None, new_spectral_axis=None)[source]#
- Parameters:
- spectrum
specutils.Spectrum1D The spectrum that will have its units converted.
- new_flux
The flux of spectrum will be converted to these units if they are provided.
- new_spectral_axis
The spectral_axis of spectrum will be converted to these units if they are provided.
- spectrum
- Returns:
- converted_spectrum
specutils.Spectrum1D A new spectrum with converted units.
- converted_spectrum