[gate-users] Re: gate-users Digest, Vol 18, Issue 22
Graeme O'Keefe
graeme.okeefe at petnm.unimelb.edu.au
Wed Sep 28 04:07:48 CEST 2005
From: gjok at petnm.unimelb.edu.au
Subject: Re: [gate-users] Re: gate-users Digest, Vol 18,
Issue 22
Date: 28 September 2005 11:50:18 AM
To: gate-users at lphe1pet1.epfl.ch
Hi Ananth,
I wrote a sorter to convert ASCII to philips allegro sinograms and
had the same problem with the ASCII output for cylindrical PET, here
is what I found.
For the coincidence ASCII file, there are four columns additional to
documentation from Rayleigh scattering, columns 20, 21, 43, 44
In GateCoincidenceDigi.cc, you will find:
# GateCoicidenceDigi.cc
#std::ofstream& operator<<(std::ofstream& flux, GateCoincidenceDigi*
digi)
#{
# GatePulse pulse;
# for (G4int iP=0; iP<2; iP++) {
# pulse = digi->GetPulse(iP);
# flux
#1 << " " << std::setw(7) << pulse.GetRunID()
#2 << " " << std::setw(7) << pulse.GetEventID()
#3 << " " << std::setw(5) << pulse.GetSourceID()
#4 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetSourcePosition().x()/mm
#5 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetSourcePosition().y()/mm
#6 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetSourcePosition().z()/mm
#7 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(23) <<
pulse.GetTime()/s
#8 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetEnergy()/MeV
#9 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetGlobalPos().x()/mm
#10 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetGlobalPos().y()/mm
#11 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetGlobalPos().z()/mm
#12-17 << " " << std::setw(5) << pulse.GetOutputVolumeID()
#18 << " " << std::setw(5) << pulse.GetNPhantomCompton()
#19 << " " << std::setw(5) << pulse.GetNCrystalCompton()
#20 << " " << std::setw(5) << pulse.GetNPhantomRayleigh()
#21 << " " << std::setw(5) << pulse.GetNCrystalRayleigh()
#22 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetScannerPos().z()/mm
#23 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
pulse.GetScannerRotAngle()/deg;
# }
So for two pulses for a coin => 46 columns, the extra two columns per
pulse being from the Rayleigh events.
Four columns additional to documentation from Rayleigh scattering,
columns 20, 21, 43, 44
Likewise, the singles ASCII format is different from the documented
singles ASCII format.
In GateSingleDigi.cc, you will find:
#GateSingleDigi.cc
#std::ofstream& operator<<(std::ofstream& flux, GateSingleDigi* digi)
#{ flux
#1 << " " << std::setw(7) << digi->GetRunID()
#2 << " " << std::setw(7) << digi->GetEventID()
#3 << " " << std::setw(5) << digi->GetSourceID()
#4 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetSourcePosition().x()/mm
#5 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetSourcePosition().y()/mm
#6 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetSourcePosition().z()/mm
#7-12 << " " << std::setw(5) << digi->GetOutputVolumeID()
#13 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(30) <<
std::setprecision(23) << digi->GetTime()/s
#14 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetEnergy()/MeV
#15 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetGlobalPos().x()/mm
#16 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetGlobalPos().y()/mm
#17 << " " << std::resetiosflags(std::ios::floatfield) <<
std::setiosflags(std::ios::scientific) << std::setw(10) <<
std::setprecision(3) << digi->GetGlobalPos().z()/mm
#18 << " " << std::setw(4) << digi->GetNPhantomCompton()
#19 << " " << std::setw(4) << digi->GetNCrystalCompton()
#20 << " " << std::setw(4) << digi->GetNPhantomRayleigh()
#21 << " " << std::setw(4) << digi->GetNCrystalRayleigh()
#22 << " " << digi->GetComptonVolumeName()
#23 << " " << digi->GetRayleighVolumeName()
# << G4endl;
There are an additional three columns for Rayleigh scattering
information, column 20, 21 & 23.
Hope this helps?
regards,
Graeme
On 28/09/2005, at 11:17 AM, Christian Wietholt wrote:
>
> Dear Ananth,
>
> A couple of weeks ago, I posted a similar problem about a
> discrepancy between
> the documentation of the ASCII file format and the actual GATE
> output. I probably
> won't be able to answer you exact question, but maybe give you some
> pointers.
> I wanted to extract the X,Y,Z position of each single from
> gateSingles.dat, but found
> out that columns 12, 13, & 14 contain this information, and not 15,
> 16, & 17 as
> documented in the User's Guide.
>
> My thought is, that columns 4, 5, & 6 are probably not in the
> actual output file since
> they seem to be PET related, that would explain the shift. Maybe a
> copy and paste
> error in the user's guide? But I am not sure, nevertheless, there
> are 20 columns in
> the file, as there are 20 coulmns described in the User's Guide.
>
> I was thinking maybe with the input of other GATE users, we could
> correct the mistake
> in the User's Guide. Also, to find out which column contains the
> information I need,
> I went through the source code benchmark_projections.c. This might
> be a possible
> starting point for you to retrieve the information you need from
> gateSingles.dat.
> I hope I was able to help you in finding the needed information
> from the ASCII file.
>
> Best of luck,
>
> Christian
>
>> ------------------------------
>>
>> Message: 2
>> Date: Mon, 26 Sep 2005 10:57:12 -0400
>> From: "Ananth Ravi" <ananth.ravi at sw.ca>
>> Subject: [gate-users] ASCII gateSingles.dat
>> To: "GATE feedback and helpline for Users"
>> <gate-users at lphe1pet1.epfl.ch>
>> Message-ID: <003c01c5c2aa$9374c760$0b1e4c8e at compton>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Greetings,
>>
>> I am in the process of analyzing the results from my simulation
>> but have
>> run into a stumbling block. Upon referring to the GATE users
>> manual I
>> find that the format for the gateSingles.dat file does not align
>> with my
>> output file. In particular I am concerned with the columns that
>> provide
>> information on the number of Compton interactions.
>>
>> I am enclosing 6 lines from my output. I would like to know why
>> there
>> are two columns with names of the phantoms where interactions
>> occur and
>> where I can find the true meaning of the four columns instead of 2
>> for
>> Compton interactions.
>>
>>
>> Thanks,
>> Ananth Ravi
>>
>> 0 14015 16 5.624e-01 -1.480e+01 -2.018e+02 4 0 0
>> 2.35160119005865270e-06 2.217e-02 1.104e+01 7.867e+01 -5.624e
>> +01 1
>> 0 0 0 breast_48_P NULL
>>
>> 0 67212 76 -1.487e+00 -2.049e-01 3.463e-02 3 0 0
>> 1.12583029238266680e-05 1.995e-02 4.731e+01 1.336e+01 -4.022e
>> +01 0
>> 0 0 0 NULL NULL
>>
>> 0 78522 42 5.035e+00 -1.984e+01 -2.121e+02 4 0 0
>> 1.31665734173921830e-05 2.100e-02 8.894e+00 7.980e+01 -5.706e
>> +01 1
>> 0 0 0 breast_37_P NULL
>>
>> 0 78659 71 1.514e+01 -1.482e+01 -2.218e+02 3 0 0
>> 1.31890446875141700e-05 1.999e-02 4.429e+01 1.032e+01 -4.069e
>> +01 1
>> 0 0 0 breast_28_P NULL
>>
>> 0 142498 55 -2.540e+01 5.180e+00 -2.220e+02 4 0 0
>> 2.38831316603839590e-05 2.041e-02 -1.742e+01 9.391e+01 -6.631e
>> +01 3
>> 0 1 0 breast_42_P breast_54_P
>>
>> 0 166159 64 -4.787e+00 -5.009e+00 -2.219e+02 3 0 0
>> 2.78652170868758280e-05 1.789e-02 -5.200e+00 1.724e+01 -4.162e
>> +01 1
>> 0 0 0 breast_28_P NULL
>>
>> ------------------------------
>>
>>
> _______________________________________________
> gate-users mailing list
> gate-users at lphe1pet1.epfl.ch
> http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20050928/3c884a98/attachment.htm>
More information about the Gate-users
mailing list