Skip to content

Commit

Permalink
Merge pull request #62 from spacetelescope/feature/actuator_grid
Browse files Browse the repository at this point in the history
Add an actuator_grid property to be BostonDM service proxy.
  • Loading branch information
ehpor authored Nov 23, 2022
2 parents 9770c67 + 93794e5 commit db836ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions catkit2/testbed/proxies/bmc_dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
from astropy.io import fits
import hcipy

@ServiceProxy.register_service_interface('bmc_dm')
class BmcDmProxy(ServiceProxy):
Expand All @@ -18,6 +19,12 @@ def dm_mask(self):
def num_actuators(self):
return self.config['num_actuators']

@property
def actuator_grid(self):
dims = self.dm_mask.shape[::-1]

return hcipy.make_uniform_grid(dims, dims)

def dm_shapes_to_command(self, dm1_shape, dm2_shape=None):
command = np.zeros(2048)

Expand Down

0 comments on commit db836ac

Please sign in to comment.