Skip to content

Commit

Permalink
change variable name to match PR, speclim->specvalues, value->values
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsongreen committed May 31, 2024
1 parent fc39756 commit 77fe6db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions jdaviz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ def to_unit(self, data, cid, values, original_units, target_units):

elif len(values) == 2:
# Need this for setting the y-limits
spec_limits = [spec.spectral_axis[0].value, spec.spectral_axis[-1].value]
eqv = u.spectral_density(spec_limits * spec.spectral_axis.unit)
eqv = u.spectral_density(spectral_values)

if '_pixel_scale_factor' in spec.meta:
# get min and max scale factors, to use with min and max of spec for
Expand Down
2 changes: 1 addition & 1 deletion jdaviz/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_to_unit(cubeviz_helper):
original_units = u.MJy / u.sr
target_units = u.MJy

value = uc.to_unit(cubeviz_helper, data, cid, value, original_units, target_units)
value = uc.to_unit(cubeviz_helper, data, cid, values, original_units, target_units)

# so test first value in array
assert np.allclose(value[0], 4.800000041882413e-08)
Expand Down

0 comments on commit 77fe6db

Please sign in to comment.