-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bugfix/TCL_true_color #161
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #161 +/- ##
==========================================
+ Coverage 79.73% 79.76% +0.03%
==========================================
Files 57 57
Lines 1895 1898 +3
==========================================
+ Hits 1511 1514 +3
Misses 384 384
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
return np.array([red, green, blue, alpha]) | ||
# Ensure GBA values are in [0, 255] range | ||
green = np.clip(green, 0, 255).astype("uint8") |
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.
Do you want to clip red to 255 as well? If not, can you put in a comment on why you don't need to clip it. (For instance, maybe intensity.shape is only a value between 0 and 1, so you know red is already between 0 and 228?)
@@ -99,20 +99,28 @@ def apply_annual_loss_filter( | |||
year <= _end_year - 2000 | |||
) | |||
|
|||
red: ndarray = np.ones(intensity.shape).astype("uint8") * 228 | |||
# Construct RGBA bands with floating point values for precision |
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.
Any chance you can describe in a comment the type of intensity.shape, and what the possible range of its values are? That would also make it clearer why float32 is the right choice for maintaining accuracy (and for instance, why you don't need to use float64).
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: GTC-2916
What is the new behavior?
Does this introduce a breaking change?
Other information