<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear all,<div class=""><br class=""></div><div class="">I’m having a problem defining an interpolated spectrum for a e- source. </div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">To reproduce this problem:</div><div class=""><ul class="MailOutline"><li class="">Start with the example found in “Gate/Source/examples/example_UserSpectrum”</li><li class="">Remove the discrete and histogram from the source.mac file (to narrow down the source of the error)</li><li class="">In the file “InterpolationSpectrum.txt”, change the table to:</li></ul></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>3 <span class="Apple-tab-span" style="white-space:pre"> </span>0</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>0.001 <span class="Apple-tab-span" style="white-space:pre"> </span>0.2</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>0.002 <span class="Apple-tab-span" style="white-space:pre"> </span>0.2 </div><ul class="MailOutline"><li class="">If the table is then:</li></ul><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>3 <span class="Apple-tab-span" style="white-space:pre"> </span>0</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>0.001 <span class="Apple-tab-span" style="white-space:pre"> </span>0.2</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>0.002 <span class="Apple-tab-span" style="white-space:pre"> </span>0.21</div><div class="">(or anything else as long as the probabilities don’t match) this will work with no problems.</div></div><div class=""><br class=""></div><div class="">Any ideas as to what to do?</div><div class=""><br class=""></div><div class="">Regards,<br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><b class="">Richard BROWN</b><br class=""></div></div></div></div></body></html>