spin#

Functions for generating spin projections and LS couplings.

generate_ls_couplings(parent_spin: SupportsFloat, child1_spin: SupportsFloat, child2_spin: SupportsFloat, max_L: int = 3) list[tuple[int, Rational]][source]#

Generate a list of allowed LS couplings.

>>> generate_ls_couplings(1.5, 0.5, 0)
[(1, 1/2), (2, 1/2)]
filter_parity_violating_ls(ls_couplings: list[tuple[int, Rational]], parent_parity: SupportsInt, child1_parity: SupportsInt, child2_parity: SupportsInt) list[tuple[int, Rational]][source]#

Filter parity-violating LS combinations from a list of LS couplings.

>>> LS = generate_ls_couplings(0.5, 1.5, 0)  # Λc → Λ(1520)π
>>> LS
[(1, 3/2), (2, 3/2)]
>>> filter_parity_violating_ls(LS, +1, -1, -1)
[(2, 3/2)]
create_spin_range(spin: SupportsFloat) list[Rational][source]#

Create a range of allowed spin projections.

>>> create_spin_range(1.5)
[-3/2, -1/2, 1/2, 3/2]
create_rational_range(__from: SupportsFloat, __to: SupportsFloat, /) list[Rational][source]#

Create a range of rational numbers, especially useful for spin projections.

>>> create_rational_range(-0.5, +1.5)
[-1/2, 1/2, 3/2]
arange(x_1: float, x_2: float, delta: float = 1.0) Generator[float, None, None][source]#