% Chirp Echo FT EPR-detected NMR % % 11/2017 Nino Wili: nino.wili@phys.chem.ethz.ch % EPR @ ETH Zurich % EPR-correlated chirp echo FT EPR-detected NMR spectrum of [Mn(H20)6]2+ 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 = 2000; % length of evaluation window in points data=uwb_eval('20171121_1654_chirp_echo_fstep_EDNMR',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)); %calculate reference spectrum as the maximum of the spectra %alternatively, one might take the median or actually record a reference %spectrum w/o any HTA pulse ref=max(spc')'; %calculate ednmr and shift such that the HTA corresponds to 0 frequency %of the hyperfine spectrum center_frqs=data.dta_x{1}-data.det_frq; df=freq(2)-freq(1); f_range=350e-3; %range that is cut out from the data Nf=ceil(f_range/df); f_nmr=(-Nf:Nf)*df; for ii=1:size(spc,2) %take the difference spectrum diff_spc(:,ii)=(real(ref)-real(spc(:,ii))); %cut out range symmetrically around the HTA frequency [~,poi]=min(abs(freq-center_frqs(ii))); ednmr(:,ii) = diff_spc(poi-Nf:poi+Nf,ii); end %Plot h=figure(14); clf colormap(jet) %set axis of 2D plot LO=data.exp.LO; nu_obs=data.exp.events{end}.det_frq; x_2=center_frqs+data.det_frq+LO; y_2=linspace(-f_range,f_range,size(ednmr,1))*1e3; [X_2,Y_2]=meshgrid(x_2,y_2); ax_x=[33.92 34.68]; %plot reference spectrum on top subplot(4,4,[1 2 3]) plot(freq+LO+nu_obs,(ref-min(ref))*0.9+0.05,'k','linewidth',2) axis([ax_x ylim-[0.04 0]]) set(gca,'YTick',[],'XTick',[]) %contour plot (normalized to max of 2d spectrum) ednmr=ednmr/max(ednmr(:)); levels=linspace(0.028,0.19,6); subplot(4,4,[5 6 7 9 10 11 13 14 15]) [C,h_cont]=contour(X_2,Y_2,(ednmr),'levellist',(levels)); axis([ax_x ylim]) %set axis labels and make look nice xlabel('$\nu_{\\text{HTA}} $ / GHZ') ylabel('$( \nu - \\nu_{\\text{HTA}} )$ / MHz') h=niwi_niceplot(h,[15 12]*1.5); h_cont.LineWidth=0.5; %plot diagonal slice on the right proj=diff_spc(round(size(spc,1))/2,:); proj=proj/max(proj); subplot(4,4,[8 12 16]) plot(proj,1e3*center_frqs,'k','linewidth',1) set(gca,'Ytick',[],'Xtick',[],'linewidth',2) axis([-0.02 0.2 1e3*[-f_range f_range]]) %only needed for integration with Latex h.Renderer='painters'; % niwi_Plot2LaTex(h,'2d_MnCl2');