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

Epoch to Time/Datetime from attribute metadata #152

Open
smangham opened this issue May 5, 2022 · 1 comment
Open

Epoch to Time/Datetime from attribute metadata #152

smangham opened this issue May 5, 2022 · 1 comment

Comments

@smangham
Copy link

smangham commented May 5, 2022

Not quite sure if this is standard, but: It would be useful if we could get a function to convert an epoch into Astropy Time/Datetime by parsing the format from its metadata (e.g. if it has the attribute FORM_PTR: CDF_TIME_TT2000), then using the cdf_tt2000 Astropy format automatically.

So something like CDFAstropy.convert_to_astropy(cdf_file['Epoch'], attributes=cdf_file.varattsget('Epoch')). Or just adding a method to the CDF file itself e.g. cdf_file.to_astropy_time('Epoch').

@dstansby
Copy link
Contributor

Definitely keen for this, PRs welcome 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants