Skip to content

Commit 98cc0ad

Browse files
committed
Fixed codestyle issues.
1 parent fd5ece3 commit 98cc0ad

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

specreduce/tests/test_align_along_trace.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ def mk_test_image():
1818
def test_align_spectrum_along_trace_bad_input():
1919
image, trace = mk_test_image()
2020
with pytest.raises(ValueError, match='Unre'):
21-
im = align_spectrum_along_trace(image, None)
21+
im = align_spectrum_along_trace(image, None) # noqa
2222

2323
with pytest.raises(ValueError, match='method must be'):
24-
im = align_spectrum_along_trace(image, trace, method='int')
24+
im = align_spectrum_along_trace(image, trace, method='int') # noqa
2525

2626
with pytest.raises(ValueError, match='Spectral axis length'):
27-
im = align_spectrum_along_trace(image.T, trace, method='interpolate', disp_axis=0)
27+
im = align_spectrum_along_trace(image.T, trace, method='interpolate', disp_axis=0) # noqa
2828

2929
with pytest.raises(ValueError, match='Displacement axis must be'):
30-
im = align_spectrum_along_trace(image, trace, disp_axis=2)
30+
im = align_spectrum_along_trace(image, trace, disp_axis=2) # noqa
3131

3232
with pytest.raises(ValueError, match='The number of image dimensions must be'):
33-
im = align_spectrum_along_trace(np.zeros((3,6,9)), trace)
33+
im = align_spectrum_along_trace(np.zeros((3, 6, 9)), trace) # noqa
3434

3535

3636
@pytest.mark.parametrize("method, truth_data, truth_mask, truth_ucty",
@@ -39,18 +39,18 @@ def test_align_spectrum_along_trace_bad_input():
3939
[0, 0, 0, 0.25, 0.5, 0.25, 0, 0, 0]]).T,
4040
np.array([[0, 0, 0, 0, 0, 0, 0, 1, 1],
4141
[1, 1, 0, 0, 0, 0, 0, 0, 0]]).astype(bool).T,
42-
np.array([[1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. ],
42+
np.array([[1., 1., 1., 1., 1., 1., 1., 1., 1.],
4343
[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]]).T),
4444
('shift',
45-
np.array([[0. , 0. , 0. , 0. , 1. , 0. , 0. , 0. , 0. ],
46-
[0. , 0. , 0. , 0.5, 0.5, 0. , 0. , 0. , 0. ]]).T,
45+
np.array([[0., 0., 0., 0., 1., 0., 0., 0., 0.],
46+
[0., 0., 0., 0.5, 0.5, 0., 0., 0., 0.]]).T,
4747
np.array([[0, 0, 0, 0, 0, 0, 0, 0, 1],
4848
[1, 0, 0, 0, 0, 0, 0, 0, 0]]).astype(bool).T,
49-
np.ones((9,2)))],
49+
np.ones((9, 2)))],
5050
ids=('method=interpolate', 'method=shift'))
5151
def test_align_spectrum_along_trace(method, truth_data, truth_mask, truth_ucty):
5252
image, trace = mk_test_image()
53-
im = align_spectrum_along_trace(image, trace, method=method)
53+
im = align_spectrum_along_trace(image, trace, method=method)
5454
assert im.shape == image.shape
5555
assert im.unit == u.DN
5656
assert im.uncertainty.uncertainty_type == 'var'

specreduce/utils/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from specreduce.tracing import Trace, FlatTrace
1010
from specreduce.extract import _ap_weight_image, _align_along_trace
1111

12-
__all__ = ['measure_cross_dispersion_profile', '_align_along_trace', 'align_2d_spectrum_along_trace']
12+
__all__ = ['measure_cross_dispersion_profile', '_align_along_trace',
13+
'align_2d_spectrum_along_trace']
1314

1415

1516
def _get_image_ndim(image):

0 commit comments

Comments
 (0)