Code covered by the BSD License  

Highlights from
TOFsPRO toolbox

from TOFsPRO toolbox by Dariya Malyarenko
Signal processing for time-of-flight mass spectra over the broad m/z range (1-200 kDa)

coefOptFiltLL(inhw, las, trct)
function wfc = coefOptFiltLL(inhw, las, trct)

%----------------------------------------------------
% Compute optimal linear target filter (OLF) coefficients for asymmetric
% Lorentzian line shape
% (smoothing without broadening: see [Malyarenko et al, RCMS 2006])
%
% INPUT: 
% inhw - input peak HWHM in time ticks;
% las - left asymmetry of the input peak wavelet in time ticks
% trct - ADC precision (default = 2^9)
%
% OUTPUT:
% wfc - optimal (Lorentzian wavelet) filter coefficients
%
% USAGE:
% wfc = coefOptFiltLL(inhw, las, trct);
% Dependency: none
%

nu = 0.001; 
inpW = [lorLH(inhw, trct); lorRH((inhw+las), trct)]; size(inpW); % make a vector
trgW = [lorLH(0.8*inhw, trct*1.4); lorRH(0.8*(inhw+las), trct*1.4)]; size(inpW);
trgW = trgW*sum(inpW)/sum(trgW); %% normalize target wavelet

[ymx, inpP] =  max(inpW);
[ytmx, trgP] = max(trgW);
shp = length(1:trgP)+length(inpP:length(inpW))-ceil(2*inhw)+inpP-trgP; %% target shift
fleng = inpP+shp+length(trgP:length(trgW));
inpW = [inpW; zeros(fleng-length(inpW),1)];
trgW = [trgW; zeros(fleng-length(trgW),1)];

wfc = dwiener4wlt1(inpW,nu,circshift(trgW, shp)); 
%plot(wfc)
wfc = coefTrunc(wfc);

return;

Contact us at files@mathworks.com