Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH add rest of galsim test suite #84

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cc4d715
ENH add photon shooting
beckermr Nov 13, 2023
d7c2969
Merge branch 'main' into photon-array
beckermr Nov 13, 2023
bd703e2
Update jax_galsim/random.py
beckermr Nov 13, 2023
a2d0cfb
Update jax_galsim/random.py
beckermr Nov 13, 2023
bcb1eca
Apply suggestions from code review
beckermr Nov 13, 2023
9c311ff
Update jax_galsim/random.py
beckermr Nov 13, 2023
2e61945
STY blacken
beckermr Nov 13, 2023
a791f13
ENH finished photon shooting for interpolated images
beckermr Nov 14, 2023
c51c144
STY blacken
beckermr Nov 14, 2023
dfbf59f
tests of jit
beckermr Nov 15, 2023
36ccd9f
STY please the flake8
beckermr Nov 15, 2023
2d45b6e
Merge branch 'main' into photon-array
beckermr Nov 15, 2023
289001b
TST jit w/ photon shooting
beckermr Nov 17, 2023
f7ae8aa
REF change repr just a bit
beckermr Nov 17, 2023
42c4ddb
BUG wrong pixel location
beckermr Nov 17, 2023
fe73df2
REF more jit in photon ops
beckermr Nov 17, 2023
8694436
TST add sum to jit test
beckermr Nov 17, 2023
026a03d
STY blacken
beckermr Nov 17, 2023
d9a9d4c
Update jax_galsim/core/utils.py
beckermr Nov 17, 2023
7cc9384
Update jax_galsim/core/utils.py
beckermr Nov 17, 2023
110442f
Update jax_galsim/core/utils.py
beckermr Nov 17, 2023
0cb4de9
Update jax_galsim/noise.py
beckermr Nov 17, 2023
f2ea9b2
REF simpler
beckermr Nov 18, 2023
eada628
Merge branch 'photon-array' of https://github.com/beckermr/JAX-GalSim…
beckermr Nov 18, 2023
1416586
DOC added comments
beckermr Nov 18, 2023
ca3c02c
TST added test for raising
beckermr Nov 18, 2023
8a7a8f3
TST add test of shooting in jit
beckermr Nov 18, 2023
37047c3
TST simpler test code
beckermr Nov 18, 2023
65995b2
BUG make sure tests do not raise even if they fail
beckermr Nov 18, 2023
28a6174
DOC added comments
beckermr Nov 18, 2023
05558ae
DOC added comments
beckermr Nov 18, 2023
ba61a08
TST make test fail
beckermr Nov 18, 2023
8d4bc55
TST added tests of offsets
beckermr Nov 18, 2023
802c1c1
PERF extra jitting
beckermr Nov 18, 2023
454f692
WIP enable fixed size photon arrays
beckermr Nov 19, 2023
3fdd163
REF a lot of changes to enable vmap, clean up APIs, etc.
beckermr Nov 20, 2023
9be573f
ENH use higher order integration method
beckermr Nov 20, 2023
8f3331e
TST enable rest of galsim test suit
beckermr Nov 26, 2023
2ed69af
update to latest test suite
beckermr Nov 26, 2023
4f19dd9
merged
beckermr Nov 26, 2023
a8e669a
STY blacken
beckermr Nov 26, 2023
19357b3
TST next round of test fixes
beckermr Nov 27, 2023
68b2f7e
REF get rid of warning
beckermr Nov 27, 2023
9b9f030
TST new test suite
beckermr Nov 27, 2023
40167b9
TST new test suite
beckermr Nov 27, 2023
b222992
TST new test suite and better deprecation warnings
beckermr Nov 27, 2023
a87846e
TST new test suite
beckermr Nov 27, 2023
fd00e94
TST update test suite
beckermr Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions jax_galsim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
ImageS,
ImageUI,
ImageUS,
_Image,
)

# GSObject
Expand All @@ -55,6 +56,7 @@
from .sum import Add, Sum
from .transform import Transform, Transformation
from .convolve import Convolve, Convolution, Deconvolution, Deconvolve
from .deltafunction import DeltaFunction

# WCS
from .wcs import (
Expand Down Expand Up @@ -86,6 +88,10 @@
)
from .interpolatedimage import InterpolatedImage, _InterpolatedImage

# Photon Shooting
from .photon_array import PhotonArray
from .sensor import Sensor

# packages kept separate
from . import bessel
from . import fits
Expand Down
10 changes: 7 additions & 3 deletions jax_galsim/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from jax._src.numpy.util import _wraps
from jax.tree_util import register_pytree_node_class

from jax_galsim.core.utils import cast_to_float_array_scalar, ensure_hashable
from jax_galsim.core.utils import cast_to_float, ensure_hashable


@_wraps(_galsim.AngleUnit)
Expand All @@ -34,7 +34,11 @@ def __init__(self, value):
"""
:param value: The measure of the unit in radians.
"""
self._value = cast_to_float_array_scalar(value)
if isinstance(value, AngleUnit):
raise TypeError("Cannot construct AngleUnit from another AngleUnit")
self._value = 1.0 * cast_to_float(
value
) # this will cause an exception if things are not numeric

@property
def value(self):
Expand Down Expand Up @@ -142,7 +146,7 @@ def __init__(self, theta, unit=None):
raise TypeError("Invalid unit %s of type %s" % (unit, type(unit)))
else:
# Normal case
self._rad = cast_to_float_array_scalar(theta) * unit.value
self._rad = cast_to_float(theta) * unit.value

@property
def rad(self):
Expand Down
Loading