Open
Conversation
…_type handling to save_capture_as_stack(). Force radiance output to correct units. Add save_capture_as_bands() method.
…to match updates in capture.py. Force img_type parameter to be either 'radiance' or 'reflectance'. Add out_data_type parameter.
Contributor
Contributor
|
@fdarvas you closed the other PR, but this is still open. What are you expecting to get this merged? The save capture code and correct unit changes were included there. |
maurerle
reviewed
Jul 8, 2025
maurerle
left a comment
There was a problem hiding this comment.
I like the save_capture_as_bands function, but there are a lot of other changes included in this PR.
As the repo seems to be unmaintained, this is quite sad.
| out_data[out_data > 2] = 2 # limit reflectance data to 200% to allow some specular reflections | ||
| out_band.WriteArray(out_data * 32768) # scale reflectance images so 100% = 32768 | ||
| # scale reflectance images so 100% = 32768 | ||
| out_band.WriteArray(out_data * 32768 if gdal_type == 2 else out_data) |
| out_data[out_data > 65535] = 65535 | ||
| out_data = (self.__aligned_capture[:, :, in_band] + 273.15) * 100 if gdal_type == 2 \ | ||
| else self.__aligned_capture[:, :, in_band] | ||
| if gdal_type == 2: |
There was a problem hiding this comment.
should be GDT_UInt16 to be more readable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pulling over @mdanilevicz changes from #110 and reconciling the merge conflicts.
@and-viceversa can you rebase on this branch and make your suggested updates with a PR into this branch, and once that's happy we can merge to master here?