Skip to content

Commit

Permalink
flagCosmicRays(): ensure additional extensions output when debugging …
Browse files Browse the repository at this point in the history
…are simple ndarrays, not MaskedArrays
  • Loading branch information
chris-simpson committed Mar 1, 2023
1 parent 1c943b2 commit bc51afb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions geminidr/core/primitives_spect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2583,8 +2583,6 @@ def flagCosmicRays(self, adinputs=None, **params):

# Set up the background and models to be blank initially:
background = np.zeros(ext.shape)
objfit = np.zeros(ext.shape)
skyfit = np.zeros(ext.shape)

# Fit the object spectrum:
if bkgmodel in ('both', 'object'):
Expand All @@ -2595,7 +2593,7 @@ def flagCosmicRays(self, adinputs=None, **params):
weights=weights,
**fit_1D_params).evaluate()
else:
objfit = np.zeros_like(data)
objfit = np.zeros(ext.shape)
if debug:
ext.OBJFIT = objfit.copy()

Expand All @@ -2614,7 +2612,7 @@ def flagCosmicRays(self, adinputs=None, **params):
weights=weights,
**fit_1D_params).evaluate()
else:
skyfit = np.zeros_like(data)
skyfit = np.zeros(ext.shape)
if debug:
ext.SKYFIT = skyfit

Expand Down

0 comments on commit bc51afb

Please sign in to comment.