Fix stokes passed as integer string to imsubimage in 4D mosaic path#349
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #349 +/- ##
=========================================
- Coverage 6.28% 6.28% -0.01%
=========================================
Files 38 38
Lines 15229 15232 +3
Branches 3660 3660
=========================================
Hits 957 957
- Misses 14258 14261 +3
Partials 14 14 ☔ View full report in Codecov by Harness. |
|
Seems reasonable to me. I wonder why we haven't found this before? Any ideas @EOakes? I would have thought this should affect any mosaics we're trying to run... |
imsubimage expects a polarization name like 'I', not an integer index like '0'. Fix by reading stokes labels from the already-open myia_sum coordinate system. Add changelog entry
ec8006c to
24234ac
Compare
I think it's the fact that a) the cube has to be big enough to trigger the memory-managed path, and b) the input images need to be 3D so adddegaxes fires - in previous testing for #323, I may have overlooked the second condition. |
|
@EOakes OK! It's clear to me that we should probably just keep the 4 axes around through postprocessing so we save a bunch of time adding them back in and ripping them out, so this seems like a good point to start |
In the channel-by-channel ndim==4 path of mosaic_aligned_data, imsubimage was being called with stokes='0' (an integer index as a string), but it requires a polarization label like 'I'. Fixed by reading the stokes labels from the coordinate system of myia_sum, which is already open at that point.