Skip to content

Commit

Permalink
Update test_trace to specreduce 1.4 trace_image interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier committed Jul 31, 2024
1 parent a7ddd28 commit e3cfc60
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions glue_astronomy/translators/tests/test_trace.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import numpy as np

from specreduce import tracing
from specreduce.utils.synth_data import make_2dspec_image

# renamed in specreduce 1.4 and `add_noise` option added (requires photutils)
try:
from specreduce.utils.synth_data import make_2d_trace_image
trace_args = {add_noise: False}
except ImportError:
from specreduce.utils.synth_data import make_2dspec_image as make_2d_trace_image
trace_args = dict()

from glue.core import Data, DataCollection


def test_trace():

image = make_2dspec_image()
image = make_2d_trace_image(**trace_args)
trace = tracing.FlatTrace(image, 5)

data_collection = DataCollection()
Expand Down

0 comments on commit e3cfc60

Please sign in to comment.