source: ETALON/SPESO/SPESO_Polariz/Oscil/CoolDay.m @ 735

Last change on this file since 735 was 735, checked in by hodnevuc, 7 years ago
File size: 820 bytes
Line 
1function 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
7beamInfo=0;
8 end
9 
10if (~exist(['Data_' date_var '.mat'],'file'))
11directory=[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)
17file=['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
28save(['Data_' date_var '.mat'], 'Amp', 'Base', 'Brms','hour','beamInfo')
29end
Note: See TracBrowser for help on using the repository browser.