Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,008 changes: 1,008 additions & 0 deletions dev/notebooks/moffat_maxk_interp.ipynb

Large diffs are not rendered by default.

280 changes: 183 additions & 97 deletions jax_galsim/moffat.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/GalSim
Submodule GalSim updated 1 files
+1 −4 tests/test_moffat.py
1 change: 1 addition & 0 deletions tests/galsim_tests_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,4 @@ allowed_failures:
- "module 'jax_galsim' has no attribute 'LookupTable2D'"
- "module 'jax_galsim' has no attribute 'zernike'"
- "Invalid TFORM4: 1PE(7)" # see https://github.com/astropy/astropy/issues/15477
- "JAX-GalSim does not support truncated Moffat"
2 changes: 1 addition & 1 deletion tests/jax/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def test_benchmark_invert_ab_noraise(benchmark, kind):


def _run_benchmark_moffat_init():
return jgs.Moffat(beta=2.5, half_light_radius=0.6, trunc=1.2).scale_radius
return jgs.Moffat(beta=2.5, half_light_radius=0.6).scale_radius


@pytest.mark.parametrize("kind", ["run"])
Expand Down
2 changes: 0 additions & 2 deletions tests/jax/test_jitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ def test_eq(self, other):

def test_moffat_jitting():
# Test Moffat objects
fwhm_backwards_compatible = 1.3178976627539716
objects = [
galsim.Moffat(beta=5.0, flux=0.2, scale_radius=1.0, gsparams=gsparams),
galsim.Moffat(
beta=2.0,
half_light_radius=1.0,
trunc=5 * fwhm_backwards_compatible,
flux=1.0,
gsparams=gsparams,
),
Expand Down
3 changes: 0 additions & 3 deletions tests/jax/test_moffat_comp_galsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ def test_moffat_comp_galsim_maxk():
galsim.Moffat(beta=1.22, scale_radius=23, flux=23),
galsim.Moffat(beta=3.6, scale_radius=2, flux=23),
galsim.Moffat(beta=12.9, scale_radius=5, flux=23),
galsim.Moffat(beta=1.22, scale_radius=7, flux=23, trunc=30),
galsim.Moffat(beta=3.6, scale_radius=9, flux=23, trunc=50),
galsim.Moffat(beta=12.9, scale_radius=11, flux=23, trunc=1000),
]
threshs = [1.0e-3, 1.0e-4, 0.03]
print("\nbeta \t trunc \t thresh \t kValue(maxk) \t jgs-maxk \t gs-maxk")
Expand Down
2 changes: 0 additions & 2 deletions tests/jax/test_vmapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ def test_eq(self, other):
def test_moffat_vmapping():
# Test Moffat objects

fwhm_backwards_compatible = 1.3178976627539716
objects = [
galsim.Moffat(beta=5.0, flux=0.2, scale_radius=1.0),
galsim.Moffat(
beta=2.0,
half_light_radius=1.0,
trunc=5 * fwhm_backwards_compatible,
flux=1.0,
),
]
Expand Down