Skip to content

Bring in DRAGONS feature changes#79

Merged
teald merged 10 commits intomainfrom
maintenance/dragons_updates
Dec 26, 2024
Merged

Bring in DRAGONS feature changes#79
teald merged 10 commits intomainfrom
maintenance/dragons_updates

Conversation

@teald
Copy link
Copy Markdown
Member

@teald teald commented Dec 26, 2024

Summary

Recent changes to the development version of DRAGONS due to feature merges incorporating changes from 2+ years of commits have brought astrodata out of sync with DRAGONS in unexpected ways.

This PR attempts to capture the changes, especially in tests. They're being brought in together to avoid some overhead.

Changes

  • Updated shallow copying for AstroData objects
  • Metadata slicing for AstroNDData objects
  • Update ignored keys handling in testing.ADCompare._header
  • Add None handling to binning in utils.as_iraf_section
    • Differs from how DRAGONS does this because DRAGONS's version of astrodata still uses a bad __dict__ override that's been fixed in this astrodata for a while
  • Add wcs.create_new_image_projection
  • Update wcs.fitswcs_image to include rotation

Tests

  • Add test_access_to_other_planes_when_sliced to tests/unit/test_nddata.py
  • Add test_create_new_image_projection to tests/unit/test_wcs.py

Documentation

  • Update utils.as_iraf_section docstring to include binning argument

This adds changes to the astrodata/core.py file from a recent branch
merge in DRAGONS.

This captures commits:
- 1ab28c589db5f6508e649894fe7f330f08c42b5e
- e10deb524040e9846be7feb6ac8b9fd6e95b42a4
Adds NDAstroData._slice (handles certain metadata of the same shape as
NDAstroData.shape) and adds meta/copy args to NDAstroData.transpose

This captures the DRAGONS commits:
- 925f5e644d4dd42cab62d8578998ed0d66e4349e
- a1429a2eeba9bd5ab0329ae447e90d7318bcca87
This adds changes to astrodata/testing, specifically implementing the
ignore argument to a list of ignored keywords (hardcoded).

This captures the DRAGONS commits:
- 7b22187839eee1993721a72623021883ddaedbaf
This adds a test from DRAGONS that tests access to other planes when an
nddata object is sliced/windowed.

This captures the DRAGONS commits:
- dade5e14d5b7de820a42d54d455ebdd15730ee73
This adds a test for creating a new image projection.

Captures the DRAGONS commits:
- 021bda79de2912ab197704d4ab44e130969b6c1c
Incorporated changes to the asIRAFSection/as_iraf_section methods.

This captures DRAGONS commits:
- c4a6f6ddcc782466116d8bd6f0846d4dd62122af
Adds changes to astrodata/wcs.py from DRAGONS, including a new function
(create_new_image_projection) and handling transform a different way in
fitswcs_image.

This handles DRAGONS commits:
- e1a0e3029e182f57dc8e8546b423c2a02e668481
- 021bda79de2912ab197704d4ab44e130969b6c1c
There was previously a property that overrode `__dict__` for section
objects (a [major antipattern, as this overrides the instance attribute
dictionary](https://docs.python.org/3/reference/datamodel.html#object.__dict__)).
@teald teald self-assigned this Dec 26, 2024
@teald teald added maintenance For maintenance tasks test Related to testing DRAGONS Related to DRAGONS development labels Dec 26, 2024
@teald teald marked this pull request as ready for review December 26, 2024 21:48
@teald teald merged commit f2afa04 into main Dec 26, 2024
@teald teald deleted the maintenance/dragons_updates branch December 26, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DRAGONS Related to DRAGONS development maintenance For maintenance tasks test Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant