In the PR #49 there are some missing parameter value checks
In the __init__ GalSim checks
if trunc == 0.0 and beta <= _beta_thr:
raise _galsim.GalSimRangeError(
f"Moffat profiles with beta <= {_beta_thr} must be truncated",
beta,
_beta_thr,
)
if trunc < 0.0:
raise _galsim.GalSimRangeError("Moffat trunc must be >= 0", trunc, 0.0)
in the MoffatCalculateSRFromHLR function Galsim checks:
assert rm != 0.0, f"MoffatCalculateSRFromHLR: rm=={rm} should be done elsewhere"
assert (rm > jnp.sqrt(2.0) * re), f"MoffatCalculateSRFromHLR: Cannot find a scaled radius: rm={rm}, sqrt(2)*re={jnp.sqrt(2.) * re}"
In the PR #49 there are some missing parameter value checks
__init__
GalSim checksMoffatCalculateSRFromHLR
function Galsim checks:See how to implement these checking.