function [Wavenumber_shift,HWHM_Lorentz,HWHM_Doppler]=LineCorrection(Wavenumber,Delta_air,n_air,AirHWHM,SelfHWHM,Pressure,PartitialPressure,Temperature,Temperature_ref,MoleWeight)
% This function is used to correct the line position and calculate line
% broadening due to temperature and pressure...
%% Calculation of Lorentzian HWHM
% Temperature_ref=296;
Wavenumber_shift=Wavenumber+Delta_air*Pressure;
HWHM_Lorentz=((Temperature_ref/Temperature).^n_air).*(AirHWHM*(Pressure-PartitialPressure)+SelfHWHM*PartitialPressure);
%% Calculation of Doppler HWHM
k=1.3806504e-23;
% Boltzmann constant, unit in J/K....
c=299792458;
% Speed of light in vacuum, unit in m/s....
NA=6.022*10^23;
% mol^-1, Avogadro constant
Mass=MoleWeight*10^-3/NA;
% [KG/each]Mass of each atom...
HWHM_Doppler=Wavenumber*sqrt(2*k*Temperature*log(2)/(Mass*c^2));
end
