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

Units on timeseries .plot and .quantity are inconsistent #104

Closed
wtbarnes opened this issue May 1, 2024 · 2 comments · Fixed by #118
Closed

Units on timeseries .plot and .quantity are inconsistent #104

wtbarnes opened this issue May 1, 2024 · 2 comments · Fixed by #118
Labels
bug Something isn't working

Comments

@wtbarnes
Copy link

wtbarnes commented May 1, 2024

When I extract a quantity from a STIX quicklook lightcurve using .quantity, the units are in ct. However, when I visualize that same data with peek or plot, the y-label says the units are ct s-1 keV-1. The latter appears to be hardcoded in the plot method.

@samaloney
Copy link
Member

Thanks for reporting, yes the raw data is ct but often for plotting want it in ct s-1 keV-1 or even ct s-1 keV-1 cm-2. I'm not sure what to do here as I dont think there's a way to support different units in Timeseries? I guess as a hack I could create addition columns for the different units counts: ct, count_rate: ct s-1, differential_count_rate: ct s-1 keV-1,
differential_count_flux: ct s-1 keV-1 cm-2.

@samaloney samaloney added the enhancement New feature or request label May 14, 2024
@samaloney
Copy link
Member

samaloney commented May 16, 2024

There is also a bug in the code which I will fix where the units are hardcoded to be ct but the data are converted to ct s-1 keV-1 during loading.

@samaloney samaloney added bug Something isn't working and removed enhancement New feature or request labels May 17, 2024
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

Successfully merging a pull request may close this issue.

2 participants