This file is indexed.

/usr/share/psychtoolbox-3/PsychTests/ResolutionTest.m is in psychtoolbox-3-common 3.0.11.20140816.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
function ResolutionTest(screenNumbers)
% ResolutionTest prints screen resolutions reported by Screen 'Resolution'
% and 'Resolutions'.
%
% Usage: ResolutionTest([screenNumbers=all]);
%
% On Linux, if a Psychtoolbox screen (=X-Screen) has multiple video outputs
% attached, this function will report both, per output settings and modes and
% the unified resolution of a screen - consisting of virtual resolutions and
% settings formed by all attached outputs. Per-Output settings on Linux can
% be made via Screen('ConfigureDisplay', 'Scanout', screenNumber, outputNumber, ...);
% Screen('Resolution', screenNumber, ...); only affects or reports the unified
% "virtual resolution" of a whole X-Screen, not of its individual outputs.
%
% Also see SetResolution, NearestResolution, and Screen Resolution and Resolutions.
%

% 1/27/00 dgp Wrote it.
% 9/17/01 dgp Added "recommended" to the report.
% 4/24/02 awi Exit on PC with message.
% 10/7/12 mk  Clean it up. Output refresh rates an pixelsize as well.
% 04/15/14 mk Handle multiple video outputs per screen on Linux.

if nargin < 1 || isempty(screenNumbers)
    screenNumbers = Screen('Screens');
end

% Test every screen
for screenNumber = screenNumbers
    % Reject non-existent screens:
    if ~ismember(screenNumber, Screen('Screens'))
        continue;
    end
    
    % Get number of video outputs per screen. Always 1 on non-Linux:
    numOutputs = Screen('ConfigureDisplay', 'NumberOutputs', screenNumber);
    
    fprintf('\nSCREEN %i: CURRENT COMBINED RESOLUTION:\n', screenNumber);
    res = Screen('Resolution', screenNumber);
    disp(res);
    
    if IsLinux
        for outputId = 0:numOutputs-1
            fprintf('\nSCREEN %i - Output %i: CURRENT RESOLUTION:\n', screenNumber, outputId);
            disp(Screen('ConfigureDisplay', 'Scanout', screenNumber, outputId));
        end
        fprintf('\n');
    end
    
    fprintf('\nSCREEN %i: AVAILABLE COMBINED RESOLUTIONS:\n', screenNumber);
    res = Screen('Resolutions', screenNumber);
    oldres = '';
    
    for i=1:length(res)
        resname = sprintf('%dx%d ', res(i).width, res(i).height);
        if isempty(strfind(oldres, resname))
            oldres = [oldres resname]; %#ok<*AGROW>
            fprintf('%d x %d\n', res(i).width, res(i).height);
        end
    end
    
    fprintf('\nSCREEN %i: AVAILABLE COMBINED DETAILED RESOLUTIONS:\n', screenNumber);
    res = Screen('Resolutions', screenNumber);
    for i=1:length(res)
        fprintf('%4d x %4d   %3.0f Hz %d ',res(i).width,res(i).height,res(i).hz, res(i).pixelSize);
        fprintf('bits\n');
    end
    fprintf('\n')
    
    if IsLinux
        for outputId = 0:numOutputs-1
            fprintf('\nSCREEN %i - OUTPUT %i: AVAILABLE PER OUTPUT DETAILED RESOLUTIONS:\n', screenNumber, outputId);
            res = Screen('Resolutions', screenNumber, outputId);
            for i=1:length(res)
                fprintf('%4d x %4d   %3.0f Hz %d ',res(i).width,res(i).height,res(i).hz, res(i).pixelSize);
                fprintf('bits\n');
            end
            fprintf('\n');
        end
        fprintf('\n');
    end
end