snf_simulations.scripts.command_line#

Command line script to run SNF simulations and generate plots.

Module Contents#

Functions#

main

Parse command line arguments and run the simulation.

print_detector_rates

Calculate the antineutrino flux and expected event rates at a given distance.

run

Run SNF simulations and calculate antineutrino fluxes and event rates.

run_compare

Plot both single and multiple flux spectra on one graph.

run_multiple

Calculate total spectra for multiple casks.

run_multiple_full

Plot multiple flux spectra for different cooling times.

run_sample

Sample the cask spectrum to simulate detector observations.

run_single

Plot the spectrum for a single dry cask of fuel after different cooling times.

API#

snf_simulations.scripts.command_line.main() None[source]#

Parse command line arguments and run the simulation.

snf_simulations.scripts.command_line.print_detector_rates(spec: snf_simulations.spec.Spectrum, distance: float) None[source]#

Calculate the antineutrino flux and expected event rates at a given distance.

snf_simulations.scripts.command_line.run(filepath: pathlib.Path) None[source]#

Run SNF simulations and calculate antineutrino fluxes and event rates.

Performs calculations for single and multiple dry casks of spent nuclear fuel at various cooling times, calculating antineutrino flux and expected detector event rates at 40 meters distance.

Parameters:

filepath – Path to the input file.

snf_simulations.scripts.command_line.run_compare(spec_single: snf_simulations.spec.Spectrum, spec_multiple: snf_simulations.spec.Spectrum) None[source]#

Plot both single and multiple flux spectra on one graph.

snf_simulations.scripts.command_line.run_multiple(filepath: pathlib.Path, cask_mass: float, n_casks: int, cooling_times: collections.abc.Sequence[float], detector_distance: float = 40) snf_simulations.spec.Spectrum[source]#

Calculate total spectra for multiple casks.

Parameters:
  • filepath – Path to the input file.

  • cask_mass – Total mass of each cask in kg.

  • n_casks – Number of casks to simulate.

  • cooling_times – List of times the casks have been cooling, in years.

  • detector_distance – Distance from the casks to the detector in meters.

Returns:

The total Spectrum for all the casks combined at the first cooling time.

snf_simulations.scripts.command_line.run_multiple_full(filepath: pathlib.Path, cask_mass: float, cask_cooling_times: collections.abc.Mapping[int, int] | collections.abc.Mapping[float, int], simulation_times: collections.abc.Sequence[float], detector_distance: float = 40) None[source]#

Plot multiple flux spectra for different cooling times.

snf_simulations.scripts.command_line.run_sample(spec: snf_simulations.spec.Spectrum, n_samples: int = 1000000) None[source]#

Sample the cask spectrum to simulate detector observations.

snf_simulations.scripts.command_line.run_single(filepath: pathlib.Path, cask_mass: float, simulation_times: collections.abc.Sequence[float], detector_distance: float = 40) dict[float, snf_simulations.spec.Spectrum][source]#

Plot the spectrum for a single dry cask of fuel after different cooling times.

Parameters:
  • filepath – Path to the input file.

  • cask_mass – Total mass of the cask in kg.

  • simulation_times – List of times to simulate the cask at, in years.

  • detector_distance – Distance from the cask to the detector in meters.

Returns:

A dictionary mapping simulation times to Spectra for the single cask at each simulation time.