Skip to content

Commit

Permalink
corrected a couple of docstrings and one test
Browse files Browse the repository at this point in the history
  • Loading branch information
WilfriedMercier committed Sep 2, 2022
1 parent 7f06a7d commit b595592
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def cleanAndNoise(self, data, data2, var, mask,
:param data: data map
:type data: `ndarray`_
:param data2: square of data map used to add Poisson noise
:param data2: data map convolved by the square of the PSF used to add Poisson noise
:type data2: `ndarray`_
:param var: variance map
:type var: `ndarray`_
Expand All @@ -677,7 +677,7 @@ def cleanAndNoise(self, data, data2, var, mask,
data, var = self.clean(data, var, mask, method=cleanMethod)

# Add Poisson noise to the variance map
if texp is not None or data2 is None:
if texp is not None and data2 is not None:
var += self.poissonVar(data2, texp=texp, texpFac=texpFac)

return data, var
Expand Down Expand Up @@ -731,7 +731,8 @@ def poissonVar(data2: ndarray, texp: Union[int, float] = 1, texpFac: Union[int,
(\Delta F)^2 = | \alpha F |
where :math:`F` is the square of the flux map and :math:`\alpha` is a scale factor defined as
#where :math:`F` is the square of the flux map and :math:`\alpha` is a scale factor defined as
where :math:`F` is the flux map and :math:`\alpha` is a scale factor defined as
.. math::
Expand All @@ -740,7 +741,7 @@ def poissonVar(data2: ndarray, texp: Union[int, float] = 1, texpFac: Union[int,
where :math:`\rm{TEXP}` is the exposure time and :math:`\rm{TEXPFAC}` is a coefficient used to scale it down.
:param data2: square of flux map
:param data2: flux map convolved by the square of the PSF
:type data2: `ndarray`_
:param texp: (**Optional**) exposure time in seconds
Expand Down

0 comments on commit b595592

Please sign in to comment.