mckit_meshes.cli.commands package

Submodules

mckit_meshes.cli.commands.mesh2npz module

Convert MCNP meshtal file to a number of npz files, one for each meshtal.

mckit_meshes.cli.commands.mesh2npz.mesh2npz(prefix, mesh_tallies, *, override=False)[source]

Convert MCNP meshtal file to a number of npz files, one for each mesh tally.

Return type:

None

Parameters:
mckit_meshes.cli.commands.mesh2npz.revise_mesh_tallies(mesh_tallies)[source]
Return type:

list[Path]

mckit_meshes.cli.commands.npz2vtk module

Convert npz files to VTK vtr-files.

mckit_meshes.cli.commands.npz2vtk.npz2vtk(prefix, npz_files, *, override=False)[source]

Convert MCNP meshtal file to a number of npz files, one for each mesh tally.

Parameters:
  • prefix (str | Path) – output directory

  • npz_files (Iterable[str | Path]) – files to process, optional

  • override (bool) – define behaviour when output file, exists, default - rise FileExistsError.

Return type:

None

mckit_meshes.cli.commands.npz2vtk.revise_npz_files(npz_files)[source]

Use specified list of file to process, if any, or find them in current directory.

Parameters:

npz_files (Optional[Iterable[Any]]) – npz files to process passed from command line, optional.

Return type:

list[Path]

Returns:

List of the specified or found files as Path objects.

Module contents

CLI implmentation.

mckit_meshes.cli.commands.do_add(out, comment, number, npz_files, *, override=False)

Convert MCNP meshtal file to a number of npz files, one for each mesh tally.

Applicable to meshes with the same geometry.

Note

We assume that statistics is the same for all the meshes, preferably they are produced in the same run (like neutron and photon heat).

Parameters:
  • out (str | Path) – output file

  • comment (str) – comment for a new fmesh npz file, if not provided, then the comment from the first mesh is used

  • number (int) – … to assign to resulting mesh

  • npz_files (Iterable[str | Path]) – files to process, optional

  • override (bool) – define behaviour when output file, exists, default - rise FileExistsError.

Return type:

None

mckit_meshes.cli.commands.do_mesh2npz(prefix, mesh_tallies, *, override=False)

Convert MCNP meshtal file to a number of npz files, one for each mesh tally.

Return type:

None

Parameters:
mckit_meshes.cli.commands.do_npz2vtk(prefix, npz_files, *, override=False)

Convert MCNP meshtal file to a number of npz files, one for each mesh tally.

Parameters:
  • prefix (str | Path) – output directory

  • npz_files (Iterable[str | Path]) – files to process, optional

  • override (bool) – define behaviour when output file, exists, default - rise FileExistsError.

Return type:

None