-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildLightDST.m
executable file
·62 lines (52 loc) · 1.7 KB
/
BuildLightDST.m
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
function [] = BuildLightDST(nrun)
% Remove signals from DSTs to make them lighter
% OMH 11/06/2013
SharedGlobals;
%% Get number of ub dsts
stopflag=0;
nbiter=1;
while stopflag==0
filename = [DST_PATH sprintf('dst%d_%d.mat',nrun,nbiter)];
fd=fopen(filename);
if fd~=-1
nbiter=nbiter+1;
fclose(fd);
else
stopflag=1;
end;
end;
nbiter=nbiter-1;
if nbiter==0
display(sprintf('No dst found for run %d',nrun))
end;
%% Loop on sub dsts
for j=1:nbiter
filename = [DST_PATH sprintf('dst%d_%d.mat',nrun,j)];
display(sprintf('Loading dst%d_%d.mat ...',nrun,j))
dst = load(filename);
disp 'Done.'
dst.Struct.Coinc.Det.Data3Scints = {};
dst.Struct.Coinc.Det.CalibratedAmp1 = [];
dst.Struct.Coinc.Det.CalibratedAmp2 = [];
dst.Struct.Coinc.Det.CoefCor = [];
dst.Struct.Coinc.Det.TriggerRate = [];
dst.Struct.Coinc.Det.FiltResult = [];
dst.Struct.Coinc.Det.TrigTime = [];
%dst.Struct.Coinc.Det.Sigma = [];
%dst.Struct.Coinc.Det.AmpMax = [];
dst.Struct.Coinc.Det.MinRaw = [];
dst.Struct.Coinc.Det.MaxRaw = [];
dst.Struct.Setup.InfosRun.DetCoincRateRaw = [];
dst.Struct.Setup.InfosRun.TrigRate = [];
dst.Struct.Coinc.ShowerRecons = {};
dst.Struct.Coinc.Candidates = {};
dst.Struct.Coinc.PlanRecons.Sci = {};
dst.Struct.Coinc.PlanRecons.Hybrid = {};
%dst.Struct.Coinc.SphRecons.DistSource = [];
%dst.Struct.Coinc.DelayCorrRecons = {};
dst.Struct.Coinc.PlanRecons = {};
dst.Struct.Coinc.SphRecons = {};
filename = [DST_PATH sprintf('dst%d_%d_light.mat',nrun,j)];
Struct = dst.Struct;
save(filename,'Struct');
end