Skip to content

Commit 0224e19

Browse files
committed
Update: remove square in Charbonnier transformation
1 parent 138b93b commit 0224e19

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uncertaintyx/b/jax.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ def forward(u: Array) -> Array:
226226
r"""
227227
The forward (Charbonnier) transformation.
228228
229-
Asymptotic limits are :math:`2u` for :math:`u \to \infty` and
229+
The asymptotic limit is :math:`u` for :math:`u \to \infty` and
230230
zero for :math:`u \to -\infty`.
231231
"""
232-
return 0.25 * jnp.square(u + jnp.sqrt(jnp.square(u) + 4.0))
232+
return 0.5 * (u + jnp.sqrt(jnp.square(u) + 4.0))
233233

234234
def inverse(c: Array) -> Array:
235235
"""The inverse (Charbonnier) transformation."""
236-
return (c - 1.0) / jnp.sqrt(c)
236+
return c - 1.0 / c
237237

238238
def misfit(u: Array, _: None = None) -> Array:
239239
"""The misfit function with quadratic transformation."""

0 commit comments

Comments
 (0)