TwiceAsNice
2019-02-18
|
Functions | |
def | get_Xinetics_tiptilt () |
def | get_Slopes_tiptilt () |
def | calculate_SE_displacement (current_shape) |
def | displace_SEs (finalX, finalY) |
def | accountForKmirrorAngle (delX, delY) |
Variables | |
config = Application.config() | |
se = SE.connect(config.node('ACQ.CFG.ENDPOINT.SE').String) | |
wfcCtrl | |
wfcCtrlCommon | |
wfcFitsWriter | |
drot = DROT.connect(config.node('CFG.DROT.ENDPOINT').String) | |
filePrefix = time.strftime("%Y-%m-%d-%H-%M", time.localtime()) | |
log_file = config.node('CFG.LOGFILE').String | |
file_m2c = config.node('CFG.IM.M2C_FILE').String | |
m2c = pyfits.getdata(file_m2c) | |
acquired_SEs = sys.argv[2] | |
acquired_SE_list = acquired_SEs.split() | |
def | current_shape = get_Xinetics_tiptilt() |
delX | |
delY | |
finalX | |
finalY | |
def laospy.HWS_Offload_Tip-Tilt2SE.accountForKmirrorAngle | ( | delX, | |
delY | |||
) |
Gets the current position of the K-mirror angle
def laospy.HWS_Offload_Tip-Tilt2SE.calculate_SE_displacement | ( | current_shape | ) |
Calcualtes the SE displacement for the current_shape (DM) passed. Returns the delX, delY values (displacement values for all the acquired SEs) Note that this function make use of the already calibrated matrix.
def laospy.HWS_Offload_Tip-Tilt2SE.displace_SEs | ( | finalX, | |
finalY | |||
) |
Displaces all the acquired SEs by the same delX, delY amount in Focalplane coordinates (in microns) Note that all the other SEs do not move from their already existing position. And that since the relative displacements we make (delX,delY) are very small, <200um, the collision is not anticipated.
def laospy.HWS_Offload_Tip-Tilt2SE.get_Slopes_tiptilt | ( | ) |
Function that will connect to ringbuffer, extract 1000 slopes in open lopop spread across some frames. From the tip-tilt we translate to the DMcommands manually multiplying with the current recMat and a gain value. The SE relative diplacements in X and Y (in focal Plane coordinates) are returned.
def laospy.HWS_Offload_Tip-Tilt2SE.get_Xinetics_tiptilt | ( | ) |
Function that will connect to ringbuffer, extract 1000 dmCommands spread across 1 min. The average shape of the DM is returned.
laospy.HWS_Offload_Tip-Tilt2SE.acquired_SE_list = acquired_SEs.split() |
laospy.HWS_Offload_Tip-Tilt2SE.acquired_SEs = sys.argv[2] |
laospy.HWS_Offload_Tip-Tilt2SE.config = Application.config() |
def laospy.HWS_Offload_Tip-Tilt2SE.current_shape = get_Xinetics_tiptilt() |
laospy.HWS_Offload_Tip-Tilt2SE.delX |
laospy.HWS_Offload_Tip-Tilt2SE.delY |
laospy.HWS_Offload_Tip-Tilt2SE.drot = DROT.connect(config.node('CFG.DROT.ENDPOINT').String) |
laospy.HWS_Offload_Tip-Tilt2SE.file_m2c = config.node('CFG.IM.M2C_FILE').String |
laospy.HWS_Offload_Tip-Tilt2SE.finalX |
laospy.HWS_Offload_Tip-Tilt2SE.finalY |
laospy.HWS_Offload_Tip-Tilt2SE.log_file = config.node('CFG.LOGFILE').String |
laospy.HWS_Offload_Tip-Tilt2SE.m2c = pyfits.getdata(file_m2c) |
laospy.HWS_Offload_Tip-Tilt2SE.se = SE.connect(config.node('ACQ.CFG.ENDPOINT.SE').String) |
laospy.HWS_Offload_Tip-Tilt2SE.wfcCtrl |
laospy.HWS_Offload_Tip-Tilt2SE.wfcCtrlCommon |
laospy.HWS_Offload_Tip-Tilt2SE.wfcFitsWriter |