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

« back to all changes in this revision

Viewing changes to Psychtoolbox/PsychColorimetricData/PhotoreceptorDimensions.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:
31
31
% Supported sources:
32
32
%   Rodeick (Default).
33
33
%       CVRL (Human Cone OS length)
 
34
%   Webvision (Human Cone IS diameter)
34
35
%   Hendrickson (Human Rod OS length)
35
36
%       SterlingLab (GuineaPig dimensions).
36
 
%   Generic.
 
37
%   Generic
37
38
%   PennDog (Dog dimensions).
 
39
%   None (returns empty for the corresponding value)
38
40
%
39
41
% The Generic type returns a single number for all species/type.
40
42
%
41
43
% 7/11/03  dhb  Wrote it.
42
44
% 12/04/07 dhb  Added dog but with placeholder numbers.
 
45
% 8/9/13   dhb  Comment clean up, allow 'None' to return empty as the value.
 
46
% 8/10/13  dhb  Added Webvision source for IS diameter.
43
47
 
44
48
% Fill in defaults
45
49
if (nargin < 3 || isempty(species))
49
53
    source = 'Rodieck';
50
54
end
51
55
 
52
 
% Fill in specific density according to specified source
 
56
% Fill in dimensions according to specified source
53
57
if (iscell(receptorTypes))
54
58
    dimensions = zeros(length(receptorTypes),1);
55
59
else
65
69
    end
66
70
 
67
71
    switch (source)
 
72
        case {'None'}
 
73
            dimensions = [];
68
74
        case {'Generic'}
 
75
            % These are fairly generic dimensions
69
76
            switch (whichDimension)
70
77
                case 'OSlength'
71
78
                    dimensions(i) = 32;
75
82
                    dimensions(i) = 2;
76
83
                otherwise
77
84
                    error('Unsupported dimension requested');
 
85
            end 
 
86
        case {'Webvision'}
 
87
            % http://webvision.med.utah.edu
 
88
            switch (whichDimension)
 
89
                case 'ISdiam'
 
90
                    switch (type)
 
91
                        % http://webvision.med.utah.edu/book/part-ii-anatomy-and-physiology-of-the-retina/photoreceptors/
 
92
                        % Attributed to Helga Kolb
 
93
                        case {'FovealLCone', 'FovealMCone' 'FovealSCone'}
 
94
                            dimensions(i) = 1.5;
 
95
                        case {'LCone', 'MCone' 'SCone'}
 
96
                            dimensions(i) = 6;
 
97
                        case {'Rod'}
 
98
                            dimensions(i) = 2;
 
99
                        otherwise,
 
100
                            error(sprintf('Unsupported receptor type %s/%s for %s estimates in %s',...
 
101
                                type,whichDimension,source,species));
 
102
                    end
 
103
                otherwise
 
104
                    error('Unsupported dimension requested');
78
105
            end
79
 
 
 
106
        case ('PennDog')
80
107
            % Numbers we use for dog eyes at Penn.  Got these from
81
108
            % Gus Aguirre.  See emails sent about 12/5/07.
82
 
        case ('PennDog')
83
109
            switch (species)
84
110
                case {'Dog'}
85
111
                    switch (whichDimension)
119
145
                otherwise,
120
146
                    error(sprintf('%s estimates not available for species %s',source,species));
121
147
            end
122
 
 
 
148
     
 
149
        case ('Rodieck')
123
150
            % From Rodieck's "standard observer", Appendix B
124
151
            % in The First Steps of Seeing.
125
 
        case ('Rodieck')
126
152
            switch (species)
127
153
                case {'Human'}
128
154
                    switch (whichDimension)
153
179
                    error(sprintf('%s estimates not available for species %s',source,species));
154
180
            end
155
181
 
156
 
 
 
182
        case {'CVRL'}
157
183
            % These numbers are my encapsulations of CVRL's summary of a variety of data.
158
184
            % See CVRL summary text at:
159
185
            %   http://cvrl.ioo.ucl.ac.uk/database/text/intros/introlength.htm.
160
 
        case {'CVRL'}
161
186
            switch (species)
162
187
                case {'Human'}
163
188
                    switch (whichDimension)
181
206
                otherwise,
182
207
                    error(sprintf('%s estimates not available for species %s',source,species));
183
208
            end
184
 
 
 
209
       
 
210
        case {'Hendrickson'}
185
211
            % From Hendrickson and Drucker, numbers provided at CVRL database:
186
212
            % http://cvrl.ioo.ucl.ac.uk/database/text/outseg/length.htm.  40 um
187
213
            % is the number provided for mid-peripheral rods, 40-45 is cited for
188
214
            % parafoveal rods.  This routines returns 40.
189
 
        case {'Hendrickson'}
190
215
            switch (species)
191
216
                case {'Human'}
192
217
                    switch (whichDimension)
205
230
                    error(sprintf('%s estimates not available for species %s',source,species));
206
231
            end
207
232
 
 
233
        case {'SterlingLab'}
208
234
            % These are values that Lu Yin provided, based on unpublished
209
235
            % measurements used in the Sterling lab.
210
 
        case {'SterlingLab'}
211
236
            switch (species)
212
237
                case {'GuineaPig'}
213
238
                    switch (whichDimension)