Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug/ndcube #546

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6818e21
start changelog for 0.22.0
nden Mar 10, 2024
e67779d
fix examples (#492)
nden Mar 13, 2024
53025a9
[SCSB-145] require Python 3.10 (#493)
zacharyburnett Apr 12, 2024
4a1e104
adjust test tolerance for mac scipy 1.14.0 (#505)
braingram Jul 22, 2024
735c306
replace usages of ``copy_arrays`` with ``memmap`` (#503)
zacharyburnett Jul 30, 2024
e634b1f
Fix an issue with units in wcs_from_points (#507)
nden Aug 21, 2024
8cc50d9
Simplify converting units to strings (#508)
eerovaher Sep 4, 2024
9549ab5
Update development version installation instructions (#509)
eerovaher Sep 16, 2024
506745b
Improve compatibility with numpy 2.0 (#510)
mcara Sep 16, 2024
c1c5335
MNT: Create dependabot.yml for workflow auto updates (#514)
pllim Oct 14, 2024
c61cfc3
MNT: Use hash for Action workflow versions and update if needed (#513)
pllim Oct 14, 2024
b0b029f
Bump the actions group across 1 directory with 2 updates (#516)
dependabot[bot] Oct 14, 2024
9006b03
Fix units in WCS API world_axis_object_components (#512)
Cadair Oct 17, 2024
57478e0
vendorize and fix contexts workflow (#518)
braingram Oct 21, 2024
c46e932
Synchronize gwcs region with changes in jwst/romancal (#517)
WilliamJamieson Oct 21, 2024
ccbb066
Add support for compound bounding boxes and ignored bounding box entr…
WilliamJamieson Oct 24, 2024
8a74fa6
Add ability to manually trigger CI (#520)
WilliamJamieson Oct 28, 2024
8a9086c
Move examples from conftest to an examples module (#521)
WilliamJamieson Nov 1, 2024
60b4552
Bump actions/checkout from 4.2.1 to 4.2.2 in /.github/workflows in th…
dependabot[bot] Nov 1, 2024
7f92615
Force gwcs to always return a F ordered bounding box (#522)
WilliamJamieson Nov 8, 2024
0eab5aa
Pin JWST version before suspect change
WilliamJamieson Nov 14, 2024
cd496d3
Revert just the PR that may have caused the issue
WilliamJamieson Nov 14, 2024
037fb76
Possible fix?
WilliamJamieson Nov 14, 2024
235890a
Testing Fix for JWST downstream (#529)
WilliamJamieson Nov 15, 2024
9cd8552
Create downstream test workflow
WilliamJamieson Nov 14, 2024
7d874c3
Create downstream test workflow (#528)
WilliamJamieson Nov 15, 2024
5f66522
add `romanisim` to downstream testing (#530)
WilliamJamieson Nov 20, 2024
bd9ba38
hotfix for download workflow
zacharyburnett Nov 20, 2024
09d4110
Update tox envs (#533)
WilliamJamieson Dec 2, 2024
86dc56c
Bump OpenAstronomy/github-actions-workflows from 1.13.0 to 1.14.0 in …
dependabot[bot] Dec 2, 2024
9f23a66
Ignore the bounding box ordering warning when reading files (#526)
WilliamJamieson Dec 2, 2024
c01c6d0
Add integer rounding to match APE 14 (#525)
WilliamJamieson Dec 2, 2024
8b4d8d7
Set the bounding_box within the forward_transform property (#532)
WilliamJamieson Dec 5, 2024
863b6e4
Respect the bounding_box in inverse transforms (#498)
nden Dec 13, 2024
68fcfa8
Fix inside/outside calc for inverse with bbox (#536)
mcara Dec 18, 2024
ca12fbc
Allow for small rounding errors in bbox for inverse (#537)
mcara Dec 18, 2024
333c143
Revert "Allow for small rounding errors in bbox for inverse" (#538)
nden Dec 18, 2024
f10ceb7
Update changes for release
WilliamJamieson Dec 19, 2024
fcbcf5a
Update changes for release (#541)
WilliamJamieson Dec 19, 2024
8a28efc
Fix inequality sign and var name in outside bbox test
mcara Dec 18, 2024
4542b6a
Fix inequality sign and var name in outside bbox test (#540)
WilliamJamieson Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: ".github/workflows" # Location of package manifests
schedule:
interval: "monthly"
groups:
actions:
patterns:
- "*"

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@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Verify that a changelog entry exists for this pull request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst
Expand Down
74 changes: 10 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CI'
name: test

on:
push:
Expand All @@ -7,6 +7,7 @@ on:
tags:
- '*'
pull_request:
workflow_dispatch:
schedule:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
Expand All @@ -18,75 +19,20 @@ concurrency:

jobs:
check:
name:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
with:
envs: |
- linux: check-style
- linux: check-security
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
with:
envs: |
- linux: test
python-version: 3.9
- linux: test-numpy125
python-version: 3.9
- linux: test-numpy123
python-version: 3.9
- linux: test
python-version: 3.10
- linux: test-numpy125
python-version: 3.10
- linux: test-numpy123
python-version: 3.10
- linux: test
python-version: 3.11
pytest-results-summary: true
- macos: test
python-version: 3.11
pytest-results-summary: true
- linux: test-dev
- linux: test-pyargs
python-version: 3.11
- linux: test-cov
python-version: 3.11
- linux: py310-oldestdeps
- linux: py311-cov
coverage: codecov
pytest-results-summary: true
crds:
name: retrieve current CRDS context
runs-on: ubuntu-latest
env:
OBSERVATORY: jwst
CRDS_PATH: /tmp/crds_cache
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
steps:
- id: context
run: >
echo "pmap=$(
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ |
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
)" >> $GITHUB_OUTPUT
# Get default CRDS_CONTEXT without installing crds client
# See https://hst-crds.stsci.edu/static/users_guide/web_services.html#generic-request
- id: path
run: echo "path=${{ env.CRDS_PATH }}" >> $GITHUB_OUTPUT
- id: server
run: echo "url=${{ env.CRDS_SERVER_URL }}" >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.pmap }}
path: ${{ steps.path.outputs.path }}
server: ${{ steps.server.outputs.url }}
test_downstream:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [ crds ]
with:
setenv: |
CRDS_PATH: ${{ needs.crds.outputs.path }}
CRDS_SERVER_URL: ${{ needs.crds.outputs.server }}
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: ${{ needs.crds.outputs.path }}
cache-key: crds-${{ needs.crds.outputs.context }}
envs: |
- linux: py310-test-jwst-cov-xdist
- macos: py311
pytest-results-summary: true
- linux: py312
- linux: py3-dev
39 changes: 39 additions & 0 deletions .github/workflows/contexts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: contexts

on:
workflow_call:
outputs:
jwst:
value: ${{ jobs.contexts.outputs.jwst }}
roman:
value: ${{ jobs.contexts.outputs.roman }}
workflow_dispatch:

jobs:
contexts:
name: retrieve latest CRDS contexts
runs-on: ubuntu-latest
outputs:
jwst: ${{ steps.jwst_crds_context.outputs.pmap }}
roman: ${{ steps.roman_crds_context.outputs.pmap }}
steps:
- id: jwst_crds_context
env:
OBSERVATORY: jwst
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
run: >
echo "pmap=$(
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}", null], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 --connect-timeout 10 |
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
)" >> $GITHUB_OUTPUT
- run: if [[ ! -z "${{ steps.jwst_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.jwst_crds_context.outputs.pmap }}; else exit 1; fi
- id: roman_crds_context
env:
OBSERVATORY: roman
CRDS_SERVER_URL: https://roman-crds.stsci.edu
run: >
echo "pmap=$(
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}", null], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 |
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
)" >> $GITHUB_OUTPUT
- run: if [[ ! -z "${{ steps.roman_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.roman_crds_context.outputs.pmap }}; else exit 1; fi
109 changes: 109 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: test downstream packages

on:
workflow_dispatch:
schedule:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * 1'
pull_request:
# We also want this workflow triggered if the `Downstream CI` label is
# added or present when PR is updated
types:
- synchronize
- labeled
push:
tags:
- '*'

# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
# within that PR re-triggers this CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
environment:
runs-on: ubuntu-latest
steps:
- id: data_path
run: echo "path=${{ runner.temp }}/data" >> $GITHUB_OUTPUT
outputs:
data_path: ${{ steps.data_path.outputs.path }}

crds_contexts:
uses: spacetelescope/crds/.github/workflows/contexts.yml@master

jwst:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
needs: [ environment, crds_contexts ]
with:
setenv: |
CRDS_PATH: ${{ needs.environment.outputs.data_path }}/crds
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: ${{ needs.environment.outputs.data_path }}/crds
cache-key: crds-${{ needs.crds_contexts.outputs.jwst }}
envs: |
- linux: py311-test-jwst-cov-xdist

romancal:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
needs: [ environment, crds_contexts ]
with:
setenv: |
CRDS_PATH: ${{ needs.environment.outputs.data_path }}/crds
CRDS_SERVER_URL: https://roman-crds.stsci.edu
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
cache-path: ${{ needs.environment.outputs.data_path }}/crds
cache-key: crds-${{ needs.crds_contexts.outputs.jwst }}
envs: |
- linux: py311-test-romancal-cov-xdist

romanisim_data:
needs: [ environment ]
uses: spacetelescope/romanisim/.github/workflows/retrieve_cache.yml@main
with:
cache_path: ${{ needs.environment.outputs.data_path }}

romanisim:
needs: [ romanisim_data ]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.0
with:
libraries: |
brew:
- eigen
- fftw
setenv: |
WEBBPSF_PATH: ${{ needs.romanisim_data.outputs.cache_path }}/webbpsf-data/
GALSIM_CAT_PATH: ${{ needs.romanisim_data.outputs.cache_path }}/galsim_data/real_galaxy_catalog_23.5_example.fits
FFTW_DIR: /opt/homebrew/opt/fftw/lib/
cache-path: ${{ needs.romanisim_data.outputs.cache_path }}
cache-key: ${{ needs.romanisim_data.outputs.cache_key }}
envs: |
- linux: py311-test-romanisim-cov-xdist

astropy:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.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
# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.11'
envs: |
- linux: specutils

third-party:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@d68193b68216da64eafaa618f53c59f5d271c56e # v1.14.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
# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.11'
envs: |
- linux: ndcube
- linux: dkist
18 changes: 18 additions & 0 deletions .github/workflows/romanisim_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: download and cache romanisim data

on:
schedule:
- cron: "42 4 * * 3"
workflow_dispatch:
inputs:
webbpsf_minimal:
description: minimal WebbPSF dataset
type: boolean
required: false
default: true

jobs:
download_romanisim_data:
uses: spacetelescope/romanisim/.github/workflows/data.yml@main
with:
webbpsf_minimal: ${{ github.event_name != 'workflow_dispatch' && true || inputs.webbpsf_minimal }}
31 changes: 31 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
0.22.0 (2024-12-19)
-------------------

- Replace usages of ``copy_arrays`` with ``memmap`` [#503]

- Fix an issue with units in ``wcs_from_points``. [#507]

- Fix incorrect units being returned in the low level WCS API. [#512]

- Synchronize ``region.py`` with the copies of it in JWST and Romancal. [#517]

- Add support for compound bounding boxes and ignored bounding box entries. [#519]


- Add ``gwcs.examples`` module, based on the examples located in the testing ``conftest.py``. [#521]

- Force ``bounding_box`` to always be returned as a ``F`` ordered box. [#522]

- Move the bounding box attachment to the forward transform property. [#532]

- Adjust ``world_to_array_index_values`` to round to integer coordinates as specified by APE 14. [#525]

- Add warning filter to asdf extension to prevent the ``bounding_box`` order warning for gwcs objects originating from a file. [#526]

- Fixed a bug where evaluating the inverse transform did not
respect the bounding box. [#498]

- Improved reliability of inside/outside footprint computations when evaluating
inverse transform with bounding box. [#536]


0.21.0 (2024-03-10)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To clone from github and install the master branch::

git clone https://github.com/spacetelescope/gwcs.git
cd gwcs
python setup.py install
pip install --editable .


Contributing Code, Documentation, or Feedback
Expand Down
7 changes: 5 additions & 2 deletions docs/gwcs/points_to_wcs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ can be used to convert coordinates from pixel to world.
>>> gwcs_obj(36.235,642.215) # doctest: +FLOAT_CMP
(246.72158004206716, 43.46075091731673)

Or equivalently
>>> gwcs_obj.forward_transform(36.235,642.215) # doctest: +FLOAT_CMP
Or using the common WCS API
>>> gwcs_obj.pixel_to_world_values(36.235,642.215) # doctest: +FLOAT_CMP
(246.72158004206716, 43.46075091731673)

>>> gwcs_obj.pixel_to_world(36.235,642.215) # doctest: +FLOAT_CMP
<SkyCoord (ICRS): (ra, dec) in deg
(246.7215802, 43.46075103)>
Loading
Loading