问题描述
我试图对测得的光谱(Sm)与纯光谱(S0)进行反卷积,以获得切趾和乐器线形。以下是文件:Sm和S0
但是,我发现Sm和S0的ifft结果相似。它应该给我高斯线形,但是我得到了三角形。我的错误是什么以及如何解决? 预先谢谢你。
close all
clear all
clc
sm=load('n2o_gaussian.txt'); %loading spectrum with gaussian ILS
s0=load('n2o_noapodization.txt'); %loading pure spectrum
v=s0(:,1); %wavenumber of pure spectrum
s0_y=s0(:,2); %y component of S0
L=length(v); %length of data
n=2^(nextpow2(L)*2); %number of the next power of two data for FFT
vm=sm(:,1); %wavenumber of measured spectrum
v0=2217.241; %v0 is peak location
vv0=v*ones(1,length(v0))-ones(length(v),1)*v0; %vv0 is wavenumber difference
sm_interpl=interp1( vm,sm,v,'spline',0); %fit the measured spectrum to match the grid
%pure spectrum
sm_interpl_y=sm_interpl(:,2); %y component of Sm
%y-deconvolution of Sm with S0
s0_y_ift=ifft(s0_y,n,'symmetric'); %inverse FFT of pure spectrum,the symmetric option
enforces imaginary part should be zero in DFT
s0_y_ift=fftshift(s0_y_ift);
sm_interpl_ift=ifft(sm_interpl_y,'symmetric'); %inverse FFT of measured spectrum,without
symmetric,half of amplitude will lost
sm_interpl_ift=fftshift(sm_interpl_ift);
apo_y=(sm_interpl_ift)./(s0_y_ift); %get the apodization function from division of sm
and s0
ILS_y=fft(apo_y,n); %get the ILS
ILS_y2=fftshift(ILS_y);
%normalize the area of ILS
area=trapz(f,ILS_y2);
ILS_y2_normalized=ILS_y2./area;
%showing spectra and spline result
figure (1)
plot (sm(:,1),sm(:,2),'o');
hold on;
plot (sm_interpl(:,sm_interpl(:,2));
hold on
plot (s0(:,s0(:,2));
legend('Measured spectrum','fitted spectrum','pure spectrum')
hold on;
%showing interferogram results
figure (2)
plot(real(sm_interpl_ift))
hold on
plot(real(s0_y_ift))
legend('interferogram of Sm','interferogram of S0')
hold on
%showing apodization function
figure (3)
plot(real(apo_y))
legend('apodization function')
hold on
%showing retrieved ILS
figure (4);
plot(f,real(ILS_y2_normalized));
xlim([-0.0001 0.0001]);
legend('ILS');
hold on;
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)