Skip to content

Commit

Permalink
remove unit test warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Sep 25, 2024
1 parent 5049ff4 commit 3bd4f97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autogalaxy/ellipse/fit_ellipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def model_data(self) -> aa.ArrayIrregular:
return self.data_interp

@property
def residual_map(self):
def residual_map(self) -> aa.ArrayIrregular:
"""
Returns the residual-map of the fit, which is the data minus the model data and therefore the same
as the model data.
Expand All @@ -217,6 +217,10 @@ def residual_map(self):
-------
The residual-map of the fit, which is the data minus the model data and therefore the same as the model data.
"""

if not self.model_data:
return aa.ArrayIrregular(values=np.zeros(self.model_data.shape))

return aa.ArrayIrregular(values=self.model_data - np.nanmean(self.model_data))

@property
Expand Down

0 comments on commit 3bd4f97

Please sign in to comment.