Line | |
---|
1 | function CoolDay(path, date_var)
|
---|
2 |
|
---|
3 | if (exist([path date_var '_scope/beam_info_' date_var '.mat'],'file'))
|
---|
4 | %disp(['Loading beam_info_' date_var '.mat']);
|
---|
5 | load([path date_var '_scope/beam_info_' date_var '.mat']);
|
---|
6 | else
|
---|
7 | beamInfo=0;
|
---|
8 | end
|
---|
9 |
|
---|
10 | if (~exist(['Data_' date_var '.mat'],'file'))
|
---|
11 | directory=[path date_var '_scope/'];
|
---|
12 | listing = dir([directory '*.png']);
|
---|
13 | Filelist={listing.name}';
|
---|
14 | name=char(Filelist(:));
|
---|
15 | hour=name(:,16:21);
|
---|
16 | for c=1:size(hour,1)
|
---|
17 | file=['scope_' date_var '_' hour(c,:) ];
|
---|
18 | try
|
---|
19 | [Amp(c,:),Base(c,:),Brms(c,:)]=takedata([directory file]);
|
---|
20 | catch
|
---|
21 | disp(['Bad try on ' file]);
|
---|
22 | Amp(c,:)=ones([1 3])*1e+6;
|
---|
23 | Base(c,:)=ones([1 3])*1e+6;
|
---|
24 | Brms(c,:)=ones([1 3])*1e+6;
|
---|
25 | end
|
---|
26 | end
|
---|
27 |
|
---|
28 | save(['Data_' date_var '.mat'], 'Amp', 'Base', 'Brms','hour','beamInfo')
|
---|
29 | end
|
---|
Note: See
TracBrowser
for help on using the repository browser.