Skip to content

Commit

Permalink
Merge pull request #102 from dhomeier/trace-image
Browse files Browse the repository at this point in the history
Update test_trace to specreduce 1.4 interface
  • Loading branch information
dhomeier authored Jul 31, 2024
2 parents a7ddd28 + 5c91529 commit d6961bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ jobs:
# Standard tests
- linux: py38-test
- linux: py39-test
- linux: py312-test
- linux: py310-test-dev
- linux: py311-test-dev
- linux: py312-test-dev
- macos: py311-test
- macos: py312-test-dev
- windows: py38-test
- windows: py39-test-dev
- macos: py310-test-dev
- windows: py311-test-dev
publish:
needs: tests
Expand Down
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 = dict(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 d6961bf

Please sign in to comment.