-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_camera_config.m
More file actions
executable file
·120 lines (116 loc) · 5.06 KB
/
Copy pathload_camera_config.m
File metadata and controls
executable file
·120 lines (116 loc) · 5.06 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
% Load camera config
function camera_struc = load_camera_config(camera_name)
% NOTE: NOISE on every camera needs to be checked.
% Note: Verifying the zero GeV_pixel is up to the user
camera_struc.name = camera_name;
% default camera settings
% NOTE: these may change as better default values are determined
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.rotate_noise = 0;
camera_struc.noise_region = 'top';
camera_struc.sample_vert_width = 200;
camera_struc.sample_horiz_width = 200;
camera_struc.rotate_image = 0;
switch camera_name
case 'CMOS_FAR'
% camera_struc.zero_Gev_px=890; % for Apr 6
camera_struc.zero_Gev_px = 902; % for Apr 6, 1232* series
% camera_struc.zero_Gev_px=149; % for Apr 6, QSBend -16
% camera_struc.zero_Gev_px=241; % for Apr 6, QSBend -14
% camera_struc.zero_Gev_px=365; % for Apr 6, QSBend -12
% camera_struc.zero_Gev_px=434; % for Apr 6, QSBend -10
% camera_struc.zero_Gev_px=530; % for Apr 6, QSBend -8
% camera_struc.zero_Gev_px=414; % for Apr 6 half bend
% camera_struc.zero_Gev_px=979; % for May 26+
% camera_struc.zero_Gev_px=983; % for June 1, 13123
% camera_struc.zero_Gev_px=965; % for June 25, 13123
% camera_struc.zero_Gev_px=935; % for Feb 2015
% camera_struc.zero_Gev_px=966;
camera_struc.default_ROI_Y = 0;
% dipole_bend is the bend of the dipole compared to normal. Normal
% bend is defined as 1, half bend is 0.5, etc
% dipole_bend = 0.5; % for data between 12414 and 12422
camera_struc.dipole_bend = 1;
% dipole_bend = (20.35 - 14) / 20.35;
% camera_struc.energy_camera = 1;
camera_struc.energy_camera = 1;
camera_struc.y_label_text = 'Energy (GeV)';
camera_struc.rotate_image = 1;
camera_struc.rotate_noise = 0;
camera_struc.sample_vert_width = 400;
camera_struc.sample_horiz_width = 100;
camera_struc.noise_region = 'top';
case 'CMOS_NEAR'
% camera_struc.zero_Gev_px = 965; % for June 25, 13123
camera_struc.zero_Gev_px = 1020;
camera_struc.default_ROI_Y = 0;
camera_struc.dipole_bend = 1;
camera_struc.rotate_image = 0;
camera_struc.energy_camera = 1;
camera_struc.y_label_text = 'Enegy (GeV)';
camera_struc.rotate_noise = 0;
camera_struc.sample_vert_width = 300;
camera_struc.sample_horiz_width = 300;
camera_struc.noise_region = 'bottom';
case 'ELANEX'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = 'Enegy (GeV)';
camera_struc.rotate_noise = 0;
case 'CMOS_WLAN'
camera_struc.energy_camera = 1;
camera_struc.zero_Gev_px = 282;
camera_struc.default_ROI_Y = 474;
camera_struc.dipole_bend = 1;
camera_struc.y_label_text = 'Enegy (GeV)';
camera_struc.rotate_noise = 0;
camera_struc.rotate_image = 0;
% camera_struc.sample_vert_width = 300;
% camera_struc.sample_horiz_width = 200;
camera_struc.sample_vert_width = 200;
camera_struc.sample_horiz_width = 100;
camera_struc.noise_region = 'bottom';
case 'SYAG'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.curr_lim = [0 1000]; % for SYAG
% Too lazy to write a program for horizontal lineout. Much easier to
% rotate the image and noise together by 90 degrees!
camera_struc.rotate_image = 1;
camera_struc.rotate_noise = 1;
case 'E224_Probe'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.curr_lim = [0 1000];
camera_struc.rotate_noise = 0;
case 'CMOS_ELAN'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.curr_lim = [0 1000];
camera_struc.rotate_noise = 0;
camera_struc.rotate_image = 1;
camera_struc.sample_vert_width = 300;
camera_struc.sample_horiz_width = 300;
camera_struc.noise_region = 'bottom';
case 'BETAL'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.curr_lim = [0 1000];
camera_struc.rotate_noise = 0;
camera_struc.rotate_image = 0;
camera_struc.sample_vert_width = 200;
camera_struc.sample_horiz_width = 200;
camera_struc.noise_region = 'bottom';
case 'AX_IMG1'
camera_struc.energy_camera = 0;
camera_struc.y_label_text = '';
camera_struc.curr_lim = [0 1000];
camera_struc.rotate_noise = 0;
camera_struc.rotate_image = 0;
otherwise
% warn user that default settings are being used
uiwait(msgbox(sprintf(['No explicit settings for camera %s. ' ...
'Default values will be used instead.'], camera_name)));
% warning('No explicit settings for camera %s; using default values', ...
% camera_name);
end