BrainardLab / OneLightToolbox

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

OLPrimaryToSettings handles out of bounds primaries #13

Closed JorisVincent closed 6 years ago

JorisVincent commented 6 years ago

Primaries should be in the [0-1] range. OLPrimaryToSettings returns settings for primaries that are outside this range: a primary of 1s returns settings of 1, a primary of 2s also returns settings of 1, and a primary of -1s returns settings of 0.

I propose that instead, it should check and throw an error if primary values are out of range -- the user should be aware (and held accountable) that they are asking impossible things.

[NOTE: OLSettingsToStartsStops does check that settings are in the [0-1] range]

DavidBrainard commented 6 years ago

JV and I added key/value pair to enable this checking, and set it to true.