-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
PR: Simulation of CVD - Machado (2009) #192
Conversation
|
colour/blindness/machado2010.py
Outdated
return dot_matrix(np.linalg.inv(M_n), M_a) | ||
|
||
|
||
def cvd_matrix_Machado2010(deficiency, severity): |
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.
I would like to find a better name for that definition, it basically does almost the same job than colour.anomalous_trichromacy_matrix_Machado2010
definition except that it is using the pre-computed matrices from colour.blindness.dataset.machado2010
module.
Coverage decreased (-0.01%) to 97.983% when pulling 9f7e3f7557c83c5c33e12b342a46097ab0bf51b5 on feature/cvd into 3933191 on develop. |
Coverage decreased (-0.01%) to 97.983% when pulling 835169e0cc367597e6506d4ba333edc88ed5f730 on feature/cvd into 3933191 on develop. |
2a43037
to
dc9ce3a
Compare
ee7a934
to
a1fc62a
Compare
@MichaelMauderer : So looking at the pre-generated matrices and the shift we induce for Tritanomaly, it seems to make sense, e.g. a 59nm shift as suggested by the highest value pre-generated matrix: import numpy as np
import colour
from colour.plotting import *
colour_plotting_defaults()
cmfs = colour.LMS_CMFS['Smith & Pokorny 1975 Normal Trichromats']
cmfs_cvd = colour.anomalous_trichromacy_cmfs_Machado2009(cmfs, np.array([0, 0, 59]))
colour.CMFS[cmfs_cvd.name] = cmfs_cvd
multi_cmfs_plot(['Smith & Pokorny 1975 Normal Trichromats', cmfs_cvd.name], legend_location='lower right') In the light of this comment in the paper, I think we should be fine:
I'll add a warning in that regard in our implementation. What do you think? |
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.
Looks good then!
Thanks @MichaelMauderer! 2.5 years in the making :) |
References #64.