Skip to content

Commit

Permalink
Disable Unit Conversion plugin for now (#1970)
Browse files Browse the repository at this point in the history
* Disable Unit Conversion plugin for now

* Also update user doc

* BUG: Fix wrong attribute access

* Add mention of #1972
  • Loading branch information
pllim authored Jan 24, 2023
1 parent 8f8106b commit d9e71d6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ Specviz
Specviz2d
^^^^^^^^^

Other Changes and Additions
---------------------------

- Unit Conversion plugin is temporarily disabled while being reworked. [#1970]

3.2 (2023-01-04)
================

Expand Down
9 changes: 7 additions & 2 deletions docs/specviz/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,22 @@ parameter value if the parameter was not set to be fixed to the initial value.
Unit Conversion
===============

.. note::

This plugin is temporarily disabled. Effort to improve it is being
tracked at https://github.com/spacetelescope/jdaviz/issues/1972 .

The spectral flux density and spectral axis units can be converted
using the Unit Conversion plugin. The Spectrum1D object to be
converted is the currently selected spectrum in the spectrum viewer :guilabel:`Data`
icon in the viewer toolbar.

Select the frequency, wavelength, or energy unit in the
:guilabel:`New Spectral Axis Unit` pulldown
(e.g. Angstrom, Hertz, erg).
(e.g., Angstrom, Hertz, erg).

Select the flux density unit in the :guilabel:`New Flux Unit` pulldown
(e.g. Jansky, W/(Hz/m2), ph/(Angstrom cm2 s)).
(e.g., Jansky, W/(Hz/m2), ph/(Angstrom cm2 s)).

The :guilabel:`Apply` button will convert the flux density and/or
spectral axis units and create a new Spectrum1D object that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def vue_unit_conversion(self, *args, **kwargs):
# Add spectrum with converted units to app.
self.app.add_data(converted_spec, new_label)
self.app.add_data_to_viewer(
self.app._default_spectrum_viewer_reference_name,
self._default_spectrum_viewer_reference_name,
new_label, clear_other_data=True
)

Expand All @@ -162,7 +162,7 @@ def vue_unit_conversion(self, *args, **kwargs):
self.app.add_data(converted_spec, new_label)

self.app.add_data_to_viewer(
self.app._default_spectrum_viewer_reference_name,
self._default_spectrum_viewer_reference_name,
new_label, clear_other_data=True
)
snackbar_message = SnackbarMessage(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<!-- To re-enable plugin, use :disabled_msg="disabled_msg" -->
<j-tray-plugin
description='Convert the spectral flux density and spectral axis units.'
:link="'https://jdaviz.readthedocs.io/en/'+vdocs+'/'+config+'/plugins.html#unit-conversion'"
:disabled_msg="disabled_msg"
disabled_msg="This plugin is temporarily disabled. Effort to improve it is being tracked at GitHub Issue 1972."
:popout_button="popout_button">

<!-- for mosviz, the entries change on row change, so we want to always show the dropdown
Expand Down

0 comments on commit d9e71d6

Please sign in to comment.