Name Last Update
EBL_files Loading commit data...
Results Loading commit data...
modules Loading commit data...
.gitignore Loading commit data...
Characteristic quantities.ipynb Loading commit data...
Cutoff_energy.ipynb Loading commit data...
EBL-spectrum.ipynb Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
analysis.py Loading commit data...
lambda_e.dat Loading commit data...
lambda_gg.ipynb Loading commit data...
simple_case.ipynb Loading commit data...
simulations.xml Loading commit data...

README.md

Simulation analysis

This a compilation of scripts to analyse cascade-simulation results.

These scripts are written in Python 2.7. They also requires:

  • Numpy/Scipy
  • Matplotlib

Instruction to install it could be found here: http://www.scipy.org/install.html

Important remarks

There is interdependency between modules. Don't copy one and not the others otherwise they will be errors.

In the same time, the function in each module are written in way being used independently, just import it and python will do the rest. For example, to use the spectrum, use just add to your script: "from Modules.Spectrum import spectrum".

how-to

  • First create a directory call Results in which will be copy the output directory of the simulation. You can named the output directory as you wish. It aims to have separately different simulations and plot them together.

mkdir Results

  • Since data files can become really huge, the "Analysis.py" script aims to pre-generate the need files which will be used later to draw figures.

python Analysis output or if you want to do more than directory at a time python Analysis output another_result_directory etc

  • From you draw some figures using the modules available
Modules functions
"Read.py" extract data from the files simulations
"Constants.py" same constants as in "cascade-simulation"
"Analytic.py" plot analytic comparisons on graph or estimate a value
"Integrand.py" some integrands used in "cascade-simulation"
"Spectrum.py" extract and plot the spectrum
"timing.py" extract and plot delta_t/t
"Angle.py" extract and plot theta2 in histogram or versus energy
"Map.py" plot map of the arrival photons histo2d
"Generation.py" plot histogram of the arrival particles generation

or develop yours!

N.B.: "draw..." function call a table of files because it allows to plots more than one figure on the same graph, rather than the rest of the function can call only one file at a time.

For example: considering two files "file1" and "file2"

  • you can plot both together: drawSpectrum([file1,file2]) or only one drawSpectrum([file1]). Always use the brackets
  • but you can only extract one spectrum at a time: spectrum(file1). No brackets.