Skip to content

Commit

Permalink
fix: wrap doc strings for bessel, bounds, and box
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Sep 9, 2024
1 parent 73a32cd commit de178cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion jax_galsim/bessel.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def si(x):
)


@implements(_galsim.bessel.kv)
@jax.jit
def kv(nu, x):
"""Modified Bessel 2nd kind"""
nu = 1.0 * nu
x = 1.0 * x
return _tfp_bessel_kve(nu, x) / jnp.exp(jnp.abs(x))
6 changes: 1 addition & 5 deletions jax_galsim/bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,8 @@ def _parse_args(self, *args, **kwargs):
self._isdefined = False

@property
@implements(_galsim.Bounds.true_center)
def true_center(self):
"""The central position of the `Bounds` as a `PositionD`.
This is always (xmax + xmin)/2., (ymax + ymin)/2., even for integer `BoundsI`, where
this may not necessarily be an integer `PositionI`.
"""
if not self.isDefined():
raise _galsim.GalSimUndefinedBoundsError(
"true_center is invalid for an undefined Bounds"
Expand Down
6 changes: 3 additions & 3 deletions jax_galsim/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def _maxL(self):
return jnp.maximum(self.width, self.height)

@property
@implements(_galsim.Box.width)
def width(self):
"""The width of the `Box`."""
return self.params["width"]

@property
@implements(_galsim.Box.height)
def height(self):
"""The height of the `Box`."""
return self.params["height"]

def __hash__(self):
Expand Down Expand Up @@ -115,7 +115,6 @@ def tree_unflatten(cls, aux_data, children):
**aux_data,
)

@implements(_galsim.Box._shoot)
def _shoot(self, photons, rng):
ud = UniformDeviate(rng)

Expand All @@ -134,6 +133,7 @@ def __init__(self, scale, flux=1.0, gsparams=None):
)

@property
@implements(_galsim.Pixel.scale)
def scale(self):
"""The linear scale size of the `Pixel`."""
return self.width
Expand Down

0 comments on commit de178cf

Please sign in to comment.