PSF Module¶
penred phase space file module
- pyPenred.psf.psf2ascii(filenameIn: str, filenameOut: str) tuple¶
Converts the binary Phase Space File into an ASCII file format.
- Parameters:
- Returns:
A tuple containing the number of histories in the Phase Space File and the number of particle chuncks.
- Return type:
Example
# Read the Phase space File and store the results results = pyPenred.psf.psf2ascii('psf.dat', 'psfASCII.dat')
- pyPenred.psf.psfSpectre(filename: str, emin: SupportsFloat, emax: SupportsFloat, nbins: SupportsInt) tuple¶
Extracts the energy spectrum distribution of the particles from a Phase Space File.
- Parameters:
- Returns:
A tuple containing four tuples in the following order: energy bin edges, electron, gamma and positron spectrum.
- Return type:
Example
# Read the Phase space File and store the results results = pyPenred.psf.psfSpectre('psf.dat', 0, 7e5, 200)