Measuring FWHM of a peak

Dear FLUKA and Flair Support Team,

I plotted USRBIN data in 1D and tried calculating the FWHM of a peak but couldn’t find a reliable method. Here’s what I attempted:

  1. Exported the data and processed it into a 1D array.
  2. Used Python’s scipy.optimize.curve_fit for Gaussian fitting to calculate FWHM, but it struggled with noisy data.
  3. Interpolated points around the half-maximum for direct FWHM calculation, but results were inconsistent.

Could you suggest a built-in method, tool, or workflow in FLUKA/Flair for accurate FWHM calculations? External recommendations are also welcome.

Thank you,
Mo

image

You can use gnuplot to do this.

Here is a flair file.
testGauss.flair (2.6 KB)
Run the test job, process the USRBIN data and plot the USRBIN (in the plot tab) that gives a 1D plot like you wanted. Then plot the Gaussian fit plot. Good luck.

Thank you for the Flair file and instructions. I ran the test job, but unfortunately, it didn’t work as expected, and I couldn’t fully understand the steps involved in processing the USRBIN data or plotting the Gaussian fit.

Could you please clarify the process or provide more detailed instructions? I’d appreciate any further guidance.

thanks

Thanks sunil.
I got what you did now. I appreciate your help.