From c19d1f473a1a852c3410e49d75ea713bd9926735 Mon Sep 17 00:00:00 2001 From: JAK Date: Fri, 17 Aug 2018 10:49:06 +0200 Subject: [PATCH] The line shape width is now the correct FWHM. --- src/external/libBNMR/libLineProfile/libLineProfile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/external/libBNMR/libLineProfile/libLineProfile.cpp b/src/external/libBNMR/libLineProfile/libLineProfile.cpp index c1137dee..48269abb 100644 --- a/src/external/libBNMR/libLineProfile/libLineProfile.cpp +++ b/src/external/libBNMR/libLineProfile/libLineProfile.cpp @@ -29,14 +29,14 @@ Double_t GaussianShape(Double_t x, Double_t position, Double_t width) { if(!width){ // width=0 if(x==position) return 1.0; return 0.0;} - return exp(-0.5*pow((x-position)/width,2)); + return exp(-2.7725887222397811*pow((x-position)/width,2)); } Double_t LaplacianShape(Double_t x, Double_t position, Double_t width) { if(!width){ // width=0 if(x==position) return 1.0; return 0.0;} - return exp(-abs(x-position)/width); + return exp(-1.3862943611198906*abs((x-position)/width)); } Double_t LorentzianShape(Double_t x, Double_t position, Double_t width) { @@ -45,7 +45,7 @@ Double_t LorentzianShape(Double_t x, Double_t position, Double_t width) { return 0.0;} // return 2/PI*(width/(4*pow(x-position,2)+pow(width,2)));//constant Area - return (width*width/(4*(x-position)*(x-position)+width*width));//constant Height + return (1/(4*(x-position)*(x-position)/width/width+1));//constant Height }