~ubuntu-branches/ubuntu/trusty/psychtoolbox-3/trusty-proposed

« back to all changes in this revision

Viewing changes to Psychtoolbox/PsychColorimetric/AbsorbanceToAbsorbtance.m

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-11-19 23:34:50 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20131119233450-f7nf92vb8qavjmk8
Tags: 3.0.11.20131017.dfsg1-3
Upload to unsable since fresh glew has arrived to sid!

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
%
16
16
% Equation: absorbtanceSpectra = 1 - 10.^(-OD * absorbanceSpectra)
17
17
%
18
 
% Multiple spectra may be passed in the columns of absorbanceSpectra.  If
 
18
% Multiple spectra may be passed in the rows of absorbanceSpectra.  If
19
19
% so, then the same number of densities should be passed in the vector
20
 
% axialOpticalDensities, and multiple answers are returned in the columns
 
20
% axialOpticalDensities, and multiple answers are returned in the rows
21
21
% of absorbtanceSpectra.
22
22
%
23
23
% Wavelength information may be in any of the available Psychtoolbox representations,
28
28
% 06/12/03 lyin         Change the way variable being passed
29
29
% 06/23/03 dhb          Check dimensions of spectra and density.
30
30
% 06/30/03 dhb      Change to toolbox convention, put sensitivity like stuff in rows.
 
31
% 08/11/13 dhb      Fix comment to reflect row convention change made in 2003.  Slowly but surely we fix things up.
31
32
 
32
33
% Check that dimensions match properly
33
34
if (size(absorbanceSpectra,1) ~= length(axialOpticalDensities))
34
35
        error('Number of spectra does not match number of densities');
35
36
end
36
 
%       Equation: absorbtanceSpectra = 1 - 10.^(-OD * absorbanceSpectra)
 
37
 
 
38
% Equation: absorbtanceSpectra = 1 - 10.^(-OD * absorbanceSpectra)
37
39
absorbtanceSpectra = 1 - 10.^(-diag(axialOpticalDensities)*absorbanceSpectra);
38
40
 
39
41
% Wls of absorbtanceSpectra