alpaca.scan
Classes
- class alpaca.scan.Scan(model: ALPcouplings | ModelBase | Benchmark, ma: float | Axis = 1.0, fa: float | Axis = 1000.0, lambda_scale: float | Axis | None = None, mu_scale: float | Axis | None = None, brdark: float | Axis = 0.0, model_pars: dict = {})
Class to perform parameter space scans.
Parameters
- modelALPcouplings | ModelBase | Benchmark
The ALP model to use in the scan. Can be an ALPcouplings object, a ModelBase object, or a Benchmark object.
- mafloat | Axis, optional
The ALP mass or Axis for the x-axis, by default 1.0 GeV.
- fafloat | Axis, optional
The ALP decay constant or Axis for the y-axis, by default 1e3 GeV.
- lambda_scalefloat | Axis | None, optional
The UV scale or Axis where the ALP couplings are defined, by default None. Must be provided only for ModelBase objects.
- mu_scalefloat | Axis | None, optional
The scale or Axis where the ALP couplings are evaluated, by default None (i.e. no running).
- brdarkfloat | Axis, optional
The branching ratio of the ALP into dark sector particles, by default 0.0.
- model_parsdict, optional
A dictionary of model parameters for ModelBase and Benchmark objects.
- alp_channels_branching_ratios(**kwargs)
Calculate the branching ratios for all ALP decay channels.
Parameters
- **kwargs:
Additional parameters for the branching ratio calculation.
Returns
- dict[str, float] :
A dictionary with decay channels as keys and their corresponding branching ratios as values.
- alp_channels_decay_widths(**kwargs)
Calculate the decay widths for all ALP decay channels.
Parameters
- **kwargs:
Additional parameters for the decay width calculation.
Returns
- dict[str, float] :
A dictionary with decay channels as keys and their corresponding widths as values.
- branching_ratio(transition: str, **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Calculate the branching ratio for a given transition.
Parameters
- transition (str) :
The particle transition in the form ‘initial -> final’.
- **kwargs:
Additional parameters for the branching ratio calculation.
Returns
- BR (np.ndarray) :
The branching ratio for the specified transition.
Raises
NotImplementedError: If the decay process is unknown.
- compute_grid(verbose: bool = False, **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Computes the grid of ALPcouplings over the scan parameter space.
Parameters
- verbosebool, optional
Whether to display a progress bar, by default False.
- **kwargs
Additional keyword arguments to pass to the matching and running methods.
Returns
- np.ndarray
The computed grid of ALPcouplings.
- cross_section(transition: str, s: float, **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Calculate the cross section for a given transition process involving an ALP
Parameters
- transition (str) :
The transition process in the form ‘initial -> final’.
- s (float) :
The Mandelstam variable s, representing the square of the center-of-mass energy, in Gev^2.
- **kwargs:
Additional keyword arguments for specific cross section calculations.
Returns
- sigma (np.ndarray) :
The calculated cross section for the given transition process.
Raises
NotImplementedError: If the transition process is not recognized or implemented.
- decay_width(transition: str, **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]
Calculate the decay width for a given transition.
Parameters
- transition (str) :
The particle transition in the form ‘initial -> final’.
- **kwargs:
Additional parameters for the decay width calculation.
Returns
- Gamma (np.ndarray) :
The decay width for the specified transition, in GeV.
Raises
NotImplementedError: If the decay process is unknown.
- get_chi2(transitions: list[Sector | str | tuple] | Sector | str | tuple, exclude_projections: bool = True, **kwargs) ChiSquaredList
Calculate the chi-squared values for a set of transitions.
Parameters
- transitions (list[str])
List of transition identifiers.
- exclude_projections (bool, optional):
Whether to exclude projections from measurements. Default is True.
- **kwargs:
Additional keyword arguments passed to the matching and running routines.
Returns
- chi2_dictChiSquaredList
Chi-squared values for each transition over the scan parameter space.
- meson_mixing(obs: str, **kwargs)
Obtains the value of a meson mixing observable.
Parameters
- obsstr
The observable to calculate. The available options are: - ‘delta_mK0’: The mass difference of the K0 meson, in ps^{-1}. - ‘epsK’: The epsilon parameter of the K0 meson. - ‘x_D0’: Normalized mass difference in D0 mixing. - ‘phi12_D0’: D0 mixing phase, in rad. - ‘delta_mB0’: The mass difference of the B0 meson, in ps^{-1}. - ‘delta_mBs’: The mass difference of the Bs meson, in ps^{-1}.
- class alpaca.scan.Axis(values: Callable | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], axis: str, tex: str, name: str = '', units: str = '')
Class to define an axis in a parameter space scan.
Parameters
- valuesCallable | np.typing.ArrayLike
The values of the axis. If axis is ‘x_func’ or ‘y_func’, this should be a callable function.
- axisstr
The axis type. For main axes either x or y. For functional axes, either x_func or y_func. For dependent axes, either x_dep or y_dep.
- texstr
The LaTeX representation of the axis.
- namestr, optional
The name of the axis, by default ‘’.
- unitsstr, optional
The units of the axis, by default ‘’.