As discussed in #134, mcpl2ssw writes the number of particles in the list in the field np1 of the ssw file, which causes the wrong normalization in downstream MCNP calculations. This is a bug, and I am surprised that users did not came across this earlier. Maybe users had other ways to normalize their runs, but by default MCNP divides the tallies by the number of simulated particles.
A bug fix would be to set np1 to 1 by default, and warn the user that the ssw file is not normalized.
Since the np1 value is stored in the in ssw_np1 and correctly managed by mcpltool --merge , an improvement would be to save that value back in the ssw file. That would allow users to use MCPL to do operations on the file and keep the normalization.
Other Monte Carlo codes have their own ways to normalize tallies, and it might to difficult to automate this. But another improvement would be to add a command line option (--save-np1 or --normalization) to save that value. This is an issue in particular for ssw because they are binary files which are not easy to modify later by the user. In the case of PHITS dumps, this metadata is saved in a text file.
As discussed in #134,
mcpl2sswwrites the number of particles in the list in the fieldnp1of the ssw file, which causes the wrong normalization in downstream MCNP calculations. This is a bug, and I am surprised that users did not came across this earlier. Maybe users had other ways to normalize their runs, but by default MCNP divides the tallies by the number of simulated particles.A bug fix would be to set
np1to 1 by default, and warn the user that the ssw file is not normalized.Since the
np1value is stored in the inssw_np1and correctly managed bymcpltool --merge, an improvement would be to save that value back in the ssw file. That would allow users to use MCPL to do operations on the file and keep the normalization.Other Monte Carlo codes have their own ways to normalize tallies, and it might to difficult to automate this. But another improvement would be to add a command line option (
--save-np1or--normalization) to save that value. This is an issue in particular for ssw because they are binary files which are not easy to modify later by the user. In the case of PHITS dumps, this metadata is saved in a text file.