This file is indexed.

/usr/share/psychtoolbox-3/PsychCal/GamutToSettings.m is in psychtoolbox-3-common 3.0.9+svn2579.dfsg1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function settings = GamutToSettings(cal, gamut)
% settings = GamutToSettings(cal, gamut)
%
% Find the best integer device settings to produce
% the passed linear device coordinates.
% 
% The passed coordinates should be in the range [0,1].
% The returned settings also run from [0,1], but after
% inversion of the device's gamma measurements.
%
% The returned argument values is what you actually should
% get after quantization error.
%
% 9/26/93    dhb   Added calData argument.
% 10/19/93   dhb   Allow gamma table dimensions to exceed device settings.
% 11/11/93   dhb   Update for new calData routines.
% 8/4/96     dhb   Update for stuff bag routines.
% 8/21/97    dhb   Update for structures.
% 4/13/02	 awi   Replaced SettingsToDevice with new name SettingsToPrimary.
% 11/16/06   dhb   Adjust for [0,1] world.  Involves changing what's passed
%                  in and out

% Error checking
if isempty(cal.gammaTable)
	error('No gamma table present in calibration structure');
end
if isempty(cal.gammaMode)
	error('SetGammaMethod has not been called on calibration structure');
end

if cal.gammaMode == 0
	settings = GamutToSettingsSch(cal.gammaInput, cal.gammaTable, gamut);
elseif cal.gammaMode == 1
	%iGammaTable = cal.iGammaTable;
	if isempty(cal.iGammaTable)
		error('Inverse gamma table not present for gammaMode == 1');
	end
	settings = GamutToSettingsTbl(cal.iGammaTable, gamut);
else
	error('Requested gamma inversion mode %g is not yet implemented', cal.gammaMode);
end