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

Added translators for NDDataArray and StdDevUncertainty #81

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

bmorris3
Copy link
Contributor

@bmorris3 bmorris3 commented Jan 6, 2023

Description

glue-astronomy currently supports data translation to/from a astropy.nddata.CCDData object, which is a subclass of astropy.nddata.NDDataArray, with slightly modified arguments and WCS handling. This PR implements support for NDDataArray as well as the associated uncertainty object StdDevUncertainty. I changed the name of the translator file to be more general (translators/ccddata.py -> translators/nddata.py) and modified the tests to cover the new cases.

This PR was put together to support of unit/mask/uncertainty propagation when collapsing data cubes represented as glue Data objects in jdaviz, in anticipation of also using the features implemented in astropy/astropy#14175.

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Base: 97.14% // Head: 96.99% // Decreases project coverage by -0.15% ⚠️

Coverage data is based on head (d4d4d20) compared to base (1380b85).
Patch coverage: 94.69% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
- Coverage   97.14%   96.99%   -0.16%     
==========================================
  Files          15       17       +2     
  Lines        1226     1296      +70     
==========================================
+ Hits         1191     1257      +66     
- Misses         35       39       +4     
Impacted Files Coverage Δ
glue_astronomy/translators/nddata.py 92.55% <92.55%> (ø)
glue_astronomy/translators/__init__.py 100.00% <100.00%> (ø)
glue_astronomy/translators/tests/test_nddata.py 98.41% <100.00%> (ø)
glue_astronomy/conftest.py 100.00% <0.00%> (ø)
glue_astronomy/__init__.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@astrofrog astrofrog merged commit 63d9e0c into glue-viz:main Jan 10, 2023
@dhomeier dhomeier changed the title translators for NDDataArray and StdDevUncertainty Added translators for NDDataArray and StdDevUncertainty Jan 10, 2023
@dhomeier dhomeier added the enhancement New feature or request label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants