-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompute_lab.m
More file actions
21 lines (20 loc) · 838 Bytes
/
compute_lab.m
File metadata and controls
21 lines (20 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function [labmasterP, labnoiseP] = compute_lab(specmaster, specnoised, copies)
spec_coeff = 100;
labmasterP = zeros(3,1269*copies); % for performance
labnoiseP = zeros(3,1269*copies); % for performance
chunksize = 2500;
chunkstart = 1;
chunkend = 1;
chunkstop = false;
while not(chunkstop)
if(chunkstart + chunksize > 1269*copies)
chunkend = chunkstart+ 1269*copies - chunkstart;
chunkstop = true;
else
chunkend = chunkstart + chunksize;
end
labmasterP(:,chunkstart:chunkend) = roo2lab(specmaster(:,chunkstart:chunkend)'.*spec_coeff, 'D65/2', 380:1:800)';
labnoiseP(:,chunkstart:chunkend) = roo2lab(specnoised(:,chunkstart:chunkend)'.*spec_coeff, 'D65/2', 380:1:800)';
chunkstart = chunkstart + chunksize;
end
end