"To investigate the differences inside the valid region, fix a bug in the legacy method. It used to return the second-best guess instead of the latest iteration result. Also, we make the margin size for the error measure a parameter."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "45775517-6b5b-4b78-a345-f51e5bba6439",
"metadata": {},
"outputs": [],
"source": [
"def modified_invert_scet_wrt_tps(\n",
" scet_wrt_tps: np.ndarray,\n",
" clockinv_tolerance: float,\n",
" physics_fs: float,\n",
" edge : int,\n",
" interpolation_order: int,\n",
" clockinv_maxiter: int = 15,\n",
"):\n",
" \n",
" error = 0\n",
"\n",
" niter = 0\n",
" next_inverse = scet_wrt_tps\n",
" while not niter or error > clockinv_tolerance:\n",
" if niter >= clockinv_maxiter:\n",
" msg = \"Legacy fixed point iter did not converge\"\n",
To investigate the differences inside the valid region, fix a bug in the legacy method. It used to return the second-best guess instead of the latest iteration result. Also, we make the margin size for the error measure a parameter.