Skip to content

Commit

Permalink
Just to avoid the same type of confusion like mine in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
ivalaginja committed Feb 6, 2025
1 parent 491569e commit 911d852
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dummy_dm_service:
interface: deformable_mirror

device_actuator_mask_fname: !path ../data/dm_mask.fits
num_actuators: 1904
num_actuators_all_dms: 1904

dummy_service:
service_type: dummy_service
Expand Down
6 changes: 3 additions & 3 deletions tests/services/dummy_dm_service/dummy_dm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ def __init__(self):
super().__init__('dummy_dm_service')

self.channel_names = ['correction_howfs', 'correction_lowfs', 'aberration', 'atmosphere']
self.num_actuators = self.config['num_actuators']
self.num_actuators_all_dms = self.config['num_actuators_all_dms']

def open(self):
# Make channels streamable
for channel in self.channel_names:
setattr(self, channel, self.make_data_stream(channel, 'float64', [self.num_actuators], 20))
getattr(self, channel).submit_data(np.zeros(self.num_actuators,))
setattr(self, channel, self.make_data_stream(channel, 'float64', [self.num_actuators_all_dms], 20))
getattr(self, channel).submit_data(np.zeros(self.num_actuators_all_dms,))

def main(self):
while not self.should_shut_down:
Expand Down

0 comments on commit 911d852

Please sign in to comment.