-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update mm plugin to use correct display flux units for moment 0
- Loading branch information
1 parent
930125f
commit 9d25909
Showing
6 changed files
with
172 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import astropy.units as u | ||
import pytest | ||
|
||
from jdaviz.core.validunits import check_if_unit_is_per_solid_angle | ||
|
||
|
||
@pytest.mark.parametrize("unit, is_solid_angle", [ | ||
('erg / sr', True), ('erg / (deg * deg)', True), ('erg / (deg * arcsec)', True), | ||
('erg / (deg**2)', True), ('erg deg**-2', True), ('erg sr^-1', True), | ||
('erg / degree', False), ('erg sr^-2', False)]) | ||
def test_check_if_unit_is_per_solid_angle(unit, is_solid_angle): | ||
# test function that tests if a unit string or u.Unit is per solid angle | ||
assert check_if_unit_is_per_solid_angle(unit) == is_solid_angle | ||
|
||
# turn string into u.Unit, and make sure it also passes | ||
assert check_if_unit_is_per_solid_angle(u.Unit(unit)) == is_solid_angle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters