-
Notifications
You must be signed in to change notification settings - Fork 175
Reconcile save capture 110 #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace 2 with GDT_UInt16
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be GDT_UInt16
to be more readable
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?