Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Dec 4, 2023
1 parent ee7dca9 commit c7bf5a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions specutils/tests/test_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,14 @@ def test_tabular_fits_multid(tmp_path, ndim, spectral_axis):
assert quantity_allclose(spec.uncertainty.quantity,
spectrum.uncertainty.quantity)


@pytest.mark.parametrize("mask_type", [bool, np.uint8, np.int8, np.uint16, np.int16, '>i2'])
def test_tabular_fits_mask(tmp_path, mask_type):
# test mask I/O with tabular fits format
wave = np.arange(3600, 3700) * u.AA
nwave = len(wave)

#- 1D Case
# 1D Case
flux = np.random.uniform(0,1,size=nwave) * u.Jy
mask = np.zeros(flux.shape, dtype=mask_type)
mask[0] = 1
Expand Down Expand Up @@ -627,7 +628,7 @@ def test_tabular_fits_mask(tmp_path, mask_type):
else:
assert sp1.mask.dtype == sp2.mask.dtype

#- 2D Case
# 2D Case
nspec = 3
flux = np.random.uniform(0,1,size=(nspec,nwave)) * u.Jy
mask = np.zeros(flux.shape, dtype=mask_type)
Expand Down Expand Up @@ -655,6 +656,7 @@ def test_tabular_fits_mask(tmp_path, mask_type):
else:
assert sp1.mask.dtype == sp2.mask.dtype


def test_tabular_fits_maskheader(tmp_path):
# Create a small data set + header with reserved FITS keywords
disp = np.linspace(1, 1.2, 21) * u.AA
Expand Down

0 comments on commit c7bf5a5

Please sign in to comment.