Blame view

README.md 2.52 KB
5bee6696   Thomas Fitoussi   Create README.md
1
2
3
4
5
6
7
8
9
10
# 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
8ffbee93   Thomas Fitoussi   Analytic expressi...
11

28843f23   Thomas Fitoussi   Put radial distri...
12
## Important remarks
8ffbee93   Thomas Fitoussi   Analytic expressi...
13

28843f23   Thomas Fitoussi   Put radial distri...
14
There is interdependency between modules. Don't copy one and not the others otherwise they will be
8ffbee93   Thomas Fitoussi   Analytic expressi...
15
16
errors.

28843f23   Thomas Fitoussi   Put radial distri...
17
In the same time, the function in each module are written in way being used independently, just
8ffbee93   Thomas Fitoussi   Analytic expressi...
18
19
20
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".

28843f23   Thomas Fitoussi   Put radial distri...
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## 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 
1db105d4   Thomas Fitoussi   Update README.md
37

8ffbee93   Thomas Fitoussi   Analytic expressi...
38
39
40
41
42
43
44
45
46
| 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 theta^2 in histogram or versus energy    |
28843f23   Thomas Fitoussi   Put radial distri...
47
48
49
50
| "Map.py"        | plot map of the arrival photons histo2d                   |
| "Generation.py" | plot histogram of the arrival particles generation        |

or develop yours!
8ffbee93   Thomas Fitoussi   Analytic expressi...
51
52
53
54
55
56
57
58

**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.