<div dir="ltr"><br><div><br></div><div>  Dear Emmanual, I think this is due to how we bin a histogram. Often we need to center the filled data in the histogram within the center of the bin for some specific values. For example we would like in the below example to center integer values: 0,,1, to 10 within the bin center so limits and number of bins should be given like:</div><div><br></div><div>      step = 1</div><div>      xmin     =  0. - step/2.</div><div>      xmax    =  10. + step/2.</div><div>      nbins   = (xmax-xmin)/step</div><div><br></div><div>So here you enter histograms limits xmin=-.5 and xmax=10.5 and nbins = 11 and your histograms will be centered on values 0,1,2 to 10 not shifted with one half bin if you enter xmin=0, xmax=10, and nbins = 10. Here  the first bin is centered at 0.5 and the next will be centered at 1.5 and the last at 9.5 . So I think what you did and what they did is one is shifted respect the other on how you defined your inputs to create the histogram.</div><div><br></div><div>Thank you, Rachid Ayad</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 11:29 AM, Emmanuel Marfo <span dir="ltr"><<a href="mailto:emmanuel.marfo@postgrad.otago.ac.nz" target="_blank">emmanuel.marfo@postgrad.otago.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>

<div id="m_-5290372597349575319divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Please, in my simulation. I modelled the anode(rectangular geometry with thickness 1mm and cathode(source type: plane and shape: circle, source energy: monoenergetic electron(120keV)<wbr>), filters(aluminium and copper), all according to the specification of
 our x-ray manual. I was able to generate an x-ray energy spectrum from this setup. I used both Penelope and emstandard_opt3 which apparently gives similar results.</p>
<p><br>
</p>
<p>Secondly, I used the same parameters in SpekCalc program. A program for calculating x-ray energy spectrum. I, therefore, compared the two spectra as a way of validating my spectrum from GATE. This gives the results of the image attached. If you need more
 info please let me know. Thanks</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-5290372597349575319divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> <a href="mailto:simon.rit@gmail.com" target="_blank">simon.rit@gmail.com</a> <<a href="mailto:simon.rit@gmail.com" target="_blank">simon.rit@gmail.com</a>> on behalf of Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.<wbr>fr</a>><br>
<b>Sent:</b> Wednesday, 11 October 2017 7:38:45 p.m.<br>
<b>To:</b> Emmanuel Marfo<br>
<b>Cc:</b> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.<wbr>opengatecollaboration.org</a><br>
<b>Subject:</b> Re: [Gate-users] SpekCalc vs GATE x-ray energy spectrum</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
</div>
I am not sure I understand what we are looking at. What was the x-ray source in your Gate simulation? I think it would help to have the full simulation.<br>
</div>
Best regards,<br>
</div>
Simon<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 11, 2017 at 3:47 AM, Emmanuel Marfo <span dir="ltr">
<<a href="mailto:emmanuel.marfo@postgrad.otago.ac.nz" target="_blank">emmanuel.marfo@postgrad.<wbr>otago.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_-5290372597349575319m_-158833260913910576divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi GATE users,</p>
<p>Find attached file 'SpekCalc vs GATE x-ray energy spectrum' which compares the two spectrums. My problem is the  GATE characteristics spectrum is shifted to the right a bit when compared to the characteristics energy spectrum from SpekCalc. Please, I want
 to know how I can make it align with that of spekcalc. I used the energyspectrum actor definition below</p>
<p></p>
<div>### E N E R G Y S P E C T R U M ######</div>
<div>##############################<wbr>########</div>
<div>/gate/actor/addActor             EnergySpectrumActor espectrum</div>
<div>/gate/actor/espectrum/attachTo   phantom</div>
<div>/gate/actor/espectrum/save     Desktop/PHDthesisGATE/MARFO201<wbr>7/ModellingX-raytube/XraytubeC<wbr>U/output/cylinderespectrum.<wbr>root</div>
<div>/gate/actor/espectrum/addFilte<wbr>r particleFilter</div>
<div>/gate/actor/espectrum/particle<wbr>Filter/addParticle gamma</div>
<div>/gate/actor/espectrum/energySp<wbr>ectrum/setEmin           0 eV</div>
<div>/gate/actor/espectrum/energySp<wbr>ectrum/setEmax           0.12 MeV</div>
<div>/gate/actor/espectrum/energySp<wbr>ectrum/setNumberOfBins   120</div>
<div>/gate/actor/espectrum/energyLo<wbr>ssHisto/setEmin          0 eV</div>
<div>/gate/actor/espectrum/energyLo<wbr>ssHisto/setEmax          0.12 MeV</div>
<div>/gate/actor/espectrum/energyLo<wbr>ssHisto/setNumberOfBins  120</div>
<div><br>
</div>
Thanks
<p></p>
<p>Best regards,</p>
<p>Emmanuel Marfo</p>
<p>University of Otago</p>
<p>Student </p>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecolla<wbr>boration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollabora<wbr>tion.org/mailman/listinfo/<wbr>gate-users</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>

<br>______________________________<wbr>_________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org">Gate-users@lists.<wbr>opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.<wbr>opengatecollaboration.org/<wbr>mailman/listinfo/gate-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Dr. Rachid Ayad<br>Department of Physics, Faculty of Science</div>
<div>University Of Tabuk</div><div>P.O. Box 2072</div><div>Tabuk 71451<br>Kingdom Of Saudi Arabia<br>Tel: +966560296632<br> </div></div></div>
</div>

<br>
<p dir="RTL" style="font-size:1.3em;text-align:right;color:rgb(34,34,34);margin:0cm 0cm 10pt;background-color:rgb(255,255,255)"><span lang="AR-SA"></span></p><p dir="RTL" style="text-align:right;color:rgb(34,34,34);margin:0cm 0cm 10pt;background-color:rgb(255,255,255)"><font size="2"><span style="color:rgb(0,0,0);font-family:arial,sans-serif">------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>------------------------------</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"><wbr>---------------------------</span></font></p><p dir="RTL" style="text-align:center;color:rgb(34,34,34);margin:0cm 0cm 10pt;background-color:rgb(255,255,255)"><font size="2"><span style="color:rgb(0,0,0)">هذه الرسالة و مرفقاتها (إن وجدت) تمثل وثيقة سرية قد </span><span style="color:rgb(0,0,0)">تحتوي </span><span style="color:rgb(0,0,0)">على معلومات تتمتع بحماية وحصانة قانونية . إذا لم تكن الشخص المعني بهذه الرسالة يجب عليك تنبيه المُرسل بخطأ وصولها إليك، و حذف الرسالة و مرفقاتها (إن وجدت) من الحاسب الآلي الخاص بك. ولا يجوز لك نسخ هذه الرسالة أو مرفقاتها (إن وجدت) أو أي جزئ منها، أو البوح بمحتوياتها لأي شخص أو استعمالها لأي غرض . علماً بأن الإفادات و الآراء التي تحويها هذه الرسالة تعبر فقط عن رأي المُرسل و ليس بالضرورة رأي جامعة تبوك  . ولا تتحمل جامعة تبوك أي مسئولية عن الأضرار الناتجة عن أي فيروسات قد يحملها هذ البريد.</span></font></p><p dir="RTL" style="text-align:center;direction:ltr;color:rgb(34,34,34);margin:0cm 0cm 10pt;background-color:rgb(255,255,255)"><font size="2"><span dir="LTR" style="text-align:left;color:rgb(0,0,0)">This message and its attachment, if any, are confidential and may contain legally privileged information. If you are not the intended recipient, please contact the sender immediately and delete this message and its attachment , if any, from your system. You should not copy this message or disclose its contents to any other person or use it for any purpose. Statements and opinions expressed in this e-mail are those of the sender, and do not necessarily reflect those of University of Tabuk. University of Tabuk Accepts no liability for any damage caused by any virus transmitted by this email</span><span lang="AR-SA" style="text-align:left;color:rgb(0,0,0)">.</span></font></p>