Dear Hassan,
you can use the following source routine to read your spectrum file: source_spectrum.f (10.5 KB)
A couple things to note:
- You need to change the file name on line 68.
- If the energy unit in the spectrum file is not GeV, then enable and modify line 74 to convert it to GeV
- The comments (first line) in your spectrum file has to be removed
- The routine uses a linear interpolation between the specified energy points
Cheers,
David