From 93794e55f11300421a999f2ba5ccabbd39df505c Mon Sep 17 00:00:00 2001 From: Emiel Por Date: Tue, 15 Nov 2022 23:40:35 -0500 Subject: [PATCH] Add an actuator_grid property. --- catkit2/testbed/proxies/bmc_dm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/catkit2/testbed/proxies/bmc_dm.py b/catkit2/testbed/proxies/bmc_dm.py index 9f620c4c5..67d9d31bb 100644 --- a/catkit2/testbed/proxies/bmc_dm.py +++ b/catkit2/testbed/proxies/bmc_dm.py @@ -2,6 +2,7 @@ import numpy as np from astropy.io import fits +import hcipy @ServiceProxy.register_service_interface('bmc_dm') class BmcDmProxy(ServiceProxy): @@ -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)