Skip to content

Commit

Permalink
adding changelog, fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Toennis committed Nov 10, 2024
1 parent 295dd24 commit d171084
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/changes/2641.feature.rst
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions src/ctapipe/image/psf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe/image/tests/test_psf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d171084

Please sign in to comment.