How to add 1D distributions

Dear experts.

I am plotting 1D distributions for particle flux adding corresponding .dat files, is there a way in flair to add such distributions and plot a total curve?

Dear Alfredo,

I’m afraid there is no option to sum different .dat files in Flair.

There is one possible easy solution: Check if one of the generalized particles in FLUKA matches your needs, and score it as well.
For the particle codes, have a look at: https://flukafiles.web.cern.ch/flukafiles/manual/5.1.html

If you want something else, then unfortunately you need to calculate the sum manually.

Cheers,
David

Alfredo,

If your files are in the exact same format, and if you want to plot the sum of the data from the 2 files, you can use gnuplot to;

plot ‘< paste file1.dat file2.dat’ u 1:($3+$7)

The $3 and $7 indicates the 3rd column in file1.dat and the 3rd column of file2.dat.
You can also apply different normalizations if you like, such as (a*$3+b*$7) etc.

As David suggested, you could also try writing a script to add them and create a data file.

Cheers
Sunil