% Chirp Echo FT EPR-detected NMR % % 11/2017 Nino Wili: nino.wili@phys.chem.ethz.ch % EPR @ ETH Zurich % SI: spurious frequencies during detection clear, close all; %load data with function tailored to our AWG spectrometer options.plot = 0; % 0 for do not plot by uwb_eval options.evlen = 1024; % length of evaluation window in points data=uwb_eval('20170707_1655_fieldswp',options); %extract needed data from struct t=data.t_ax; %time axis sig=data.dta_avg; %averaged echo transients %apodization window=chebwin(numel(t)); sig_apo=sig.*window; %Find echo maximum and extract phase for the reference spectrum [~,poi]=max(abs(sig_apo(:,1))); phase0=angle(sig_apo(poi,1)); %loop over all spectra in data for ii=1:size(sig,2) y=sig_apo(:,ii);%loop copy for convenience zero_filler=round(size(y)/2); %zero filler at start and end of echo y=[zeros(zero_filler); y; zeros(zero_filler)]; y=circshift(y,-(poi+zero_filler)); %circular shift (=1st order phase correction) y=y.*exp(-1i*phase0); %oth order phase correction (usually irrelevant) %calculate spectra by FT spc(:,ii)=abs(fftshift(fft(y))); end spc=spc/max(spc(:)); %calculate frequency axis dt=t(2)-t(1); %time step nyq=1/(2*dt); %nyquist frequency from time step freq=linspace(-nyq,nyq,size(spc,1)); freq=freq+data.exp.LO+data.det_frq; %plotting h=figure(1); hold on h=niwi_niceplot(h,[15 12]*1.5); %plot as pseudo-2D for ii=1:2:size(spc,2) y=(abs(spc(:,ii))); plot(freq,y+0.001*ii,'k') end %axis labels xlabel('Frequency / GHz') ylabel('$B_0 \longrightarrow$') axis([34.16 35.18 -0.05 0.15]) set(gca,'Ytick',[]) %only needed for latex integration h.Renderer='painters'; % niwi_Plot2LaTex(h,'SI_spurious_detection')