% ========================================================================
% © 2026 José Antonio Sánchez Lázaro
%
% This work is licensed under the Creative Commons Attribution 4.0
% International License (CC BY 4.0).
%
% Original deposit:
% Zenodo DOI: https://doi.org/10.5281/zenodo.16235702
% Date: 20 April 2026 (version v1.0.3)
%
% You are free to share, adapt and use this material for any purpose,
% provided that appropriate credit is given to the original author,
% a link to the license is provided, and any changes are indicated.
%
% Full license: https://creativecommons.org/licenses/by/4.0/
% Contact: research@darcysoft.com
% ========================================================================

\section[Search for sin(2πb/Δt) modulation in JWST lensed arcs]{Detailed Fitting Pipeline for JWST Lensed Arc Profiles}
\label{sec:JWST_wavy_arc}

One of the most distinctive predictions of the 4D Euclidean theory is the existence of \textbf{wavy distortions} in strongly lensed arcs caused by dark matter halos with dominant \(-t\) trajectories. These produce isotropic 4D deformations that project as small sinusoidal perturbations in the observed arc position and brightness, with characteristic form
\[
\delta\alpha(b) \approx \alpha_{\rm GR}(b) \cdot e^{-\Delta t / \tau} \sin\left(\frac{2\pi b}{\Delta t}\right),
\]
where \(b\) is the impact parameter, \(\Delta t \sim 10^{-20}\) s is the t-offset, and \(\tau\) is a damping timescale set by elastic relaxation.

This section presents a complete, ready-to-use pipeline to search for this specific modulation in JWST data (TEMPLATES, GLASS, or public high-\(z\) arcs).

\subsection{Expected Signal}

For a typical \(10^{12}\,M_\odot\) halo at \(z \approx 1\)--2 lensing a background galaxy at \(z \approx 6\)--10:
\begin{itemize}
    \item Position perturbation amplitude: \(\sim 0.08\)--\(0.12\) arcsec (peak-to-peak).
    \item Brightness modulation: \(\sim 8\)--\(12\%\).
    \item Number of oscillations across a typical Einstein arc (\(\theta_E \approx 1.5''\)): 4--7 (depending on \(\Delta t\)).
\end{itemize}

These values are directly taken from the theory (Sec.~5 and the wavy-arc simulation code).

\subsection{Mock Data Generation}

We generate realistic mock JWST arcs including:
\begin{itemize}
    \item Einstein ring geometry.
    \item Sinusoidal position perturbation with amplitude 0.10 arcsec and frequency 5.
    \item Sinusoidal brightness modulation (10\%).
    \item JWST-level noise (astrometric \(\sim 0.03\) arcsec, photometric \(\sim 2\%\)).
\end{itemize}

Code: \texttt{JWST\_wavy\_arc\_fitting.py} (available on Zenodo).

\subsection{Fitting Methodology}

We perform a joint fit to arc position \((x(\theta), y(\theta))\) and surface brightness profile using a 5-parameter model:
\begin{equation}
\begin{aligned}
x(\theta) &= r_E \cos\theta + A_{\rm pos} \sin(2\pi f \theta + \phi) \cos\theta, \\
y(\theta) &= r_E \sin\theta + A_{\rm pos} \sin(2\pi f \theta + \phi) \sin\theta, \\
I(\theta) &= I_0(\theta) \bigl[1 + A_{\rm bright} \cos(2\pi f \theta + \phi)\bigr],
\end{aligned}
\end{equation}
where the free parameters are:
\begin{itemize}
    \item \(r_E\): Einstein radius,
    \item \(A_{\rm pos}\): position modulation amplitude (key parameter, theory predicts \(\sim 0.10''\)),
    \item \(f\): frequency (expected 4--7),
    \item \(\phi\): phase,
    \item \(A_{\rm bright}\): brightness modulation amplitude (\(\sim 0.10\)).
\end{itemize}

We use non-linear least-squares (\texttt{scipy.optimize.curve\_fit}) with JWST noise covariance, followed by MCMC (emcee) for full posterior if needed.

\subsection{Recovery Performance on Mock Data}

On noiseless mock data the pipeline recovers the injected parameters to machine precision:
\begin{itemize}
    \item \(A_{\rm pos} = 0.1000 \pm 0.0000\) arcsec,
    \item Frequency \(f = 5.00 \pm 0.01\),
    \item Phase and brightness modulation also perfectly recovered.
\end{itemize}

With realistic JWST noise (\(\sigma \approx 0.03''\)) the uncertainty on \(A_{\rm pos}\) is \(\pm 0.008''\) (still \(>10\sigma\) detection for the predicted signal).

\subsection{Application to Real JWST Data (Recommended Strategy)}

\begin{enumerate}
    \item \textbf{Target selection}: High-S/N arcs from TEMPLATES or GLASS with clear Einstein rings and minimal substructure contamination (e.g., arcs at \(z > 6\)).
    \item \textbf{Preprocessing}:
    \begin{itemize}
        \item Lens modeling with \texttt{lenstronomy} or \texttt{glee} to subtract smooth macro-model.
        \item Extract 1D arc profile in polar coordinates centered on the lens.
    \end{itemize}
    \item \textbf{Fitting}:
    \begin{itemize}
        \item Run the 5-parameter model above.
        \item Compare Bayesian evidence (or AIC/BIC) between:
        \begin{itemize}
            \item Null hypothesis (smooth arc, \(A_{\rm pos} = 0\)),
            \item Alternative (sinusoidal modulation with free frequency).
        \end{itemize}
    \end{itemize}
    \item \textbf{Significance threshold}: Require \(\Delta \ln \mathcal{Z} > 5\) (strong evidence) and recovered \(A_{\rm pos} > 3\sigma\).
\end{enumerate}

\subsection{Expected Yield in Current JWST Programs}

\begin{itemize}
    \item TEMPLATES: \(\sim 15\)--20 high-quality arcs suitable for this analysis.
    \item With current depth, we expect to detect the modulation at \(>3\sigma\) in 30--40\% of arcs if the theory is correct (conservative estimate).
    \item Non-detection in the full sample would constrain \(A_{\rm pos} < 0.04''\) (95\% CL), tightening the elastic leakage parameter.
\end{itemize}

\subsection{Distinguishing from Standard CDM Substructure}

Standard cold dark matter predicts arc perturbations from subhalos that are:
\begin{itemize}
    \item Localized (not sinusoidal across the whole arc),
    \item Mass-dependent (more small-scale wiggles),
    \item No correlated brightness modulation of the specific sinusoidal form.
\end{itemize}

The theory predicts a \textbf{global, coherent sinusoidal pattern} with specific frequency tied to the t-offset scale --- a unique signature.

\subsection{Conclusions}

The sinusoidal modulation \(\sin(2\pi b / \Delta t)\) is a \textbf{smoking-gun} prediction that can be tested with existing JWST data. The pipeline described here is fully implemented, tested on mocks, and ready for application to public JWST lensing fields.

A positive detection would provide strong evidence for the perceptual t-offset mechanism and, by extension, for the 4D Euclidean dynamic manifold framework.

All code, mock datasets, and fitting scripts are available on Zenodo (DOI: 10.5281/zenodo.16235702).
