Skip to content
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

Add save_capture_as_bands() method. Add out_data_type parameter. #154

Merged
merged 3 commits into from
Aug 24, 2021
Merged

Add save_capture_as_bands() method. Add out_data_type parameter. #154

merged 3 commits into from
Aug 24, 2021

Conversation

and-viceversa
Copy link
Contributor

The scope of this PR was a little broader than expected.

The unanticipated challenge when allowing multiple output data types is that handling the img_type is None case creates too many logical branches and the standard if else clutter for no real benefit. The simplest thing to do was change img_type from a kwarg to a positional argument. Forcing the choice works because there are only 2 potential outputs, and handling the None case with available data just felt like it added confusion especially in the higher level ImageSet.

This PR:

  • Change Capture.create_aligned_capture() to accept img_type as a positional argument. Simplify radiance/reflectance logic.
  • Adds Capture.save_capture_as_bands() to meet the original intent. This includes output data type handling, and simplified logic depending on whether user passes 'radiance' or 'reflectance' value.
  • Update `Capture.save_capture_as_stack() to also accept the new output data type handling.
  • Update ImageSet to accomodate output data type parameter. Also update img_type to positional argument to match Capture usage. Some docstring improvements.

…_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.
@and-viceversa
Copy link
Contributor Author

This may close #121 and the final requirements for #77.

@poynting poynting merged commit eaed830 into micasense:reconcile-save-capture-110 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants