-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 new illuminants #5234
Add new illuminants #5234
Conversation
Hello @BierretA! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
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.
Exciting addition, thanks!
The name of the illuminant (the function is NOT case sensitive). | ||
observer : {"2", "10"}, optional | ||
observer : {"2", "10", "R"}, optional | ||
The aperture angle of the observer. |
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.
The aperture angle of the observer. | |
One of: 2-degree observer, 10-degree observer, or 'R' observer as in | |
R function grDevices::convertColor. |
The name of the illuminant (the function is NOT case sensitive). | ||
observer : {"2", "10"}, optional | ||
observer : {"2", "10", "R"}, optional | ||
The aperture angle of the observer. |
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.
Update here as well, etc.
Unit tests work on my system but not with github actions. |
Hello @BierretA, It definitely looks like an issue with Pooch via GitHub Actions (or vice versa). Tests run fine locally for me as well. Looking into the first failure (
Unsurprisingly, the expected file doesn't live at https://github.com/scikit-image/scikit-image/raw/main/skimage/color/tests/data/ (yet) since I know I didn't run into any issue with Pooch when I added data files (#4939 merged on Sep 2, 2020). Actually, it is the first time (with this PR) we've added files in the data registry since we started running tests with GitHub Actions. Indeed, the time sequence goes like this:
I need to dig deeper to find out how Pooch builds paths, unless someone else at @scikit-image/core knows it right away. Thanks! |
@mkcor This change was recently made—I hope that's not the culprit. |
@stefanv I know, initially I thought about that, but apparently it's a different issue: CI tests initially ran 2 weeks ago, before this change was made, and failed in the same way. Thanks though. |
"color/tests/data/luv_array_d75_10.npy": "e1cc70d56eb6789633d4c2a4059b9533f616a7c8592c9bd342403e41d72f45e4", | ||
"color/tests/data/luv_array_d75_2.npy": "07db3bd59bd89de8e5ff62dad786fe5f4b299133495ba9bea30495b375133a98", | ||
"color/tests/data/luv_array_d75_r.npy": "07db3bd59bd89de8e5ff62dad786fe5f4b299133495ba9bea30495b375133a98", |
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.
hash must be wrong since it's the same as line above
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.
oh ok, files are the same
"color/tests/data/luv_array_d75_10.npy": "e1cc70d56eb6789633d4c2a4059b9533f616a7c8592c9bd342403e41d72f45e4", | ||
"color/tests/data/luv_array_d75_2.npy": "07db3bd59bd89de8e5ff62dad786fe5f4b299133495ba9bea30495b375133a98", | ||
"color/tests/data/luv_array_d75_r.npy": "07db3bd59bd89de8e5ff62dad786fe5f4b299133495ba9bea30495b375133a98", | ||
"color/tests/data/luv_array_e_10.npy": "41b1037d81b267305ffe9e8e97e0affa9fa54b18e60413b01b8f11861cb32213", |
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.
hash must be wrong since it's the same as below
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.
oh ok, files are the same
"color/tests/data/luv_array_e_2.npy": "41b1037d81b267305ffe9e8e97e0affa9fa54b18e60413b01b8f11861cb32213", | ||
"color/tests/data/luv_array_e_r.npy": "41b1037d81b267305ffe9e8e97e0affa9fa54b18e60413b01b8f11861cb32213", |
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.
hash must be wrong since it's the same as above
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.
oh ok, files are the same
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.
This PR looks solid.
The only thing missing is a release note, but we don't have a good place to put them.
i'm not too worried about the failing tests. The data is in the right place, and the registry looks great. Thanks for the addition! and the thoroughness! |
@hmaarrfk this PR needs a little clean-up before merging (wrt I think we can have a clean, linear (sequential) commit history by re-doing the addition of 'new illuminants' from a clean slate, which I have started with #5276. Then, we can document the process as @stefanv suggested, so that each PR (submitted in the proper order) can pass all CI tests. |
I think the commit history cleanup is superfluous. We can squash and merge on our end. No need to push that effort onto @BierretA . The other cleanup is all worthwhile |
Thank you @BierretA! |
Description
This small PR adds new white points for color conversions. See Issue #5223 .
I added illuminants B and C, as well as a new observer compatible with color conversions done with the R language.
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.