pnps.cli#

The pnps command: run, merge and budget a scan from a run file.

pnps scan RUN.toml runs the scan a run file (pnps.runfile) describes, or one shard of it with --shard I/N (delay indices I::N), resuming any point already written. pnps separate RUN.toml runs the transient-grating separation of the same scan (pnps.scan.run_separation_scan()), with the same options; give it a run file with a scan name of its own. pnps merge RUN.toml --shards N folds the N shard files into the collected file. pnps budget RUN.toml prints the run’s memory before it is launched (pnps.memory.memory_budget()). python -m pnps is the same command.

On a Slurm cluster, one shard per array task:

#SBATCH --array=0-7
pnps scan run.toml --shard ${SLURM_ARRAY_TASK_ID}/8

then, once every task has finished, pnps merge run.toml --shards 8.

Functions

main([argv])

Run the pnps command.

pnps.cli.main(argv=None)[source]#

Run the pnps command.

Parameters:
argvsequence of str or None, optional

The arguments; None takes sys.argv[1:].

Returns:
int

The exit status: 0, or 1 after printing a package error.