Skip to content

Commit

Permalink
minor changes to comments and fixing the detector test
Browse files Browse the repository at this point in the history
  • Loading branch information
obi-wan76 committed Jan 26, 2024
1 parent 51773c5 commit cb410ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions webbpsf/detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ def apply_detector_ipc(psf_hdulist, extname = 'DET_DIST'):
webbpsf.webbpsf_core._log.debug(f"Skipping IPC simulation since ext {extname} is not found")
return

# This avoid applying IPC corrections twice, especially when calling the psf_grid code path for making ePSFs
# because the IPC corrections are applied in gridded_library

# This avoid applying IPC corrections twice
keyword = 'IPCINST'
if keyword in psf_hdulist[extname].header._keyword_indices: return

Expand Down
2 changes: 1 addition & 1 deletion webbpsf/gridded_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def create_grid(self):
if self.verbose is True:
print(" Position {}/{}: {} pixels".format(i+1, len(self.location_list), loc))

# Deactivate IPC corrections, if any, before calc_psf as we are applying them later

self.webb.options['add_ipc_gridded'] = False # add dictionary key to keep track of 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):
Expand Down

0 comments on commit cb410ce

Please sign in to comment.