Merges 2 or more datasets (runs or scans, ASCII or NeXus) from separate runs of the same simulation, as if they were one longer run:
mcmerge -d OUT [--format McCode|NeXus] DATASET DATASET ...
| Option | Description |
|---|---|
input |
dataset directories, 2 or more |
-d OUT |
output directory, must not exist |
--format FMT |
McCode (ASCII) or NeXus, one of the input formats (default: NeXus if any input is) |
Requires numpy and h5py, and mcpltool for MCPL files.
- Give each run its own seed, e.g.
mcrun -s 1000andmcrun -s 2000. With MPI, the nodes useSeedtoSeed+Nodes-1, so keep the seeds at least that far apart. - Scans are merged point by point.
- Event lists (
Monitor_nD) are joined, withpscaled by each run's share ofNcount. In NeXus, the output does not need themccode_node*.h5files of MPI runs. - The output is a copy of the first dataset in the output format, with new numbers. It lists its inputs as
Merged_from, hasSeed: -1and noNodes, and can be merged again. - MCPL files are merged with
mcpltool. The intensities are only correct withweight_mode=1(the default) inMCPL_output, see below. - Other files are not merged but listed on screen.
- inputs that differ: instrument, parameters, McCode version, monitors, limits or bins, number of scan points
- same or overlapping seeds
- unfinished runs and intermediate saves
- data without
mean: yesormean: noin the monitor headers, or event lists withoutNinvalues, i.e. from older McCode versions - event lists without
p, with a second weightI, with missingmccode_node*.h5files, or truncated, i.e. with fewer events thanNinvalues(e.g.list=n, uselist all)
When ASCII and NeXus are merged, what is only in the NeXus data gives a warning instead.
- Polarisation monitors are merged approximately: the mean is weighted with the number of rays
N, not with their intensity. - Neutron or photon IDs (
n) in event lists are not unique, as with MPI. - MCPL files written with
weight_mode=2get too high intensities, as their weights are already divided byNcount. This is not detected, so a warning is always given. - NeXus scans only have the MCPL file of the last point.
- MCPL files that
mcpltoolrefuses are left out with a warning, e.g. if the runs were started with a different path to the instrument executable. - Runs that read the same MCPL file are not independent, however different the seeds. This is not detected.
- To ASCII: geometry, component parameters and
BINSof the NeXus data are left out.