Skip to content

A variety of logarithmic integrators, method for empty cache, analytic jacobians for UV and IR parameter #3

Open
Jpwessely wants to merge 2 commits into
JonasTurnwald:mainfrom
Jpwessely:main
Open

A variety of logarithmic integrators, method for empty cache, analytic jacobians for UV and IR parameter #3
Jpwessely wants to merge 2 commits into
JonasTurnwald:mainfrom
Jpwessely:main

Conversation

@Jpwessely

Copy link
Copy Markdown

fredipy_diff_doc.md

For the Integrator that includes the UV tail: it works only for the gluon, I left it in for you to see it but in the current form its to specific.

Jpwessely and others added 2 commits May 26, 2026 16:49
…y.py regarding the cache, added analytic parrameter gradients for kernels with asymptotics
Copilot AI review requested due to automatic review settings June 2, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds analytic hyperparameter gradients for the asymptotic kernel and introduces logarithmic / semi-infinite quadrature integrators to better handle wide dynamic ranges and UV-tail behavior.

Changes:

  • Add _empty_cache() and params_gradient() to the asymptotic kernel wrapper.
  • Introduce Riemann_1D_log, GaussLegendre_1D_log, GaussLegendre_1D_log_UVtail, and GaussLegendre_1D_semiinf integrators.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
fredipy/kernels.py Adds cache invalidation and analytic gradients for AsymptoticKernel hyperparameters.
fredipy/integrators.py Adds new log-grid and semi-infinite Gauss-Legendre-based integration strategies (incl. UV tail correction).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fredipy/kernels.py
Comment on lines +281 to +285
def _empty_cache(self) -> None:
"""Clear this kernel's cache and propagate to the inner kernel."""
self._K_asymp = None
self._x, self._y = np.array([None]), np.array([None])
self.kernel._empty_cache()
Comment thread fredipy/kernels.py
Comment on lines +420 to +423
tau_x = softtheta(x1, self.mu_ir, self.l_ir, -self.ir) # σ_+(x;ir)
tau_y = softtheta(y1, self.mu_ir, self.l_ir, -self.ir)
sig_x = softtheta(x1, self.mu_uv, self.l_uv, -self.uv) # σ_-(x;uv)
sig_y = softtheta(y1, self.mu_uv, self.l_uv, -self.uv)
Comment thread fredipy/kernels.py
grads.append(_wrap)

# ---- UV asymptotic parameter gradients: mu_uv, l_uv ----------------
if self.uv:
Comment thread fredipy/integrators.py
Comment on lines +299 to +308
def singleIntegration(
self,
constraint: LinearEquality,
kernel: Callable,
w_pred: np.ndarray
) -> np.ndarray:
return (
self.weights * constraint(make_row_vector(self.w), x=make_column_vector(constraint.x))
@ kernel(self.w, w_pred)
)
Comment thread fredipy/integrators.py
Comment on lines +376 to +379
# correction_{mn} = T (A_m + A_n) + T²
ones_col = np.ones((A.shape[0], 1))
correction = self.T_uv * (A @ ones_col.T + ones_col @ A.T) + self.T_uv ** 2
return bulk + correction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants