Command-line interface

The primat console script exposes the most-used run options directly. The reference below is generated automatically from the argument parser, so it never drifts from primat --help.

Run a Big Bang Nucleosynthesis computation with primat and print the resulting Neff/abundances.

usage: primat [-h] [--credits] [--version] [--list-params] [--Omegabh2 VALUE]
              [--DeltaNeff VALUE] [--network NAME] [--amax A]
              [--numerical_precision RTOL] [--data_dir PATH]
              [--user_nuclear_dir PATH] [--munuOverTnu XI]
              [--munuOverTnu_e XI_E] [--munuOverTnu_mu XI_MU]
              [--munuOverTnu_tau XI_TAU] [--output_file FILE]
              [--output_final_file FILE] [--output_background_file FILE]
              [--output_mc_file_prefix PREFIX]
              [--QED_corrections | --no-QED_corrections]
              [--nuclear_qed_corrections | --no-nuclear_qed_corrections]
              [--radiative_corrections | --no-radiative_corrections]
              [--finite_mass_corrections | --no-finite_mass_corrections]
              [--thermal_corrections | --no-thermal_corrections]
              [--spectral_distortions | --no-spectral_distortions]
              [--output_time_evolution | --no-output_time_evolution]
              [--output_final_result | --no-output_final_result]
              [--output_background_evolution | --no-output_background_evolution]
              [--output_mc_samples | --no-output_mc_samples]
              [--output_mc_covariance | --no-output_mc_covariance]
              [--output_mc_correlation | --no-output_mc_correlation]
              [--show_progress | --no-show_progress]
              [--backend {auto,c,python}] [--mc N] [--mc-seed SEED]
              [--mc-jobs N] [--json] [--verbose] [--cache-info]
              [--cache-clear]

Named Arguments

--credits

Print the project credits and exit.

Default: False

--version

Print the primat version and C-backend availability, then exit.

--list-params

Print every PRIMATConfig parameter, its default value, and a one-line description, then exit.

Default: False

--Omegabh2

Baryon density Omega_b h^2 (PRIMATConfig default: 0.02242).

--DeltaNeff

Extra relativistic degrees of freedom on top of the SM neutrino sector (PRIMATConfig default: 0.0).

--network

Nuclear reaction network used in the LT era (PRIMATConfig default: ‘small’). Built-in choices are ‘small’, ‘small_parthenope’ and ‘large’, but any name for which data/nuclear/networks/<NAME>.txt exists is accepted; PRIMATConfig raises a ValueError if no such file is found.

--amax

Drop reactions involving any nuclide with mass number > A (must be a positive integer); applies to any –network, not just ‘large’. E.g. –network large –amax 8 reproduces the old ‘medium’ network’s 68 reactions.

--numerical_precision

Relative tolerance passed to solve_ivp (PRIMATConfig default: 1e-07).

--data_dir

Replace the entire data tree (NEVO/, nuclear/, csv/, cache_plasma_weak/) with PATH. Must contain those subdirectories. Default (None): use the package’s own primat/data/ tree.

--user_nuclear_dir

Additive overlay for nuclear networks and rate tables only (the primat/data/nuclear/ equivalent, containing networks/ and tables/). Checked before the default tree; shipped networks remain accessible even when this is set. Default: None.

--munuOverTnu

Reduced neutrino chemical potential mu/T, the common default for all flavours (PRIMATConfig default: 0.0).

--munuOverTnu_e

Per-flavour reduced chemical potential of nu_e; overrides –munuOverTnu for the electron neutrino (which alone shifts the n<->p weak rates). Default: inherit –munuOverTnu.

--munuOverTnu_mu

Per-flavour reduced chemical potential of nu_mu (gravitates only). Default: inherit –munuOverTnu.

--munuOverTnu_tau

Per-flavour reduced chemical potential of nu_tau (gravitates only). Default: inherit –munuOverTnu.

--output_file

Write the full time-evolution TSV to FILE when –output_time_evolution is enabled.

--output_final_file

Write the final-abundance table to FILE when –output_final_result is enabled.

--output_background_file

Write the background time-evolution TSV to FILE when –output_background_evolution is enabled.

--output_mc_file_prefix

Filename stem for the Monte-Carlo output files written when –mc is used: PREFIX_samples.tsv / PREFIX_covariance.tsv / PREFIX_correlation.tsv, each gated by –output_mc_samples / –output_mc_covariance / –output_mc_correlation respectively.

--QED_corrections, --no-QED_corrections

QED interaction corrections to the EM plasma equation of state. (PRIMATConfig default: True).

--nuclear_qed_corrections, --no-nuclear_qed_corrections

QED corrections to radiative-capture nuclear reaction rates (Pitrou & Pospelov 2020). (PRIMATConfig default: True).

--radiative_corrections, --no-radiative_corrections

Coulomb + T=0 resummed radiative corrections to n<->p (CCR); if False, use the Born approximation instead. (PRIMATConfig default: True).

--finite_mass_corrections, --no-finite_mass_corrections

Finite-nucleon-mass (Fokker-Planck) correction to n<->p. (PRIMATConfig default: True).

--thermal_corrections, --no-thermal_corrections

Finite-temperature radiative corrections to n<->p (CCRTh; Brown & Sawyer 2001). (PRIMATConfig default: True).

--spectral_distortions, --no-spectral_distortions

Correct n<->p rates for non-Fermi-Dirac neutrino distributions. (PRIMATConfig default: True).

--output_time_evolution, --no-output_time_evolution

Write the full time-evolution series (in-memory always; to disk if output_file is set). (PRIMATConfig default: False).

--output_final_result, --no-output_final_result

Write the final results dict to output_file. (PRIMATConfig default: False).

--output_background_evolution, --no-output_background_evolution

Write the cosmological background time series to disk. (PRIMATConfig default: False).

--output_mc_samples, --no-output_mc_samples

Write –mc samples to <output_mc_file_prefix>_samples.tsv. (PRIMATConfig default: False).

--output_mc_covariance, --no-output_mc_covariance

Write the –mc sample covariance matrix to <output_mc_file_prefix>_covariance.tsv. (PRIMATConfig default: False).

--output_mc_correlation, --no-output_mc_correlation

Write the –mc sample correlation matrix to <output_mc_file_prefix>_correlation.tsv. (PRIMATConfig default: False).

--show_progress, --no-show_progress

Print compact stderr progress indicators (‘[primat] HT. MT. LT. done.’ phase markers, ‘[MC] …’ sample counter). (PRIMATConfig default: True).

--backend

Possible choices: auto, c, python

Which solver implementation to use: ‘auto’ (default) picks the compiled C extension when available, ‘c’ forces it (error if unavailable), ‘python’ forces the pure-Python implementation.

Default: 'auto'

--mc

Also run an N-sample Monte-Carlo nuclear-rate/tau_n uncertainty propagation (primat.backend.run_mc) and print each observable as ‘value +/- sigma’ instead of a bare value. Uses the C backend when available (–backend auto/c), else joblib in pure Python; see primat.backend’s docstring for the RNG caveat.

--mc-seed

Base RNG seed for –mc (default: 0); sample i uses seed+i.

Default: 0

--mc-jobs

Parallel worker count for –mc (default: -1, all CPUs; Python backend only – the C backend always uses one pthread per sample).

Default: -1

--json

Print the full results dict as JSON instead of a short summary.

Default: False

--verbose

Enable primat’s internal progress messages (timings, cache hits, …).

Default: False

--cache-info

Print the number of cached n<->p weak-rate files (cache_plasma_weak/weak/nTOp_*.txt, or the cache_dir redirect) and exit, without running a solve.

Default: False

--cache-clear

Delete every cached n<->p weak-rate file and exit, without running a solve. The cache is always safely regenerable: a later run just pays the one-time recompute cost again.

Default: False

Any other PRIMATConfig parameter (including p_<reaction>/delta_<reaction> rate variations) can be set with repeated –set KEY=VALUE, e.g. –set T_end_MeV=1e-4. Use –list-params to see every parameter’s default and a one-line description.

Tip

Anything not exposed as a named flag can still be set via the repeatable --set KEY=VALUE escape hatch for any PRIMATConfig key, e.g. primat --set T_end_MeV=1e-4 --set network=large.