Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of Concept: override_aberrations function for WFIRST (Roman) #382

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions webbpsf/wfirst.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ def __init__(self):

self.pupil_mask_list = self._pupil_controller.pupil_mask_list

self._is_custom_aberrations = False
self._detector_npixels = 4096
self._detectors = _load_wfi_detector_aberrations(os.path.join(self._datapath, 'wim_zernikes_cycle8.csv'))
assert len(self._detectors.keys()) > 0
Expand Down Expand Up @@ -556,6 +557,16 @@ def _unmasked_pupil_path(self):
def _masked_pupil_path(self):
return self._pupil_controller._masked_pupil_path

def override_aberrations(self, path):
"""Override detector aberrations"""
self._detectors = _load_wfi_detector_aberrations(path)
self._is_custom_aberrations = True

def reset_override_aberrations(self):
"""Release detector aberrations override and loads default"""
self._detectors = _load_wfi_detector_aberrations(os.path.join(self._datapath, 'wim_zernikes_cycle8.csv'))
self._is_custom_aberrations = False


class CGI(WFIRSTInstrument):
"""
Expand Down