Skip to content

Commit

Permalink
Add light source to example optical model
Browse files Browse the repository at this point in the history
  • Loading branch information
ivalaginja committed Jul 19, 2024
1 parent fb2bfc5 commit e10136b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion testbed_example/example_optical_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ class ExampleOpticalModel(OpticalModel):
This class simulates a simple pupil mask and simple science camera. All parameters are read from
the simulator configuration file, testbed_example/config/simulator.yml.
"""
def __init__(self, config):
def __init__(self, config, wavelength=700e-9):
super().__init__()

self.config = config['simulator']
self.wavelength = wavelength

@self.register_plane('detector', 'pupil')
def detector(wf):
Expand All @@ -22,6 +23,8 @@ def detector(wf):
def pupil(wf):
return self.pupil_mask(wf)

self.set_wavefronts('light_source', hcipy.Wavefront(self.pupil_grid.ones(), self.wavelength))

@property
def pupil_grid(self):
dimensions = self.config['pupil_mask']['dimensions']
Expand Down

0 comments on commit e10136b

Please sign in to comment.