Skip to content
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

Merged
merged 2 commits into from
Mar 13, 2018
Merged

PR: Simulation of CVD - Machado (2009) #192

merged 2 commits into from
Mar 13, 2018

Conversation

KelSolaar
Copy link
Member

@KelSolaar KelSolaar commented Jul 13, 2015

References #64.

@landscape-bot
Copy link

Code Health
Repository health increased by 0.01% when pulling eec76cb on feature/cvd into 66d797b on develop.

return dot_matrix(np.linalg.inv(M_n), M_a)


def cvd_matrix_Machado2010(deficiency, severity):
Copy link
Member Author

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.

@coveralls
Copy link

coveralls commented Jul 2, 2016

Coverage Status

Coverage decreased (-0.01%) to 97.983% when pulling 9f7e3f7557c83c5c33e12b342a46097ab0bf51b5 on feature/cvd into 3933191 on develop.

@coveralls
Copy link

coveralls commented Jul 3, 2016

Coverage Status

Coverage decreased (-0.01%) to 97.983% when pulling 835169e0cc367597e6506d4ba333edc88ed5f730 on feature/cvd into 3933191 on develop.

@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Coverage increased (+0.01%) to 97.776% when pulling dca90c2 on feature/cvd into 0df6ebe on develop.

@KelSolaar KelSolaar changed the title PR: Simulation of CVD - Machado (2010) PR: Simulation of CVD - Machado (2009) Feb 26, 2018
@KelSolaar KelSolaar force-pushed the feature/cvd branch 2 times, most recently from 2a43037 to dc9ce3a Compare February 26, 2018 12:12
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@colour-science colour-science deleted a comment Feb 26, 2018
@KelSolaar KelSolaar force-pushed the feature/cvd branch 2 times, most recently from ee7a934 to a1fc62a Compare February 26, 2018 19:20
@KelSolaar
Copy link
Member Author

KelSolaar commented Mar 6, 2018

@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')

image

In the light of this comment in the paper, I think we should be fine:

Since there are no strong biological explanations yet to justify the causes of tritanopia
and tritanomaly, tritanomaly is simulated based on the shift paradigm only (Equation 4.19) as an approximation to the actual phenomenon and restrain the proposed model from try- ing to model tritanopia. Likewise, simulation of monochromacy (either rod or cone) is not supported by this model. One should note, however, that the conditions covered by the proposed model (i.e., anomalous trichromacy and dichromacy) correspond to approximately 99.96% of all CVD cases (RIGDEN, 1999; SHARPE et al., 1999).

I'll add a warning in that regard in our implementation.

What do you think?

@colour-science colour-science deleted a comment Mar 6, 2018
@colour-science colour-science deleted a comment Mar 6, 2018
Copy link
Member

@MichaelMauderer MichaelMauderer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good then!

@KelSolaar KelSolaar merged commit 423f01e into develop Mar 13, 2018
@KelSolaar
Copy link
Member Author

Thanks @MichaelMauderer!

2.5 years in the making :)

@KelSolaar KelSolaar deleted the feature/cvd branch April 19, 2018 09:26
@KelSolaar KelSolaar added this to the v0.3.6 milestone Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants