Change constants to represent 2:1 assumed L:M ratio.

Signed-off-by: David Brainard <brainard@psych.upenn.edu>
New MATLAB class, @CalStruct, for unified access of different cal files, and updates in PsychCal and PsychDemos functions.

This is a major update to the underlying routines that handle and compute on the PTB calibration structure.  The purpose of this was to allow us to work with a more rational underlying organization of the fields of the structure, some of which dated back to Matlab 4 which did not support multidimensional arrays (and hence packed in multidimensional data into 2D matrices in a manner that was hard to read).

To accomplish this change, we added a new MATLAB class named @CalStruct for unified data access across old- and new-style cal structures. @CalStruct objects offer two benefits: (1) they enable PsychCal functions to operate seamlessly across both old-style and new-style cal files, and (2) they reduce communication overhead by passing a reference to the cal struct data, as opposed to passing the cal struct data itself, which is what the PsychCal functions used to do.

Old-style cal files are still generated by existing calibration code such as the CalibrateMonSpd.m script provided in the PTB as well as perhaps in custom code written in individual labs.  These should continue to work as before, as we have updated all of the routines in the PTB that access calibration structures to do so transparently (see list below).  Compared to old-style cal files, new-style cal structs offer a more streamlined and cleaner data layout.

Nothing in the PTB currently generates a new-style calibration file.  The Brainard Lab  is developing object oriented calibration code (which will allow the calibration engine to work more flexibly with different measurement instruments and display code.  This newer code does generate new-style cal structures.  The changes to the PTB we're making here are to support this effort.  If you want to look at, use, or contribute to the development of the new calibration code, it is available (in a semi-stable state) from the BrainardLabToolbox repository on gitHub (https://github.com/DavidBrainard/BrainardLabToolbox/OOCalibrationToolbox).  As with the PTB, the BrainardLabToolbox is freely available under an open source license. As this new code becomes more stable, we may move it into the PTB.

We have updated the following PsychCal functions to seamlessly access (new- and old-style) calibration data via @CalStruct objects:
PrimaryToSettings.m
CalibrateFitGamma.m
RefitCalGamma.m
CalibrateFitLinMod.m
RefitCalLinMod.m
CalibrateFitYoked.m
RefitCalYoked.m
CalibratePlotAmbient.m
SensorToPrimary.m
CalibratePlotGamma.m
SensorToSettings.m
CalibratePlotSpectra.m
SensorToSettingsAcc.m
CompareMonCal.m
SetGammaMethod.m
DescribeMonCal.m
SetSensorColorSpace.m
DropCalBits.m
SettingsToPrimary.m
GamutToSettings.m
SettingsToSensor.m
ObjectToHandleCalOrCalStruct.m
SettingsToSensorAcc.m
PrimaryToGamut.m
UpdateAmbient.m
PrimaryToSensor.m
UpdateAmbientSensor.m

We have also updated the following PsychDemos functions to seamlessly access (new- and old-style) calibration data via @CalStruct objects:
CalDemo
IsomerizationsInEyeDemo.m

We tested these routines locally quite intensively to do our best to ensure that they operate the same as previously when provided with old calibration structures and that they produce the same results when provided with new calibration structures.  If, however, you discover a problem or find some routine lurking in the PTB that we failed to update, please let us know and we will try to fix rapidly.

David Brainard (brainard@psych.upenn.edu)
Nicolas Cottaris (cottaris@sas.uenn.edu)

Signed-off-by: David Brainard <brainard@psych.upenn.edu>