-
Notifications
You must be signed in to change notification settings - Fork 10
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
Aggregate information about image axes and dimensions into structs #1392
base: dev
Are you sure you want to change the base?
Conversation
…spatial axes and spectral axis. Pass values already calculated in loader instead of repeating calculations.
…; refactor use of axes and dims in ext info loader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove spectral and stokes axis from CompressedFits
I could not find anything that was missed. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading individual Stokes images as a hypercube does not work. This is picked up by e2e. Requesting @pford a re-review once addressed.
The test images in the screenshot all have Shape = [256, 256, 480, 1] (RA, DEC, FREQ, STOKES)
.
Other tests images with Shape = [256, 256, 480] (RA, DEC, FREQ)
or Shape = [6280, 3140] (GLON, GLAT)
work however.
Description
This is a refactoring PR which aggregates information about image axes and dimensions into two structs. This simplifies passing the information around and storing it as properties: we can use the structs instead of inconsistent subsets of individual axes and dimensions.
Major changes:
FileLoader::::FindCoordinateAxes
signature has changed; it now only sets_axes
and_dims
on the loader and does not also modify return parameters (but it's still abool
and may set the message parameter).FileLoader
andFrame
replaced with structs. Individual getters have been kept; getters for the structs have been added.There are two non-refactoring changes:
FileLoader::::FindCoordinateAxes
now explicitly bails out with an error message if there are fewer than 2 render axes (e.g. in a weird case like a 2D image with one Stokes axis). Previously I believe that this would have crashed. Maybe we should give images like this a second render axis with size 1 (like we handle images with no depth or Stokes), but that would be a much more complicated change (and it may not be something we need).Possible outstanding issue
Checklist
protobuf updated to the latest dev commit/ no protobuf update neededprotobuf version bumped/ protobuf version not bumped