UnitConversion
- class jdaviz.configs.specviz.plugins.unit_conversion.unit_conversion.UnitConversion(*args, **kwargs)[source] [edit on github]
Bases:
PluginTemplateMixin
,DatasetSelectMixin
Public 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
apply
button 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/jdaviz/envs/v2.10.0/lib/python3.9/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] [edit on github]
- 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
- vue_unit_conversion(*args, **kwargs)[source] [edit on github]
Runs when the
apply
button is hit. Tries to change units ifnew
units are set and are valid.