-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Instantiate Spectrum1D object with bin edges instead of bin centers #176
Comments
Display accurate development version in main window title
Bringing back this topic because it's hit a breaking point on the need to deal with #427 and #461 which both need to address this (the former is basically exactly this issue, while #461 it's more about defining a new "output" spectrum even though the input might be in "bin center" form) The core problem is that some spectral conventions have the bin edges "implicit" meaning the edge is taken to be the average of the centers (and the edges are then inferred from the second-from-edge center). But that's not sufficient if you really know the bin edges (e.g. #427, meaning X-ray spectra). But the WCS machinery at least right now assumes bin centers. What's not clear to me is if it's a relatively simple internal change to make it account for bin edges, or a major refactor. If the former, we should just do it, if the later, we should find a way to paper-over it to proceed with #427 and make a better fix later if possible. |
Note this also connects to the |
Note that currently, the fits wcs adapter class has a |
Gotcha, @nmearl . So in principle it's an "implementation detail" whether the edges are stored or the centers are stored, so if we can make it work with the WCS/GWCS machinery maybe it's my "easier" case? Of course we still have to keep the initialization machinery as it stands (since users in OIR land are used to bin centers), but that could be changed to internally convert to the implicit edges (and transparently convert back to the centers as long as its all self-consistent) Regardless, we need to write down somewhere what the center/edge conventions are, I'm realizing. But that can be a separate issue once we hash out the implementation details here. |
This capability has existed for a while, closing. |
Want to be able to instantiate a Spectrum1D object with bin edges instead of bin centers.
For example, a particularly nasty X-ray spectrum might have:
The text was updated successfully, but these errors were encountered: