_bounds_in_local_coordinates

ell1fit.fitting._bounds_in_local_coordinates(values, factors, logprior_funcs)[source]

Translate each prior’s hard support into the optimizer’s coordinates.

Hard-bounded priors (Phase, EPS, …) return -inf outside their window. An unconstrained optimizer cannot see that and will step past it, which surfaces as “invalid value encountered in subtract” when scipy’s finite-difference gradient probes two infinite points. Passing real bounds keeps the search inside the support and makes scipy select L-BFGS-B.

Returns:
list of tuple

(low, high) per fitted parameter, in local coordinates.