[WIP] Breaking Change - Use Update

Folder name is changed, rework the html templates
Change the organisation.
This commit is contained in:
2019-05-10 16:06:43 +02:00
parent 8d8c03773c
commit 6e3677eb29
162 changed files with 3800 additions and 582492 deletions

View File

@@ -3,9 +3,9 @@
%% NOTE
% With this file you can load the raw mat files
%% Description: measure on id31 microstation in exp hutch
% FS: =256Hz
@@ -57,8 +57,8 @@
%%
microstation=['Marble '; 'TY ';'Tilt '; 'Hexapod '];
%
%% PARAMETERS
%
%% PARAMETERS
beamline='ID31 Nanostation - Hammer testing';
% --------------------------------
@@ -68,7 +68,7 @@ ch_max=16;
%mult=1e6/276*173; % --> m/s to micron/s and sensitivity correction for L4-C
nyqhp=2.56; % nyquist
nyqhp=2.56; % nyquist
f_cut=0.5; % cut frequency for high pass filter
t_win=4; % window length in sec
t_ovlp=0; % overlap window in sec
@@ -93,93 +93,93 @@ shock_ch=9;
%% main loop --------
% ------------------
for i=capt
eval(['load Measurement_raw',num2str(i)])
freq_max=Track1_TrueBandWidth;
dts=1/(freq_max*nyqhp);
dts=1/(freq_max*nyqhp);
freq=linspace(0,freq_max,t_win*freq_max);
wo=2*pi*freq;
for k=1:ch_max
vname=['Track',num2str(k)];
array_exist(k)=ismember(vname,who);
end
non_zero=find(array_exist);
for z=non_zero(1):length(non_zero)
track_nb=['Track',num2str(z)]';
eval(['data(:,z)=Track',num2str(z),';']);
track_nb=['Track',num2str(z)]';
eval(['data(:,z)=Track',num2str(z),';']);
end
c=data*mult;
%-------------
nbch=size(c,2);
%-------------
r=length(c);
if r/2~=fix(r/2) % loop to test for odd or even nb of samples
c=c(1:r-1,:); % take only even
else
else
end
%------------------------------
time=linspace(0,length(c)*dts,length(c));
time=linspace(0,length(c)*dts,length(c));
for j=nbch %shunt_ch
[c(:,j),c_shut]=shut_c(c(:,j),1/dts); % correct for shunt
[c(:,j),c_shut]=shut_c(c(:,j),1/dts); % correct for shunt
end
%c(:,8)=(c(:,5)-c(:,4))/d; % differential Theta Y angle
b=find(no_hammer==i); % if i==1 | i==2 | i==6
b=find(no_hammer==i); % if i==1 | i==2 | i==6
if b~=0
[psd_v,integ_v,psd_d,integ_d]=integrated_psd(c,t_win,t_ovlp,nyqhp,dts);
[frz_cut,crsp,pwsp,coherz,nsp]=fqresp(c,shock_ch,t_win,t_ovlp,nyqhp,dts);
else
else
thresh=0.5; % threshold of max value
sep=2.5; % separation minimum of peaks in sec
pre_ev=2; % pre event delay in sec
pos_ev=2; % post event delay in sec
[ti,t_impact]=findpeaks(c(:,shock_ch),'minpeakheight',max(c(:,shock_ch))*thresh,'minpeakdistance',ceil(sep/dts));
% find times at which there are impacts (threshold of max and separated by sep sec)
psd_v=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
psd_d=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
frz_cut=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
for k=1:length(t_impact)
ibeg=fix(t_impact(k)-(pre_ev/dts));
iend=fix(t_impact(k)+(pos_ev/dts));
freq_s=linspace(0,freq_max,t_win/2*freq_max);
if ibeg>1 && iend<length(c) % eliminate indexes outside data range
if ibeg>1 && iend<length(c) % eliminate indexes outside data range
[psd,integ_v,psd_int,integ_d]=integrated_psd(c(ibeg:iend,:),t_win,t_ovlp,nyqhp,dts);
psd_v=psd+psd_v;
psd_d=psd_int+psd_d;
[frz,crsp,pwsp,coherz,nsp]=fqresp(c(ibeg:iend,:),shock_ch,t_win,t_ovlp,nyqhp,dts);
frz_cut=frz+frz_cut;
end
end
psd_v=psd_v/length(t_impact);
psd_d=psd_d/length(t_impact);
frz_cut=frz_cut/length(t_impact);
end
drms=max(integ_d); % compute rms level
dc=hpfint(c,f_cut,dts); % filter and integrate in time domain
dppc=hpdpp(dc,t_win,t_ovlp,1,dts); % compute peak to peak level
%% transfer function, cross spectrum, power spectr. and coherence w.r.t. ch1
eval(['c',num2str(i),'=c;'])
eval(['dc',num2str(i),'=dc;'])
eval(['dppc',num2str(i),'=dppc;'])
@@ -193,8 +193,8 @@ for i=capt
% eval(['frx',num2str(i),'=frx;'])
eval(['coherz',num2str(i),'=coherz;'])
eval(['time',num2str(i),'=time;'])
clear data c dc psd psd_v psd_d time c_shut % clean up the mess
end

View File

@@ -1,3 +1,3 @@
contient les mesures des r<>ponses avec marteau d'impact. Les fichiers xxx_raw sont sans traitement dans le domaine temporel (environ 10 impacts par fichier). Les fonctions de transfert avec phase sont dans le m<>me r<>pertoire avec des noms explicites (manquent les coh<6F>rences que je n'ai pas sorties)
Ces donn<6E>es ne me semblent pas de super qualit<69> en basse fr<66>quence, avec le Ty libre le mode <20> 5Hz est tr<74>s amorti.
Ces donn<6E>es ne me semblent pas de super qualit<69> en basse fr<66>quence, avec le Ty libre le mode <20> 5Hz est tr<74>s amorti.

View File

@@ -1,27 +1,5 @@
#+TITLE: Measurements
:drawer:
#+STARTUP: overview
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
#+HTML_HEAD: <script src="../js/jquery.min.js"></script>
#+HTML_HEAD: <script src="../js/bootstrap.min.js"></script>
#+HTML_HEAD: <script src="../js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script src="../js/readtheorg.js"></script>
#+LATEX_CLASS: cleanreport
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak, minted]
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :noweb yes
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:matlab+ :output-dir figs
:end:
[[../index.org][Back to main page]].
#+SETUPFILE: ../config.org
* Experimental conditions
- Measurement made in the experiment hutch
@@ -87,7 +65,11 @@ Les fichiers xxx_raw sont sans traitement dans le domaine temporel (environ 10 i
* Data Analysis
** Loading of the data
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src