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

time schema is inconsistent with asdf-astropy #346

Closed
braingram opened this issue Nov 10, 2022 · 0 comments · Fixed by #349
Closed

time schema is inconsistent with asdf-astropy #346

braingram opened this issue Nov 10, 2022 · 0 comments · Fixed by #349

Comments

@braingram
Copy link
Contributor

This has been hidden by and is related to #345

asdf-astropy serializes astropy.time.Time values in a way that is inconsistent with the time schema. One example is that the schema lists allowed base_formats:

    enum:
      - iso
      - yday
      - byear
      - jyear
      - decimalyear
      - jd
      - mjd
      - gps
      - unix
      - cxcsec

which are incomplete compared to the base_format values produced by asdf-astropy (which can contain any astropy.time.Time format). For example, serializing

astropy.time.Time(730120.0003703703, format="plot_date")

produces

t: !time/time-1.1.0 {base_format: plot_date, value: '2000-01-01T00:00:32.000'}

Given the assumed intended behavior of base_format (to store the astropy.time.Time format) this looks more like a schema bug than an issue with the asdf-astropy implementation.

The base_format is one (but possibly not the only) error with the time schema that was hidden by the ndarray schema issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant