Skip to content

Commit

Permalink
Add test that fails on main
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Oct 8, 2024
1 parent ff6c58f commit 5270ce4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from astropy import units as u
from astropy.io import fits
from astropy.nddata import CCDData
from astropy.tests.helper import assert_quantity_allclose
from astropy.wcs import WCS
from numpy.testing import assert_allclose
from specutils import SpectralRegion
Expand Down Expand Up @@ -244,9 +245,12 @@ def test_moment_frequency_unit_conversion(cubeviz_helper, spectrum1d_cube_larger
mm.n_moment = 1
mm.output_unit = 'Spectral Unit'
moment_1_data = mm.calculate_moment()
mm.n_moment = 0
moment_0_data = mm.calculate_moment()

# Check to make sure there are no nans
assert len(np.where(moment_1_data.data > 0)[0]) == 8
assert_quantity_allclose(moment_0_data, -2.9607526e+09*u.Unit("Hz Jy / pix2"))


def test_write_momentmap(cubeviz_helper, spectrum1d_cube, tmp_path):
Expand Down

0 comments on commit 5270ce4

Please sign in to comment.