[Gate-users] New output file for new time slice

Patay Gergely patay.gergely at mediso.hu
Wed Jan 14 12:56:05 CET 2015


Hello,

I use the following simple awk one-liner for similar tasks:

awk '{ print $0 >> "run".$1 ; }' yourfile_Singles.dat

(assuming that column 1 contains the runID)
This generates the run.0 , run.1 etc. files for each time slice with the 
corresponding event data.
cheers,

  Gergely


On 2015-01-14 11:37, David Larsson wrote:
> Hi again Hojjat,
>
> for the while I've been using a perl-script to mask columns, which basically can
> be done using your suggestion (1). Also, splitting the main file into time
> slices, either by nesting similar GATE simulations or by an external MATLAB-(or
> C++)-script is not a problem.
>
> Anyway, if I find another more sophisticated way of prompting time slice
> splitting (possibly by going into the Geant4-coding of GATE) I'll let you know.
>
> Thanks again for the help,
>
> David
> --------------------------------------------------------------------------------
> *Från:* Hojjat Mahani [hojjat.mahani at gmail.com]
> *Skickat:* den 14 januari 2015 11:12
> *Till:* GATErs
> *Kopia:* David Larsson
> *Ämne:* Re: New output file for new time slice
>
> Hello David,
>
> Just wanted to highlight two points on avoiding such large ASCII outputs (as you
> certainly know):
>
> (1) Masking some columns of the ASCII file within your Gate code would
> dramatically reduce its size.
>
> (2) Using ROOT output instead of the ASCII one, and then writing a C++ routine
> in order to analyze it.
>
> Meanwhile, I would be very grateful if you share your findings on how to split
> the ASCII outputs.
> _
> _
> Good luck my friend,
>
> Hojjat
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>


More information about the Gate-users mailing list