BrainardLab / OneLightToolbox

Brainard Lab code for talking to our OneLight boxes
MIT License
1 stars 0 forks source link

Hotfix: `OLDirection.SPDdifferentialDesired` would not scale correctly #47

Closed JorisVincent closed 6 years ago

JorisVincent commented 6 years ago

Multiplying a direction by a scalar would correctly scale the differential primary values, but then calculate the SPD differentialDesired from the new primary values. In the case of a corrected direction, where the primary values and SPD are no longer a linear transformation, this would yield an incorrect SPDdifferentialDesired. This fix overwrites the SPDdifferentialDesired of the new, scaled, direction, with a scaled version of the original SPD.

DavidBrainard commented 6 years ago

I accepted this PR. Please alert Harry to the change, on the unlikely possibility that it affects his experiment.