Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: P. L. Lim <[email protected]>
  • Loading branch information
kecnry and pllim committed Apr 13, 2023
1 parent a41c92f commit f030cce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ def get_subsets(self, subset_name=None, spectral_only=False,
object_only : bool
Return only object relevant information and
leave out the region class name and glue_state.
use_display_units: bool, optional
Whether to convert to the display units defined in the <unit-conversion> plugin.
use_display_units : bool, optional
Whether to convert to the display units defined in the Unit Conversion plugin.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion jdaviz/configs/cubeviz/plugins/slice/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _on_global_display_unit_changed(self, msg):
prev_unit = self.wavelength_unit
self.wavelength_unit = msg.unit.to_string()
# original unit during init can be blank or deg (before axis is set correctly)
if self._x_all is None or prev_unit in ['deg', '']:
if self._x_all is None or prev_unit in ('deg', ''):
return
self._update_data((self._x_all * u.Unit(prev_unit)).to(msg.unit, u.spectral()))

Expand Down
4 changes: 2 additions & 2 deletions jdaviz/configs/specviz/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def get_spectral_regions(self, use_display_units=False):
Parameters
----------
use_display_units: bool, optional
Whether to convert to the display units defined in the <unit-conversion> plugin.
use_display_units : bool, optional
Whether to convert to the display units defined in the Unit Conversion plugin.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion jdaviz/configs/specviz/plugins/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def set_plot_axes(self):
# Set axes labels for the spectrum viewer
flux_unit_type = "Flux density"
x_disp_unit = self.state.x_display_unit
x_unit = u.Unit(x_disp_unit) if x_disp_unit is not None else u.dimensionless_unscaled
x_unit = u.Unit(x_disp_unit) if x_disp_unit else u.dimensionless_unscaled
if x_unit.is_equivalent(u.m):
spectral_axis_unit_type = "Wavelength"
elif x_unit.is_equivalent(u.Hz):
Expand Down

0 comments on commit f030cce

Please sign in to comment.