From f10ceb7842a536490c78c3ab838fd2bc66c516e4 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 19 Dec 2024 13:58:51 -0500 Subject: [PATCH 1/3] Update changes for release --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 79ba331a..4a62e01e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,4 @@ -0.22.0 (unreleased) +0.22.0 (2024-12-19) ------------------- - Replace usages of ``copy_arrays`` with ``memmap`` [#503] From 8a28efc9740bf83af7a897b721d4a3656267df00 Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Wed, 18 Dec 2024 18:56:38 -0500 Subject: [PATCH 2/3] Fix inequality sign and var name in outside bbox test --- gwcs/wcs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gwcs/wcs.py b/gwcs/wcs.py index e0cbf191..0ce85b33 100644 --- a/gwcs/wcs.py +++ b/gwcs/wcs.py @@ -508,19 +508,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 From 931e2b3609d7bf24a86a032bf5e5b438efdfa103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 22:15:41 -0500 Subject: [PATCH 3/3] Bump OpenAstronomy/github-actions-workflows from 1.14.0 to 1.15.0 in /.github/workflows in the actions group (#543) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/downstream.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 550eb3b0..232ec2e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 766823c9..e03fce26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 434469f1..3f1bce7e 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -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: | @@ -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: | @@ -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: @@ -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 @@ -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