I want to implement X-ray source user routine with an external spectrum file, but I’m uncertain about some terminology:
For continuous spectra (Columns: Energy, Intensity):
1)Does “Intensity” represent the number of photons at each energy level (energy bin)?
For histogram spectra (Columns: Emin, Emax, dN/dE):
2) What exactly does the “Bin height” (dN/dE) represent? How does it differ from “Intensity” in the continuous spectra?
No, if you have energy bins, (e_min and e_max are provided) then you have a histogram. If only one energy value is given for an intensity, then you can use the continuous spectrum.
For a histogram spectrum, you need to give the number of particles/energy unit, which is how histograms are plotted. The source routine will calculate the total number of particles in each bin for the sampling.
If I have energy bins defined by minimum and maximum energy values (Emin, Emax), and for each bin, I provide a number of photons, then I’m working with a histogram spectrum. The source routine will calculate the actual number of particles in each bin based on this density.
For continuous spectra, it’s essentially a function (that would be plotted as a smooth curve) defined by discrete pairs (Energy, Intensity), where each specific energy point has a corresponding intensity value.
But to be sure, you can always add a scoring surface around the source location to score the energy distribution of the primaries. This should reproduce the you input spectrum/histogram.