diff --git a/docs/changes/2641.feature.rst b/docs/changes/2641.feature.rst new file mode 100644 index 00000000000..18e979ae82f --- /dev/null +++ b/docs/changes/2641.feature.rst @@ -0,0 +1,4 @@ +Adds ``ctapipe.image.psf_model`` with the parent class for psf models called ``PSFModel`` and a psf model based on pure coma abbaration called ``ComaModel`` +- All psf models have a function ``PSFModel.update_location`` that updates the location in the focal plane where the PSF is evaluated from +- The function ``PSFModel.update_model_parameters`` allows to update the parameters of the PSF model +- The function ``PSFModel.pdf`` gives the value of the PSF in a given location diff --git a/src/ctapipe/image/psf_model.py b/src/ctapipe/image/psf_model.py index cba6fc2098a..92b81744e83 100644 --- a/src/ctapipe/image/psf_model.py +++ b/src/ctapipe/image/psf_model.py @@ -90,7 +90,7 @@ def __init__( Parameters describing the dependency of the asymmetry of the psf on the distance to the center of the camera radial_scale_params : list Parameters describing the dependency of the radial scale on the distance to the center of the camera - radial_scale_params : list + az_scale_params : list Parameters describing the dependency of the azimuthal scale scale on the distance to the center of the camera """ @@ -126,7 +126,7 @@ def pdf(self, r, f): Parameters ---------- - r : float + r : float distance to the center of the camera in meters f : float polar angle in radians diff --git a/src/ctapipe/image/tests/test_psf_model.py b/src/ctapipe/image/tests/test_psf_model.py index 21ecd22fe34..d6c953ea483 100644 --- a/src/ctapipe/image/tests/test_psf_model.py +++ b/src/ctapipe/image/tests/test_psf_model.py @@ -24,4 +24,4 @@ def test_psf(): def test_asymptotic_behavior(): psf_coma = PSFModel.from_name("ComaModel") psf_coma.update_location(1.0, 0.0) - assert np.isclose(psf_coma.psf(10.0, 0.0), 0.0) + assert np.isclose(psf_coma.pdf(10.0, 0.0), 0.0)