Skip to content

Commit

Permalink
add missing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Sep 3, 2021
1 parent 32ed1aa commit 90a1965
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/test_wavecal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@


def test_wavecal(files, instr, instrument, mode, mask, orders, settings, order_range):
if len(files["wavecal"]) == 0:
name = "wavecal_master"
if len(files[name]) == 0:
pytest.skip(f"No wavecal files found for instrument {instrument}")

orders, column_range = orders
files = files["wavecal"][0]
files = files[name][0]
orig, thead = instr.load_fits(files, mode, mask=mask)
thead["obase"] = (0, "base order number")

Expand All @@ -27,7 +28,7 @@ def test_wavecal(files, instr, instrument, mode, mask, orders, settings, order_r
extraction_type="arc",
column_range=column_range,
order_range=order_range,
extraction_width=settings["wavecal"]["extraction_width"],
extraction_width=settings[name]["extraction_width"],
plot=False,
)

Expand All @@ -44,11 +45,12 @@ def test_wavecal(files, instr, instrument, mode, mask, orders, settings, order_r
reference = np.load(reference, allow_pickle=True)
linelist = reference["cs_lines"]

name = "wavecal"
module = WavelengthCalibration(
plot=False,
manual=False,
threshold=settings["wavecal"]["threshold"],
degree=settings["wavecal"]["degree"],
threshold=settings[name]["threshold"],
degree=settings[name]["degree"],
)
wave, solution = module.execute(thar, linelist)

Expand Down

0 comments on commit 90a1965

Please sign in to comment.