Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrin committed Apr 1, 2024
1 parent 54b0704 commit 2c65265
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webbpsf/gridded_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,11 @@ def create_grid(self):
if self.verbose is True:
print(" Position {}/{}: {} pixels".format(i+1, len(self.location_list), loc))

add_ipc_gridded = self.webb.options.get('add_ipc', False) # add variable to keep track of the user's IPC input
add_ipc_gridded = False # add variable to keep track of if this function locally changed the user's IPC input
# Deactivate IPC corrections, if any, before calc_psf as we are applying them later
if self.webb.options.get('add_ipc', True):
self.webb.options['add_ipc'] = False
add_ipc_gridded = True # we should reset the IPC flag below, after computing the PSF

# Create PSF
psf = self.webb.calc_psf(**self._kwargs)
Expand All @@ -309,7 +310,7 @@ def create_grid(self):
# Convolve PSF with a model for interpixel capacitance
if self.add_distortion and add_ipc_gridded:
webbpsf.detectors.apply_detector_ipc(psf, extname=ext)
self.webb.options['add_ipc'] = add_ipc_gridded# restore the user's value for the IPC option
self.webb.options['add_ipc'] = True # restore the user's value for the IPC option

# Add PSF to 5D array
psf_arr[i, :, :] = psf[ext].data
Expand Down

0 comments on commit 2c65265

Please sign in to comment.