Skip to content

Commit

Permalink
Merge branch 'master' into visp_wcs
Browse files Browse the repository at this point in the history
  • Loading branch information
nden authored Jan 2, 2025
2 parents f97dcd8 + 931e2b3 commit 851d910
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ concurrency:

jobs:
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
with:
envs: |
- linux: check-style
- linux: check-security
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
with:
envs: |
- linux: py310-oldestdeps
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: spacetelescope/crds/.github/workflows/contexts.yml@master

jwst:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
needs: [ environment, crds_contexts ]
with:
setenv: |
Expand All @@ -51,7 +51,7 @@ jobs:
- linux: py311-test-jwst-cov-xdist
romancal:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
needs: [ environment, crds_contexts ]
with:
setenv: |
Expand All @@ -72,7 +72,7 @@ jobs:

romanisim:
needs: [ romanisim_data ]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
with:
libraries: |
brew:
Expand All @@ -88,7 +88,7 @@ jobs:
- linux: py311-test-romanisim-cov-xdist
astropy:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
if: (github.repository == 'spacetelescope/gwcs' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
with:
submodules: false
Expand All @@ -98,7 +98,7 @@ jobs:
- linux: specutils
third-party:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@9f1f43251dde69da8613ea8e11144f05cdea41d5 # v1.15.0
if: (github.repository == 'spacetelescope/gwcs' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
with:
submodules: false
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0.22.0 (unreleased)
0.22.0 (2024-12-19)
-------------------

- Coordinate frames now have a "native" order and then are sorted based on ``axes_order``. [#457]
Expand Down
18 changes: 9 additions & 9 deletions gwcs/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,19 +567,19 @@ def outside_footprint(self, world_arrays):
axis_range = footprint[:, idim]
else:
axis_range = footprint
range = [axis_range.min(), axis_range.max()]
min_ax = axis_range.min()
max_ax = axis_range.max()

if (axtyp == 'SPATIAL' and str(phys).endswith((".ra", ".lon"))
and range[1] - range[0] > 180):
and (max_ax - min_ax) > 180):
# most likely this coordinate is wrapped at 360
d = np.mean(range)
range = [
axis_range[axis_range < d].max(),
axis_range[axis_range > d].min()
]
outside = (coord >= range[0]) & (coord < range[1])
d = 0.5 * (min_ax + max_ax)
m = (axis_range <= d)
min_ax = axis_range[m].max()
max_ax = axis_range[~m].min()
outside = (coord > min_ax) & (coord < max_ax)
else:
outside = (coord < range[0]) | (coord > range[1])
outside = (coord < min_ax) | (coord > max_ax)
if np.any(outside):
if np.isscalar(coord):
coord = np.nan
Expand Down

0 comments on commit 851d910

Please sign in to comment.