From e310f071e70322a152b7d9c35a0c4b8c07afa873 Mon Sep 17 00:00:00 2001 From: "T. E. Pickering" Date: Thu, 2 Nov 2023 21:36:29 -0700 Subject: [PATCH] fix typo; clarify docstring; simplify check --- specreduce/line_matching.py | 4 ++-- specreduce/tests/test_linelists.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/specreduce/line_matching.py b/specreduce/line_matching.py index e83ab1ad..eac58550 100644 --- a/specreduce/line_matching.py +++ b/specreduce/line_matching.py @@ -45,7 +45,7 @@ def find_arc_lines( Returns ------- QTable - A table of detected arc lines and their properties. + A table of detected arc lines and their properties: centroid, fwhm, and amplitude. """ # Asssume FWHM is given in pixels if unit is not specified if not isinstance(fwhm, u.Quantity): @@ -106,7 +106,7 @@ def match_lines_wcs( if isinstance(pixel_positions, u.Quantity): pixel_positions = pixel_positions.to(u.pix).value - # Extra sanity handling to make sure the input Sequense can be converted to an np.array + # Extra sanity handling to make sure the input Sequence can be converted to an np.array try: pixel_positions = np.array(pixel_positions, dtype=float) except ValueError as e: diff --git a/specreduce/tests/test_linelists.py b/specreduce/tests/test_linelists.py index d5842974..eecade4a 100644 --- a/specreduce/tests/test_linelists.py +++ b/specreduce/tests/test_linelists.py @@ -41,9 +41,8 @@ def test_pypeit_comma_list(): """ line_tab = load_pypeit_calibration_lines("HeI, NeI", cache=True, show_progress=False) assert line_tab is not None - if line_tab is not None: - assert "HeI" in line_tab['ion'] - assert "NeI" in line_tab['ion'] + assert "HeI" in line_tab['ion'] + assert "NeI" in line_tab['ion'] @pytest.mark.remote_data