Fix WcsNDMap and MapDataset cutout to support mode='partial' #2755
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request solves issue #2754. First, an array of the correct size filled with 0 is created with the correct
dtype
. Then we add the content of theWcsNDMap
using the the parenting cutout slices.The
cutout-slices
are also used for theweight
map that is used inWcsNDMap
.Note that I had put a test to ensure that
other
andweights
have the sameWcsGeom
. This breaks many tests as it seems not to be the case in many situation. I found that puzzling. Maybe this should be clarified.Dear reviewer
This is ready for review. We need to see whether
mode='partial'
should be the default for most observation loops. I tend to believe it should be since at leastRingBackgroundMaker
andFoVBrackgroundMaker
need for field of view datasets to properly work.Any opinion @adonath @AtreyeeS ?
I put v0.16 as milestone, and we'll see if we can really merge this in on time.