Fix Adaptive DNB composite bug introduced from refactoring #2456
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.
This fixes a bug I introduced when contributing to @simonrp84's #2124 PR when I refactored the VIIRS composites module. One simplification I did resulted in allowing negative indices to be used when accessing data when they were actually supposed to be considered out of bounds.
I haven't added a test for this explicitly because the difference it makes with our test dataset seems to be extremely small (0.9989 to 0.9990) and even in real world cases I didn't see anything obvious. The only reason I caught this is because of some automated testing I have in Polar2Grid which compared two images and it discovered that some pixels had changed.
Otherwise, this PR also fixes a few issues discovered in the tests (name changes and one expected data not being checked).