5 """return the coordinates in pixel of a given DM actuators
8 dm : (Param_dm) : Dm to get the actuators position from
11 xpos : (np.ndarray[ndim=1, dtype=np.float32]) : actuators positions along axis x
13 ypos : (np.ndarray[ndim=1, dtype=np.float32]) : actuators positions along axis y
16 return dm._xpos+1, dm._ypos+1
20 """return the coordinates in meters of a given DM actuators
23 sup : (compasSSupervisor) : supervisor
25 dm_id : (int) : index of the DM
28 xpos : (np.ndarray[ndim=1, dtype=np.float32]) : actuators positions along axis x
30 ypos : (np.ndarray[ndim=1, dtype=np.float32]) : actuators positions along axis y
34 dm=config.p_dms[dm_id]
36 valid_X = ( dm._xpos - geom.get_cent() ) * geom.get_pixsize()
37 valid_Y = ( dm._ypos - geom.get_cent() ) * geom.get_pixsize()
38 return valid_X, valid_Y
42 """return a json description of a dm
45 dm : (Param_dm) : dm to represent as json
48 "n_actu" : dm.get_nact(),
50 "coupling" : dm.get_coupling(),
51 "shift_x" : dm.get_dx() * geom.get_pixsize(),
52 "shift_y" : dm.get_dy() * geom.get_pixsize(),
53 "theta" : dm.get_theta()
def get_actu_pos_meter(sup, dm_id)
return the coordinates in meters of a given DM actuators
def dm_to_json(dm, geom)
return a json description of a dm
def get_actu_pos_pixel(dm)
return the coordinates in pixel of a given DM actuators