Handle one, two, empty and out-of-range ENVI default bands - #2001
Draft
AbhinavMir wants to merge 1 commit into
Draft
Handle one, two, empty and out-of-range ENVI default bands#2001AbhinavMir wants to merge 1 commit into
AbhinavMir wants to merge 1 commit into
Conversation
The ENVI standard allows the default bands field of a header file to hold one band number for a grayscale image, or three band numbers for an RGB image. _make_pseudo_rgb always read three values from the field, so a header with one or two default bands raised an IndexError, and an empty field raised a ValueError. Repeat a single default band in each channel to make a grayscale pseudo-RGB image. Treat an empty default bands field as if the field is absent, so the bands come from the available wavelengths. Raise a PlantCV error for any other number of default bands. A band number that is not in the datacube also raised an IndexError from numpy. Check the band numbers against the size of the band axis and raise a PlantCV error that names the bands and the size of the cube.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | Aug 29, 2026 5:25p.m. | Review ↗ | |
| Code coverage | Aug 29, 2026 5:55p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
AbhinavMir
marked this pull request as ready for review
August 29, 2026 23:02
AbhinavMir
marked this pull request as draft
August 29, 2026 23:03
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.
#1007