Deconvolution results a single value
Show older comments
Hi There!
I am implementing a MATLAB code for the deconvolution of a spectrum. Initially, I am testing my code on the data provided in a published paper.

According to the text mentioned above, by deconvoluting the Fermi function (represented by the dash line, 'Fermi_func' in the MATLAB code), from the spectrum (represented by the black open circles, 'Spectra' in the code), I should obtain the instrumental function, which is represented by a solid line and is a Gaussian function with a width of 0.55 eV.
I digitized the spectrum in the paper (data.txt file attached) and wrote a MATLAB code for its deconvolution (deconvolution.m file attached). However, I am now getting a single value instead of an array for the instrumental function. I was expecting a Gaussian function. I'm not sure what's going wrong.
I am new to MATLAB and any advice regarding this issue would be highly appreciated.
Thank You.
Lakshitha
===============================
Implemented MATLAB code is given below (the .m file is also attached):
clear all;
close all;
clc
A = readmatrix('Data.txt');
Energy = A(:,1);
Spectrum = A(:,2);
Fermi_func = 1-(1./(1+exp((Energy-8.18)/0.025852)));
Fermi_func(1)= 1e-6; % I got an error from deconv that "First coefficient must be non-zero". So I replaced it with a very small value.
Instrumental_Function = deconv(Spectrum,Fermi_func);
% Instrumental_Function =
% deconv(Counts(find(Counts,1):end),Fermi_func(find(Fermi_func,1):end)) %
% This was also implemeted for removing the error of "First coefficient must be non-zero".
display(Instrumental_Function)
f1 = figure('Name','Inverse Photoemission Spectroscopy Fitting');
h1 = plot(Energy, Spectrum,'ko');
hold on;
xlabel('Energy (eV)')
ylabel('Counts (arb. units)')
h2 = plot(Energy, Fermi_func,'k--');
% h3 = plot(Energy, Instrumental_Function,'k-');
hold off;
savefig(f1,'IPES_Fitting.fig')
Accepted Answer
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!