radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
63 stars 31 forks source link

Hellweg Simulation Settings: Energy spectrum #5981

Open ilyapogorelov opened 1 year ago

ilyapogorelov commented 1 year ago

In Hellweg's Visualization-->Simulation Settings panel, line 4 of Results is 'Energy Spectrum (FWHM)'. The reported value, which is, e.g., "0.25 % ", is confusing: 0.25% of what? My guess is, of the average energy. It would be good to verify this and modify the output format accordingly.

moellep commented 1 year ago

The value displayed by Sirepo is from the hellweg final output text: In the Windows app, this is shown in the Results panel at the bottom: x

@gurhar1133 please look to see where the 'Energy Spectrum (FWHM)' is coming from in the rshellweg repo to see if it has some documentation.

gurhar1133 commented 1 year ago

@ilyapogorelov This is how Energy Spectrum (FWHM) is calculated rshellweg/src/physics/BeamSolver.cpp line 5619 Line="Energy Spectrum (FWHM) = "+s.FormatFloat("#0.00",100*Result.Energy.FWHM/Result.Energy.mean)+" %"; Given that formula (100*Result.Energy.FWHM/Result.Energy.mean) is there a better label to use for Energy Spectrum (FWHM)?

ilyapogorelov commented 1 year ago

My inclination would be to simply report Energy Spectrum (FWHM) in the same units as the mean energy, not as percentage of the mean energy. (Or in some other energy units (e.g., keV) to keep the numerical value from getting too small.