Cosmus homepage  
Home Page Downloads Projects Tech Notes About Us

How you can create your own shower visualizations

by Dinoj Surendran, Mark SubbaRao & Maximo Ave, using the AIRES code of Sergio Sciutto

Recent modifications:

    9 January 2006 : bugs in shower2pv removed.
    20 February 2005 : shower2pv interface revamped. 1 December 2006 : documentation significantly updated.

Here are instructions on how to create your own showers, like those here, in Linux. We use the excellent and well documented software AIRES, written by the Argentina Auger physicist Sergio Sciutto.

First, you'll need to get the AIRES source code from Sciutto's AIRES page. Although AIRES is, at the time of writing, up to version 2.8.4, we have only tested the modifications with version 2.6.0, so get AIRES 2.6.0. This decompresses into a directory called 2-6-0. (Perhaps someone else can figure out what modifications are required for version 2.8.4.)

Maximo, a physicist at KICP and Auger, modified four files in 2-6-0/src/aires (eplusminus.f, gammarays.f, heavycharged.f, heavyneutral.f) so that the results of the shower simulations are output - normally they thrown away as they are only intermediate results. Their modified versions are in this zip file.

The modifications consisted of, in Maximo's words, putting "writes at the beginning and end of the loops over the different stacks..."

Replace the four files in 2-6-0/src/aires with Ave's modified versions. Full directions for doing this can be found in Sciutto's 2-6-0/Install.HowTo file.

We were compiling on Linux and just had to uncomment the line "Platform=Linux" early in the file config and then type "doinstall 0" from the unix prompt while in the 2-6-0 directory. This created another directory called $HOME/aires (which should not exist prior to this installation) where $HOME was our home directory. We added $HOME/aires/bin to our unix path (export PATH=$PATH:/home/dinoj/aires/bin if $HOME=/home/dinoj and you're using bash), and that was it.

You also need ground.zip (9Mb: it has the picture of the ground), and the files in makeaires.zip, namely

  • example.inp : example file to use with Aires
  • cleanme : Linux batch file to use before Aires
  • shower2pv : Perl file that converts the shower that Aires outputs to Partiview format (modified 9 Jan 2006)

The first file comes with AIRES, the second is slightly modified from the one that comes with AIRES (and is recommended).

Next, make two of these files executables:

      chmod +x cleanme
      chmod +x shower2pv

Modify example.inp to be the kind of shower you want, and then say the following (after making sure you have lots and lots of disk space (> 2 Gigs) ; shower2pv creates several, large temporary files that it deletes when done)

 
     ./cleanme
     ./Aires < example.inp > blah
     ./shower2pv blah -o myshower -t 200 

(Note the change in documentation - our old documentation said you should use AiresQ instead of Aires).

This creates myshower.cf, myshower.speck and myshower.cmap, all of which can be viewed with partiview. (If you leave out the "-o" option then the created files will be blah.cf, blah.speck and blah.cmap.) You should also have the file ground.sgi in the same directory, this has a picture of the area that the shower is over. You can name any of your SGI files ground.sgi to change the picture.

You can change the parameters 200 to any positive real number and to any nonnegative integer. At the moment, events that happen within 200 nanoseconds of each other are considered to happen at the same time. Increasing the 200 makes smaller, lower-resolution, showers - for example, doubling it reduces the shower size by four.

Units in the partiview files: one spatial unit = one meter, one timing unit = one nanosecond.

When you generate a shower, you'll be told the number of timesteps it'll take. Sometimes you don't want all of them, and only want the first N. In that case, supply N using the "-n" option when calling shower2pv. For example, if you want the first 42 timesteps only, say

     ./shower2pv blah -o myshower -t 200 -n 42

Full usage specifications

Several other options are possible.

  shower2pv airesoutput [-o outfile] [-t steptime] [-b boxheight] [-n numsteps] 
        [-static] [-lines/-thicklines] [-ground pic] [-groundsize k]

-b boxheight : This allows you to specify the height of a box, in meters, over the ground. However, it is too specific at the moment, as it assumes that the box is 5 km x 5 km on the ground centered at the origin - this will be fixed in a future version.

-static : This produces only the last timestep of the shower. Useful for testing, or when you need smaller files.

-lines or -thicklines : If you use the first option, then lines will be used instead of dots. These lines will all be the same width. If you use the second option, then thicker lines will be used; their width will be proportional to the log-energy of the particles.

-ground pic. If you want to substitute pic.sgi instead of ground.sgi (you can also say -ground pic.sgi). pic.sgi (or whatever you call it) should be a square. If it does not represent a square area of 8km x 8km, then you need to specify its size with the next option.

-groundsize k. Use this if the ground picture you supplied represents an area of k meters x k meters. By default k = 8000.

Extra Technical Information

To change colors, modify the associative array called %col in shower2pv or the .cmap file that comes with each shower.

Here's some documentation you dont really need:

Files created along the way

shower2pv creates a summary file as well, called summary_myshower that has the number of particles of each type generated, etc.

shower2pv creates an intermediate file called tmp_myshower that has information about the shower, in the following form. Each line below represents what happens over the lifetime of a single particle:

   type energy start_time end_time start_x start_y start_z end_x end_y end_z

type is an identifier (aires2shower.pl produces an integer, but it doesnt have to be so in general) representing the type of particle. energy is a real number representing the energy of the particle. The particle's life starts at time start_time at position (start_x, start_y, start_z) and ends at time end_time at position (end_x, end_y, end_z).