<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi Jan,<DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am writing a sorter at the moment to convert gate ASCII output to Philips UGM format sinograms.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I have the sinogram storage sorted out but a small problem with the (xPosA, xPosB) mapping to (rho, phi).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Maybe someone has done it already, if not, it may be of use to some people out there, I'll let you know when I've 'sorted' it out.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I had the same problem with the ASCII output for cylindrical PET, here is what I found.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>In GateCoincidenceDigi.cc, you will find:</DIV><DIV># GateCoicidenceDigi.cc </DIV><DIV>#std::ofstream& operator<<(std::ofstream& flux, GateCoincidenceDigi* digi) </DIV><DIV>#{ </DIV><DIV># GatePulse pulse; </DIV><DIV># for (G4int iP=0; iP<2; iP++) { </DIV><DIV># pulse = digi->GetPulse(iP); </DIV><DIV># flux </DIV><DIV>#1 << " " << std::setw(7) << pulse.GetRunID() </DIV><DIV>#2 << " " << std::setw(7) << pulse.GetEventID() </DIV><DIV>#3 << " " << std::setw(5) << pulse.GetSourceID() </DIV><DIV>#4 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetSourcePosition().x()/mm </DIV><DIV>#5 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetSourcePosition().y()/mm </DIV><DIV>#6 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetSourcePosition().z()/mm </DIV><DIV>#7 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(23) << pulse.GetTime()/s </DIV><DIV>#8 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetEnergy()/MeV </DIV><DIV>#9 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetGlobalPos().x()/mm </DIV><DIV>#10 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetGlobalPos().y()/mm </DIV><DIV>#11 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetGlobalPos().z()/mm </DIV><DIV>#12-17 << " " << std::setw(5) << pulse.GetOutputVolumeID() </DIV><DIV>#18 << " " << std::setw(5) << pulse.GetNPhantomCompton() </DIV><DIV>#19 << " " << std::setw(5) << pulse.GetNCrystalCompton() </DIV><DIV>#20 << " " << std::setw(5) << pulse.GetNPhantomRayleigh() </DIV><DIV>#21 << " " << std::setw(5) << pulse.GetNCrystalRayleigh() </DIV><DIV>#22 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetScannerPos().z()/mm </DIV><DIV>#23 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setprecision(3) << pulse.GetScannerRotAngle()/deg; </DIV><DIV># } </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So for two pulses for a coin => 46 columns, the extra two columns per pulse being from the Rayleigh events.</DIV><DIV>Four columns additional to documentation from Rayleigh scattering, columns 20, 21, 43, 44</DIV><DIV><BR class="khtml-block-placeholder"><DIV>Likewise, the singles ASCII format is different from the documented singles ASCII format.</DIV><BR class="khtml-block-placeholder"></DIV><DIV>In GateSingleDigi.cc, you will find:</DIV><DIV>#GateSingleDigi.cc </DIV><DIV>#std::ofstream& operator<<(std::ofstream& flux, GateSingleDigi* digi) </DIV><DIV>#{ flux </DIV><DIV>#1 << " " << std::setw(7) << digi->GetRunID() </DIV><DIV>#2 << " " << std::setw(7) << digi->GetEventID() </DIV><DIV>#3 << " " << std::setw(5) << digi->GetSourceID() </DIV><DIV>#4 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetSourcePosition().x()/mm </DIV><DIV>#5 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetSourcePosition().y()/mm </DIV><DIV>#6 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetSourcePosition().z()/mm </DIV><DIV>#7-12 << " " << std::setw(5) << digi->GetOutputVolumeID() </DIV><DIV>#13 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(30) << std::setprecision(23) << digi->GetTime()/s </DIV><DIV>#14 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetEnergy()/MeV </DIV><DIV>#15 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetGlobalPos().x()/mm </DIV><DIV>#16 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetGlobalPos().y()/mm </DIV><DIV>#17 << " " << std::resetiosflags(std::ios::floatfield) << std::setiosflags(std::ios::scientific) << std::setw(10) << std::setprecision(3) << digi->GetGlobalPos().z()/mm </DIV><DIV>#18 << " " << std::setw(4) << digi->GetNPhantomCompton() </DIV><DIV>#19 << " " << std::setw(4) << digi->GetNCrystalCompton() </DIV><DIV>#20 << " " << std::setw(4) << digi->GetNPhantomRayleigh() </DIV><DIV>#21 << " " << std::setw(4) << digi->GetNCrystalRayleigh() </DIV><DIV>#22 << " " << digi->GetComptonVolumeName() </DIV><DIV>#23 << " " << digi->GetRayleighVolumeName() </DIV><DIV># << G4endl; </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>There are an additional three columns for Rayleigh scattering information, column 20, 21 & 23.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hope this helps?</DIV><DIV><DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>regards,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Graeme</DIV><DIV><BR><BR><DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Verdana">Graeme O'Keefe</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Verdana">Centre for PET</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Verdana">Austin Hospital</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Verdana">Tel: (613)-9496-5767</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Verdana">Fax: (613) 9458-5023</FONT></DIV></DIV><BR><BR class="khtml-block-placeholder"></DIV><DIV>On 25/05/2005, at 5:49 PM, D.J. van der Laan wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I have a problem with the meaning of the columns in the coincidence ASCII output. According to the manual and the FAQ the number of columns in de coincidence file should be 42 for the cylindricalPET system, but the files Gate produces have 46 columns. When looking at the file I suspect that there are not 6 volume ID's per event, but 8. Is this correct?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Jan</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">D.J. van der Laan</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Delft University of Technology</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mekelweg 15, room 2.00.020</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2629 JB Delft</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The Netherlands</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">E: <A href="mailto:d.j.vanderlaan@tnw.tudelft.nl">d.j.vanderlaan@tnw.tudelft.nl</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">T: +31 15 2783776</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">F: +31 15 2789011</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">gate-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:gate-users@lphe1pet1.epfl.ch">gate-users@lphe1pet1.epfl.ch</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users">http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR class="Apple-interchange-newline"></BLOCKQUOTE></DIV><BR></DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV></BODY></HTML>