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

% Unit not deterministic written to FITS #268

Open
nicHoch opened this issue Aug 25, 2022 · 2 comments
Open

% Unit not deterministic written to FITS #268

nicHoch opened this issue Aug 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nicHoch
Copy link
Collaborator

nicHoch commented Aug 25, 2022

Writing Data with unit "%" to FITS and reading back in will change the unit to '0.01'
Depending on how often data was read/write to fits the actual unit might differ.

This could break the end2end test but should not be a reason to reject the PR as internally the both units are compatible

Maybe update astropy

   a: /tmp/pytest-of-nicky/pytest-862/origdata/solo_L1_stix-hk-maxi_20210628_V01.fits
   b: /tmp/pytest-of-nicky/pytest-862/L1/2021/06/28/HK/solo_L1_stix-hk-maxi_20210628_V01.fits
   Keyword(s) not to be compared:
    CHECKSUM DATASUM DATE HISTORY VERS_SW
   Maximum number of different data values to be reported: 10
   Relative tolerance: 0.0, Absolute tolerance: 0.0
  
  Extension HDU 2 (DATA, 1):
  
     Headers contain differences:
       Keyword COMMENT [146] has different values:
          a>   unit: '0.01'
           ?          ^^^^
          b>   unit: '%'
           ?          ^
       Keyword COMMENT [280] has different values:
          a>       unit: !astropy.units.Unit {unit: '0.01'}
           ?                                         ^^^^
          b>       unit: !astropy.units.Unit {unit: '%'}
           ?        

@samaloney
Copy link
Collaborator

There is now an upstream issue (astropy/astropy#14271) for this maybe we could just not use the percent unit for moment?

@samaloney samaloney added the bug Something isn't working label Sep 23, 2024
@samaloney
Copy link
Collaborator

Issue is still present upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants