Skip to content

% Unit not deterministic written to FITS #268

Open

Description

@nicHoch

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: '%'}
           ?        

Activity

  1. samaloney commented on Jan 19, 2023

    @samaloney
    Collaborator

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

  2. added
    bug
    on Sep 23, 2024
  3. samaloney commented on Sep 23, 2024

    @samaloney
    Collaborator

    Issue is still present upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions