[Gate-users] Interpolation spectrum error for two consecutive energies with matching probabilities

Richard Brown richard.brown at inserm.fr
Tue Nov 15 18:12:06 CET 2016

Dear all,

I’m having a problem defining an interpolated spectrum for a e- source. 

If two consecutive energies in file used by the setSpectrumFile function have the same probability, particles can be generated with either nan or inf energy.

To reproduce this problem:
Start with the example found in “Gate/Source/examples/example_UserSpectrum”
Remove the discrete and histogram from the source.mac file (to narrow down the source of the error)
In the file “InterpolationSpectrum.txt”, change the table to:
		3 		0
		0.001 	0.2
		0.002 	0.2 
If the table is then:
		3 		0
		0.001 	0.2
		0.002 	0.21
(or anything else as long as the probabilities don’t match) this will work with no problems.

Any ideas as to what to do?

Richard BROWN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20161115/cd5f9263/attachment.html>

More information about the Gate-users mailing list