-
-
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 to data registry. #5308
Add new illuminants to data registry. #5308
Conversation
Hello @mkcor! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-04-19 15:27:28 UTC |
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 looks good, thanks for helping get everything working with Pooch @mkcor. It looks like @BierretA is still be credited here as well, so that is good.
There is one other suggestion in #5223 about allowing user-supplied observer and illuminants. I think we can merge this PR as is now and close #5223, but then open a new feature request issue just for that idea so it doesn't get lost.
Co-authored-by: Antoine Bierret <antoine.bierret@fizeau.fr>
Co-authored-by: Antoine Bierret <antoine.bierret@fizeau.fr>
Sure, then I need to document it (#5277).
Yes! I cherry-picked what I could from #5234 and also used Git's I don't know whether @BierretA would endorse my choice, but I didn't want duplicate files in our data registry: Actually, I caught it for
Thanks for pointing this out, I didn't have it in mind. Sounds good! |
Hello @mkcor ,
I completely agree with your your modifications, avoiding duplicate files is better. What you did for luv array tests is good, and the same should be done for lab array tests. |
Hi @BierretA!
Very good, so I'll update the Still, does it make sense to have built-in duplicates, I mean in the illuminants' definition? It looks like we should edit |
Ok, illuminant E gives equal weight to all wavelengths by definition, so its tristimulus values I haven't found a reference for it, but I imagine that, for illuminant D75, the R observer happens to be the standard observer. |
Ok, now I'm slightly more familiar with the world of illuminants, I'm at peace with this PR |
Illuminants A, B, C and E in R were indeed defined to be the same as the illuminants with a 2° observer. Unfortunately, the information is not clear in the R-documentation can only be found in the source code (it used to be accessible from https://www.rdocumentation.org/packages/grDevices/versions/3.6.2, but it looks like it was recently changed?). The value for illuminant D75 is missing in R. I added it here to keep the keys as '2', '10', and 'R' for every illuminant (I chose the same value as the 2° observer, like illuminants A/B/C/E). If having different keys only for D75 is not a problem, this should be removed. |
Thank you, @BierretA! I sort of wrapped my head around these illuminants and I'm enjoying the learning process.
Either approach makes sense, but I like it this way. It's a 'natural' extension, I would say.
Ok, good to know: They are defined to be the same in terms of tristimulus values Now, I have to look into the failing CI tests... 😅 |
Yes. And actually, we can remove them (for illuminants A, B and C) and update the tests accordingly. I made the modifications on my fork but I cannot push it directly here? |
Hi @BierretA, Thank you so much for your responsiveness!
That's because 'here' is my branch, so it's expected that you wouldn't have write (push) permission on it. I would suggest that we @grlee77 @hmaarrfk merge this current PR first; even if further cleanup can be made, it makes sense and it's formally consistent as is. Then you @BierretA can submit a PR with the additional cleanup.
Ok, the illuminants are the same by definition, but array([[[ 53.23288, 62.2834 , 43.65972]],
[[ 0. , 0. , 0. ]],
[[ 100. , -23.54141, -90.37643]],
[[ 32.30259, 65.6623 , -194.2238 ]],
[[ 46.22836, -61.89611, 23.96719]]]) is 'different' from array([[[ 53.23288179, 62.27968785, 43.66165206]],
[[ 0. , 0. , 0. ]],
[[ 100. , -23.54631417, -90.36903339]],
[[ 32.30258667, 65.65947843, -194.21673374]],
[[ 46.22835703, -61.89823312, 23.96931025]]]) because it uses fewer decimals. In your cleanup PR, would you be able to replace the new R illuminants with their double-precision version? This could also be a third, separate PR, no stress. PS: Failing CI tests were unrelated and have been fixed in the meantime. |
Sure. I will wait for this PR to be merged and make a new one. |
remove use of fetch from colorconv tests corresponds to scikit-image/scikit-image#5308
remove use of fetch from colorconv tests corresponds to scikit-image/scikit-image#5308
Description
This PR is a follow-up on #5276, replacing #5234 by breaking it down into sequential PRs which pass CI.
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
.