jaxvacua.flux_utils.map_to_fd#
- map_to_fd(model, moduli, tau, fluxes, enabled=False)#
Optionally map
(moduli, tau, fluxes)to the \(\text{SL}(2,\mathbb{Z}) \times\) monodromy fundamental domain viaFluxEFT.map_to_fd(), handling the numpy/JAX boundary so call sites in eager Python loops stay clean.Details
The real mathematical work (\(\text{SL}(2,\mathbb{Z})\) action on \(\tau\) + monodromy shifts on the moduli axions + boundary snap) is delegated to
model.map_to_fd(). This helper adds three pieces of bookkeeping on top:Opt-out short-circuit: if
enabled=Falsethe inputs are returned unchanged. Lets call sites be written without an outerifblock.numpy ↔ JAX marshalling: inputs are cast to JAX (
jnp.asarray,complex); outputs come back as numpy / Python scalars (np.asarraywithint32fluxes,complextau). Intended for eager-Python sampling loops that consume the result on the numpy side.Output dtype contract:
fluxesis returned asint32(they represent integer flux quanta).
- Parameters:
model (
Any) – Finder instance providingmap_to_fd(). Passed explicitly so the helper works with anyFluxEFTsubclass.moduli (
Any) – Complex structure moduli.tau (
Any) – Axio-dilaton.fluxes (
Any) – Flux vector.enabled (
bool) – IfFalse, the helper is a no-op and returns the inputs verbatim. IfTrue, the FD mapping is applied. Defaults toFalse.
- Returns:
Tuple[Array, complex, Array] –
(moduli_fd, tau_fd, fluxes_fd).When ``enabled=True`` these are numpy arrays / Python ``complex``;
when ``enabled=False`` they are the original input objects unchanged.
- Return type:
Tuple[Any,Any,Any]