Merge pull request #101 from kleinerm/master

Pull development snapshot for color space and gpgpu stuff.

* First batch of color space conversion stuff.
* First batch of GPUmat/CUDA GPGPU stuff.
* ColorCal for Octave support.
* Use of thread-type parameter for GStreamers multi-threaded video decode.
* Various fixes and improvements, but not compiled for all platforms.

Both are unfinished wip, just for alpha-testers.
Replace deprecated str2mat() by char() in some M-Files.

Unsupported by stock Octave-3.6.2, deprecated by Matlab.
-> Makes RenderDemo work on Octave.
Screen/Linux: Fix missing glibconfig.h on some 64-Bit builds.

Building on Ubuntu 12.10 with 64-Bit Octave/Matlab results in
complaints about missing glibconfig.h, because it is no longer
stored in the i386-linux-gnu subfolder, but the x86_64-linux-gnu
subfolder. Makes sense for a 64-Bit build.

Add an extra include for that path, so gcc looks in both locations.
-> Screen for 64-Bit Octave rebuilt and tested.
Screen/Linux: Fix most compiler warnings.

Except the ones we can't avoid due to backwards compat needs.
Screen/Linux: Remove nouveau boilerplate warning.

Nouveau, as of version 1.0.0, released 18th June 2012, is
no longer a hazard for visual stimulus timing. It should
provide accurate/robust stimulus onset timing. Stimulus
onset timestamping should be reliable and robust. Accuracy
of onset timestamps is still not as great as it could be
due to lack of high precision support in the nouveau-kms
kernel driver as of Linux 3.9, februrary 2013. However,
accuracy is comparable to what other vision science toolkits
would achieve and good enough for light to medium precision
needs, about 1 msec. Usercode can switch to high precision
by using Screen('Preference','VBLTimestampingmode', 1); if
needed. This (plus the usual amount of tinkering with display
mappings on non-standard display setups) would use the
high-precision beamposition timestamping as with the
proprietary NVidia binary blob.

Anyway, do away with the warning boilerplate, it is no
longer justified.
Attach thread input in MATLAB 2012b

In MATLAB 2012b, the main window is named "MATLAB R2012b", with only a
single space.
Adding a PR-705 toolbox to PTB-3
Added two utility routines from BrainardLabToolbox

GetSVNInfo -- returns SVN version number of directory or file.  Useful
for recording state of software at time an experiment or calculation
was done.

BasicToneMapCalFormat -- very simple tone mapping.

I moved both of these to PTB because a) they might be generally useful
and b) so that RenderToolbox3 users don't need to get the
BrainardLabToolbox.

DHB
Fix type of filename in PsychColorimetricMatFiles Contents.m
Updates to radiometry and addition of light limit calculations

a) Created subdirectory PsychRadiometric within PsychColorimetric.
Moved a few purely radiometric calculations into this subdir, and added
several new ones.  I expect a few more additions and a bit of cleaning
up of routine naming and calling conventions will happen over the next
little while, as I am doing a lot of these calculations these days.
It is possible that this should get moved to the top PTB level at some
point.  It is also possible that the calculations involving units like
trolands should go into here.  I will think about this.

b) Added PsychAnsiZ131MPE to PsychColorimetric.  This is an
implementation of ANSI Z136.1-2007, which is a standard that specifies
how much light is safe to expose people to.  I would call this an alpha
implementation at this point.  The standard document is very complex
and I am still getting my head around it.  Putting it into PTB should
be useful for others and I am hoping to get some experts to check the
calculations.  I put a note in the Contents.m as to the provisional
status of this implementation.  It is possible that this should go
under PsychRadiometric, and I may move it there soon.

c) Added a few one liners that convert between degrees and milliradians
(the ANSE standard works in milliradians, but my intutions are in
degrees).

d) Updated various Contents.m files to reflect the above changes.

DHB
Fixing a redundancy when using a Keyspan USB-serial adapter

Keyserial1 is an alias to the first port on your Keyspan adapter
(regardless if it's single- or multi-port). USA19* is a prefix to the
raw port on a single-port adapter. Therefore it's redundant to have
both in PortDB. In fact it's an error when FindSerialPort finds > 1
match by default.
Reorganizing radiometric and colorimetric calculations.  And adding test scripts

Moved PsychRadiometric to top level of toolbox (out of
PsychColorimetric). Put the ANSI Z36 routines into the Radiometric
folder, as well as other radiometric routines that were in the
colorimetric folder.  Starting working on radiometric test routines to
validate some of the computations.  Updated the relevant Contents.m
files.

This is work in progress.

But it should not break anything that used to work as long as path is
reset given new PTB organization.

DHB
Working on radiometric/colorimetric tests

Added PTBAndVSETColorimetryTest, and cleaned it up a little.  Passes
all tests with current version of VSET from gitHub and this version of
PTB.

Working on RadiometricBasicTest.

Added RetIrradianceToRadiance conversion routine.

Internal improvements to variable names in RadianceToRetIrradiance.

DHB
Continue working on radiometric and MPE tests.

Also modified EyeLength to make it a bit more flexible.

DHB
Rearrangement of some radiometric routines, documenting and improving tests.

The test programs are now in pretty good shape.  I don't get complete
agreement with the calculations made by Francois' Delori's spreadsheet.
 It may be that the 2000 version of the standard differs enough from
the 2007 standard that the divergence is not actually error.  Am trying
to consult with Delori and other experts to track this down.

Added cautionary notes throughout the MPE computation routines, and in
particular that we recommend checking calculations independently before
shining bright lights into subjects eyes.

Will continue to chip away at this stuff, and to try to rationalize the
routines somewhat.
Rationalizing routine names of some recently added functions.

Still in progress, but I don't think I broke anything.
Added spectral data file

This is a measurement made in my office of direct sunlight coming
through the window and onto a piece of paper towel on the floor.  Power
is in Watts/[m2-nm-wlband].
Minor bug fix to AnsiZ136 test program.
More rationalizing of radiometric calculations

Goal is to separate radiometric conversion from unit conversions within
radiometric types.  These were mixed and matched in older routines.
Have kept the older calling forms in a subdir named Obsolete, and made
those older versions call through the newer code.

This is a work in progress, but should break nothing.
Merge pull request #102 from simonster/2012b-input-thread

Attach thread input in MATLAB 2012b