./
pp_lorentz_from_fwhm.pro
Author information
- Author
Paulo Penteado (pp.penteado@gmail.com), Nov/2010
Routines
top source pp_lorentz_from_fwhm
result = pp_lorentz_from_fwhm(x [, fwhm=fwhm])
Evaluates a normalized Lorentzian distribution of mean zero and the provided
width at the provided locations (x
). The width by the FWHM (fwhm
).
Parameters
- x
The locations where the Gaussian is to be evaluated.
Keywords
- fwhm in optional default=1d0
Specifies the width of the Gaussian, as its Full Width Half Maximum (FWHM).
Examples
Make a domain where the Lorentzian is to be evaluated:
nx=201
x=(dindgen(nx)/(nx-1d0)-0.5d0)*5d0
yl=pp_lorentz_from_fwhm(x,fwhm=1d0)
pl=plot(x,yl,color='blue',name='Lorentzian, FWHM=1d0',thick=2.)
pp_gauss_from_fwhm
):
yg=pp_gauss_from_fwhm(x,fwhm=1d0)
pg=plot(x,yg,color='red',name='Gaussian, FWHM=1d0',thick=2.,/over)
l=legend(target=[pg,pl],position=[0.5,0.5]) ;Identify the two lines
pl.save,'pp_lorentz_from_fwhm.png',resolution=100
Statistics
Lines: | 7 lines |
Cyclomatic complexity: | 1 |
Modified cyclomatic complexity: | 1 |
File attributes
Modification date: | Wed Jun 29 22:15:28 2016 |
Lines: | 7 |
Docformat: | rst rst |