BrainardLab / OneLightToolbox

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

Double check OLPrimaryToStartsStops #34

Closed DavidBrainard closed 6 years ago

DavidBrainard commented 6 years ago

Joris, I was looking at OLPrimaryToStartsStops.

That code that checks for uniqueness might well be exactly right, but it's got the flavor of code that could get rows and columns reversed. Such a reversal might produce small error in starts stops across primaries, and make things like validation and correction work a little less well than they should.

Can you double check that it's got everything right? Probably OK but worth 10 minutes of direct verification (which perhaps the example code does.)

Start with the version in the lightfluxoptim branch, as I did a bunch of arg homogenization and comment cleaning on that branch just now.

JorisVincent commented 6 years ago

The second and third example in OLPrimaryToStartsStops explicitly compare converting large (n = 4000) matrices of primary values using the both the fast OLPrimaryToStartsStops and the slower OLPrimaryToSettings to OLSettingsToStartsStops. All come out identical.