magnus.cli
cli.py
Command-line calculator for Mag$nu$s: computes a single neutrino
oscillation probability (or probability matrix) from the command line,
without writing any Python. Wraps the same osc_prob_{2,3,4,5}nu_*
functions used by the Python API (see magnus.oscprob
and Command-Line Calculator), dispatching to the right one based on --flavors,
--environment, and --scenario.
Installed as the magnus console script (see [project.scripts]
in pyproject.toml) and also runnable as python -m magnus.
Routine listings
main - Entry point: parses argv, dispatches, prints the result
build_parser - Builds the argparse.ArgumentParser
- FLAVOR_NAME_TO_INDEX - Maps flavor names (e, mu, tau, s, s1, s2)
to their globaldefs index
- ENERGY_UNITS, LENGTH_UNITS - Unit-name to \(\text{eV}\) / \(\text{eV}^{-1}\)
conversion factors
Attributes
Functions
|
Builds the |
|
Entry point for the |
Module Contents
- magnus.cli.build_parser() argparse.ArgumentParser[source]
Builds the
magnuscommand-line argument parser.Added in version 1.0.0.
- Returns:
The top-level parser, with the
probsubcommand attached.- Return type: