Per-band unscaling works with indexes #709
Closed
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 updates the per-band unscaling to support when indexes=[...] are passed. I didn't account for that in the PR a couple days ago, sorry about that!
Fortunately a quick fix to select from the scales/offsets arrays so that they continue to match the shape of the image data. I've been testing this with files we make containing dozens of bands with different (or no) scale/offset rules and I haven't noticed any issues with mismatching or incorrect shapes.
You also should be able to edit this forked repo now. Not sure what I'm missing in the settings, but it is part of my work org and maybe there's something I can't see getting in the way by default. I added you with write permission on the repo to hopefully get around that.