diff --git a/python/lsst/meas/algorithms/treecorrUtils.py b/python/lsst/meas/algorithms/treecorrUtils.py index b0bb7ade9..a560744bc 100644 --- a/python/lsst/meas/algorithms/treecorrUtils.py +++ b/python/lsst/meas/algorithms/treecorrUtils.py @@ -29,7 +29,7 @@ class TreecorrConfig(Config): The fields in this class correspond to the parameters that can be passed to any calls to `treecorr` methods, including catalog creation and two-point correlation function calculations. The default values set for the fields - are identical to the default values set in v4.2 of `treecorr`. + are identical to the default values set in v4.3 of `treecorr`. A separate config class is used instead of constructing a `~lsst.pex.config.DictField` so that mixed types can be @@ -38,8 +38,9 @@ class TreecorrConfig(Config): Notes ----- - This is intended to be used in CalcRhoStatistics class. It only supports - some of the fields that are relevant for rho-statistics calculations. + This is intended to be used with correlations of PSF residuals. It only supports + some of the fields that are relevant for rho-statistics calculations and the likes + of it. """ nbins = Field[int]( @@ -92,7 +93,7 @@ class TreecorrConfig(Config): "This includes both min_sep and max_sep above, as well as the " "units of the output distance values." ), - default="radian", + default=None, optional=True, allowed={ units: units for units in ["arcsec", "arcmin", "degree", "hour", "radian"] @@ -202,9 +203,10 @@ class TreecorrConfig(Config): optional=True, ) - rng_seed = Field[int]( + rng = Field[int]( doc="Value to seed the treecorr random number generator with. Used to generate patches.", - default=13579, + default=None, + optional=True, ) def validate(self): diff --git a/tests/test_computeExPsf.py b/tests/test_computeExPsf.py index 9f17ebe4b..c0195d277 100644 --- a/tests/test_computeExPsf.py +++ b/tests/test_computeExPsf.py @@ -238,7 +238,7 @@ def test_comp_ex_psf(self) -> None: np.testing.assert_allclose(output1.metric_E1, 1.0, atol=2e-1) np.testing.assert_allclose(output1.metric_E2, 1.0, atol=2e-1) - np.testing.assert_allclose(output1.metric_Ex, 0.0, atol=1e-1) + np.testing.assert_allclose(output1.metric_Ex, 0.0, atol=2e-1) config = ComputeExPsfTask.ConfigClass() @@ -253,9 +253,9 @@ def test_comp_ex_psf(self) -> None: task = ComputeExPsfTask(config) output2 = task.run(self.de1, self.de2, ra, dec, units="arcmin") - np.testing.assert_allclose(output2.metric_E1, 0.20, atol=1e-1) - np.testing.assert_allclose(output2.metric_E2, 0.05, atol=1e-1) - np.testing.assert_allclose(output2.metric_Ex, 0.0, atol=1e-1) + np.testing.assert_allclose(output2.metric_E1, 0.20, atol=2e-1) + np.testing.assert_allclose(output2.metric_E2, 0.05, atol=2e-1) + np.testing.assert_allclose(output2.metric_Ex, 0.0, atol=2e-1) config = ComputeExPsfTask.ConfigClass() @@ -271,9 +271,9 @@ def test_comp_ex_psf(self) -> None: task = ComputeExPsfTask(config) output2 = task.run(self.de1, self.de2, ra, dec, units="arcmin") - np.testing.assert_allclose(output2.metric_E1, 0.0, atol=1e-1) - np.testing.assert_allclose(output2.metric_E2, 0.0, atol=1e-1) - np.testing.assert_allclose(output2.metric_Ex, 0.0, atol=1e-1) + np.testing.assert_allclose(output2.metric_E1, 0.0, atol=2e-1) + np.testing.assert_allclose(output2.metric_E2, 0.0, atol=2e-1) + np.testing.assert_allclose(output2.metric_Ex, 0.0, atol=2e-1) def setup_module(module):