TwiceAsNice
2019-02-18
|
Public Member Functions | |
def | __init__ (self, config) |
def | read_fits (self, filename, datatype='< f8', headerKeywords=[]) |
def | read_fits_abspath (self, filename, datatype='< f8', headerKeywords=[]) |
def | read_fits_with_path (self, filename, pathname, datatype='< f8', headerKeywords=[]) |
def | read_m2c_file (self, m2cFileName) |
def | read_amp_envelope_file (self, modAmpEnvelopeFileName) |
def | read_disturbance_slopes_file (self, extractedSlopesFileName) |
def | read_actuator_map_file (self, actuatorMapFileName) |
def | read_calibration_recMat_file (self, calRecMatFileName) |
def | read_calibration_gain_file (self, calGainFileName) |
def | get_disturbance_ice (self) |
def | get_m2c_ice (self) |
def | get_calRecMat_ice (self) |
def | get_calGain_ice (self) |
def | set_modal_amplitude (self, modAmpVec=None, scalefactor=0.0) |
def | create_pushpull_disturbance (self) |
def | extract_disturbance_slopes (self, ringbuffer, frameCountVec) |
def | analyze_disturbance_slopes (self, distSlopesOffset=1) |
def | find_disturbance_slopes_offset (self, pushpullBlockSize=None, filename=None, overwrite=False) |
def | build_interaction_matrix (self, doublepass, skip=1) |
def | invert_interaction_matrix (self, index=None, rcond=1e-15) |
def | save_matrix (self, matrix, filename, overwrite, headerKeywords=[]) |
def | save_disturbance (self, filename, overwrite=False) |
def | save_disturbance_slopes (self, filename, overwrite=False) |
def | save_reconstruction_matrix (self, filename, overwrite=False) |
def | save_interaction_matrix (self, filename, overwrite=False) |
def | display_dm_shape (self, commandVec, note='') |
def | init_slopes_display (self, mask, slopesDisplayTable) |
def | display_disturbance_slopes (self, index) |
def | display_slopes_frame (self, slopesFrame, note="") |
def | display_disturbance (self, decimation=1) |
def | get_mask_pixels (self, full_mask=None, binning=None) |
def | reduceIM (self, full_MPmask=None, full_Pmask=None, IMpath=None, NM4R=None) |
def | __init__ (self, config) |
def | read_fits (self, filename, datatype='< f8', headerKeywords=[]) |
def | read_fits_abspath (self, filename, datatype='< f8', headerKeywords=[]) |
def | read_fits_with_path (self, filename, pathname, datatype='< f8', headerKeywords=[]) |
def | read_m2c_file (self, m2cFileName) |
def | read_amp_envelope_file (self, modAmpEnvelopeFileName) |
def | read_disturbance_slopes_file (self, extractedSlopesFileName) |
def | read_actuator_map_file (self, actuatorMapFileName) |
def | read_calibration_recMat_file (self, calRecMatFileName) |
def | read_calibration_gain_file (self, calGainFileName) |
def | get_disturbance_ice (self) |
def | get_m2c_ice (self) |
def | get_calRecMat_ice (self) |
def | get_calGain_ice (self) |
def | set_modal_amplitude (self, modAmpVec=None, scalefactor=0.0) |
def | create_pushpull_disturbance (self) |
def | extract_disturbance_slopes (self, ringbuffer, frameCountVec) |
def | analyze_disturbance_slopes (self, distSlopesOffset=1) |
def | find_disturbance_slopes_offset (self, pushpullBlockSize=None, filename=None, overwrite=False) |
def | build_interaction_matrix (self, doublepass, skip=1) |
def | invert_interaction_matrix (self, index=None, rcond=1e-15) |
def | save_matrix (self, matrix, filename, overwrite, headerKeywords=[]) |
def | save_disturbance (self, filename, overwrite=False) |
def | save_disturbance_slopes (self, filename, overwrite=False) |
def | save_reconstruction_matrix (self, filename, overwrite=False) |
def | save_interaction_matrix (self, filename, overwrite=False) |
def | display_dm_shape (self, commandVec, note='') |
def | init_slopes_display (self, mask, slopesDisplayTable) |
def | display_disturbance_slopes (self, index) |
def | display_slopes_frame (self, slopesFrame, note="") |
def | display_disturbance (self, decimation=1) |
def | get_mask_pixels (self, full_mask=None, binning=None) |
def | reduceIM (self, full_MPmask=None, full_Pmask=None, IMpath=None, NM4R=None) |
Static Public Attributes | |
string | dataPath = '' |
int | ringbufferSize = 20000 |
int | disturbanceSize = 4000 |
int | slopeFrameSize = 1600 |
nActuators = None | |
maxNumberOfModes = None | |
m2c = None | |
modAmpEnvelopeVec = None | |
actCoords = None | |
calRecMat = None | |
calGainVec = None | |
modAmpVec = None | |
disturbance = None | |
disturbanceSlopes = None | |
intMat = None | |
recMat = None | |
slopesArr = None | |
slopesDisplayTable = None | |
int | m2cNumberOfModes = 0 |
int | distNumberOfModes = 0 |
int | repetition = 0 |
int | pushpullBlockSize = 0 |
disturbanceModeList = None | |
int | numberOfDistBlocks = 0 |
int | numberOfSlopes = 0 |
int | distSlopesOffset = 0 |
int | modAmpScaleFactor = 0 |
float | ASF = 0.0 |
Interaction Matrix class for the LBT Adaptive Secondary (Adsec) and Xinetics deformable mirror (on the LN bench) and methods to calibrate them. - It generates a push-pull disturbance - It extracts the calibration slope data from the ringbuffer - It builds the interaction matrix - It inverts the interaction matrix - It provides functions to produce an IM for a partially illuminated metapupil - It provides methods to provide Adsec configuration data in a form that is compliant with the ICE interface
def laospy.interaction.InteractionMatrix.__init__ | ( | self, | |
config | |||
) |
Initializes AdsecInteractionMatrix with all important data Parameters: ---------- config : App.config object the config property tree Property Tree Parameters: ------------------------ IM.WFS : string Type of the Wafefront sensor. Either 'GWS' or 'HWS' IM.M2C_FILE : string Name of mode-to-command matrix FITS file IM.MOD_AMP_ENVELOPE_FILE : string Name of the maximum modal amplitude vector FITS file IM.DATAPATH : string, optional The directory which contains all input files and to which the calibration data is saved
def laospy.interaction.InteractionMatrix.__init__ | ( | self, | |
config | |||
) |
Initializes AdsecInteractionMatrix with all important data Parameters: ---------- config : App.config object the config property tree Property Tree Parameters: ------------------------ IM.WFS : string Type of the Wafefront sensor. Either 'GWS' or 'HWS' IM.M2C_FILE : string Name of mode-to-command matrix FITS file IM.MOD_AMP_ENVELOPE_FILE : string Name of the maximum modal amplitude vector FITS file IM.DATAPATH : string, optional The directory which contains all input files and to which the calibration data is saved
def laospy.interaction.InteractionMatrix.analyze_disturbance_slopes | ( | self, | |
distSlopesOffset = 1 |
|||
) |
Determines the number of disturbance slope blocks, the start offset and the number of slopes in each frame. The slope frames are are deterministic - each successfully sent slopes frame advances the disturbance by one frame. There is, however, an offset between the first successfully sent slopes frame and the first slopes frame that is affected by the disturbance. This offset is constant (=1) The disturbance is executed in a continuous loop as long as new slopes are being sent by the slope BCU. Up to 4 blocks of 4000 disturbance frames each fit into the ringbuffer, leaving some space to identify the beginning of the block and some continguency to stop the AO loop. Parameters ---------- distSlopesOffset : integer (optional) The offset at the beginning of the slope frames until the disturbance starts. Defaults to 1 Configuration Parameters ------------------------ IM.DISTSLOPESOFFSET : integer (optional) The offset at the beginning of the slope frames until the disturbance starts. Defaults to 1
def laospy.interaction.InteractionMatrix.analyze_disturbance_slopes | ( | self, | |
distSlopesOffset = 1 |
|||
) |
Determines the number of disturbance slope blocks, the start offset and the number of slopes in each frame. The slope frames are are deterministic - each successfully sent slopes frame advances the disturbance by one frame. There is, however, an offset between the first successfully sent slopes frame and the first slopes frame that is affected by the disturbance. This offset is constant (=1) The disturbance is executed in a continuous loop as long as new slopes are being sent by the slope BCU. Up to 4 blocks of 4000 disturbance frames each fit into the ringbuffer, leaving some space to identify the beginning of the block and some continguency to stop the AO loop. Parameters ---------- distSlopesOffset : integer (optional) The offset at the beginning of the slope frames until the disturbance starts. Defaults to 1 Configuration Parameters ------------------------ IM.DISTSLOPESOFFSET : integer (optional) The offset at the beginning of the slope frames until the disturbance starts. Defaults to 1
def laospy.interaction.InteractionMatrix.build_interaction_matrix | ( | self, | |
doublepass, | |||
skip = 1 |
|||
) |
Combines the slope frames for each mode, normalizes and fills the interaction matrix for each disturbance block separately. The interaction matrix has the size maxNumberOfModes x slopeFrameSize (= nActuatorsx1600) and is sparsely filled (slopes for unused modes are zero). Parameters ---------- doublepass : boolean consider double pass nature of calibration setup in normalization skip : integer (optional), default = 1 number of frames to skip at the beginning of a new push or pull block. The first frames may be influenced by the settling of the Adsec.
def laospy.interaction.InteractionMatrix.build_interaction_matrix | ( | self, | |
doublepass, | |||
skip = 1 |
|||
) |
Combines the slope frames for each mode, normalizes and fills the interaction matrix for each disturbance block separately. The interaction matrix has the size maxNumberOfModes x slopeFrameSize (= nActuatorsx1600) and is sparsely filled (slopes for unused modes are zero). Parameters ---------- doublepass : boolean consider double pass nature of calibration setup in normalization skip : integer (optional), default = 1 number of frames to skip at the beginning of a new push or pull block. The first frames may be influenced by the settling of the Adsec.
def laospy.interaction.InteractionMatrix.create_pushpull_disturbance | ( | self | ) |
Creates a push-pull disturbance sequence The disturbance consists of a chain of segments, each corresponding to a KL/ZK mode and each of equal length. The length of the segments is optimized to make best use of the disturbance buffer. Each mode segment consists of a several alternating push- and pull blocks, each of which has pushpullBlockSize. Example ------- pushpullBlockSize = 3, p = push, P = pull sequence: mode0(pppPPPpppPPP...), mode1(pppPPPpppPPP...),... Property Tree Parameters ------------------------ IM.NUM_MODES : int number of modes to be included in the push-pull sequence. IM.PUSH_PULL_BLOCK_SIZE : integer number of consecutive disturbance frames with identical push or pull signature (will be used to average accross) Returns ------- out : ndarray push-pull sequence. 4000x768 elements
def laospy.interaction.InteractionMatrix.create_pushpull_disturbance | ( | self | ) |
Creates a push-pull disturbance sequence The disturbance consists of a chain of segments, each corresponding to a KL/ZK mode and each of equal length. The length of the segments is optimized to make best use of the disturbance buffer. Each mode segment consists of a several alternating push- and pull blocks, each of which has pushpullBlockSize. Example ------- pushpullBlockSize = 3, p = push, P = pull sequence: mode0(pppPPPpppPPP...), mode1(pppPPPpppPPP...),... Property Tree Parameters ------------------------ IM.NUM_MODES : int number of modes to be included in the push-pull sequence. IM.PUSH_PULL_BLOCK_SIZE : integer number of consecutive disturbance frames with identical push or pull signature (will be used to average accross) Returns ------- out : ndarray push-pull sequence. 4000x768 elements
def laospy.interaction.InteractionMatrix.display_disturbance | ( | self, | |
decimation = 1 |
|||
) |
Displays the disturbance Parameters ---------- decimation : int show only every nth record, n being the decimation value
def laospy.interaction.InteractionMatrix.display_disturbance | ( | self, | |
decimation = 1 |
|||
) |
Displays the disturbance Parameters ---------- decimation : int show only every nth record, n being the decimation value
def laospy.interaction.InteractionMatrix.display_disturbance_slopes | ( | self, | |
index | |||
) |
Displays disturbance frame and slope frame in parallel This display can be used to check the offset parameter in extract_disturbance_slopes() Parameters ---------- index : integer the index of the slopes frame and disturbance frame
def laospy.interaction.InteractionMatrix.display_disturbance_slopes | ( | self, | |
index | |||
) |
Displays disturbance frame and slope frame in parallel This display can be used to check the offset parameter in extract_disturbance_slopes() Parameters ---------- index : integer the index of the slopes frame and disturbance frame
def laospy.interaction.InteractionMatrix.display_dm_shape | ( | self, | |
commandVec, | |||
note = '' |
|||
) |
Displays the the commanded shape of the adaptive secondary Parameters ---------- commandVec : ndarray the command vector Property Tree Parameters: ------------------------- IM.ACT_MAP_FILE : string Name of the FITS file with the actuator coordinates
def laospy.interaction.InteractionMatrix.display_dm_shape | ( | self, | |
commandVec, | |||
note = '' |
|||
) |
Displays the the commanded shape of the adaptive secondary Parameters ---------- commandVec : ndarray the command vector Property Tree Parameters: ------------------------- IM.ACT_MAP_FILE : string Name of the FITS file with the actuator coordinates
def laospy.interaction.InteractionMatrix.display_slopes_frame | ( | self, | |
slopesFrame, | |||
note = "" |
|||
) |
Displays a slopes frame Note: It is assumed that the slopes frame is of the order s0_x, s0_y, s1_x, s1_y, s2_x, s2_y,... Parameters ---------- slopesFrame : ndarray The slopes frame to be displayed
def laospy.interaction.InteractionMatrix.display_slopes_frame | ( | self, | |
slopesFrame, | |||
note = "" |
|||
) |
Displays a slopes frame Note: It is assumed that the slopes frame is of the order s0_x, s0_y, s1_x, s1_y, s2_x, s2_y,... Parameters ---------- slopesFrame : ndarray The slopes frame to be displayed
def laospy.interaction.InteractionMatrix.extract_disturbance_slopes | ( | self, | |
ringbuffer, | |||
frameCountVec | |||
) |
Extracts all disturbance slope frames from the ringbuffer To identify the disturbance slope frames the ringbuffer of the Adsec/Xinetics first has to be flushed. This is done by activating the AO (runAO) but not sending slopes for a period normally needed to acquire 20000 slope frames. (oversampling must be below the frame rate). This fills the ringbuffer with identical slopes frames. The frameCountVec will be filled with a constant value. Once slopes are sent again, the frame counter value will be incremented. The block of disturbance slope frames is identified in the frameCountVec. NAN frames will be discarded. If the block of slope frames extends beyond the last element in the ringbuffer into the first elements, they will be rolled such the disturbance frames form a continuous block in the ringbuffer. Parameters ---------- ringbuffer : ndarray a dump of the adsec ringbuffer, 20000x1600 elements frameCountVec : ndarray the frame counter vector that was retrieved from the Adsec/Xinetics
def laospy.interaction.InteractionMatrix.extract_disturbance_slopes | ( | self, | |
ringbuffer, | |||
frameCountVec | |||
) |
Extracts all disturbance slope frames from the ringbuffer To identify the disturbance slope frames the ringbuffer of the Adsec/Xinetics first has to be flushed. This is done by activating the AO (runAO) but not sending slopes for a period normally needed to acquire 20000 slope frames. (oversampling must be below the frame rate). This fills the ringbuffer with identical slopes frames. The frameCountVec will be filled with a constant value. Once slopes are sent again, the frame counter value will be incremented. The block of disturbance slope frames is identified in the frameCountVec. NAN frames will be discarded. If the block of slope frames extends beyond the last element in the ringbuffer into the first elements, they will be rolled such the disturbance frames form a continuous block in the ringbuffer. Parameters ---------- ringbuffer : ndarray a dump of the adsec ringbuffer, 20000x1600 elements frameCountVec : ndarray the frame counter vector that was retrieved from the Adsec/Xinetics
def laospy.interaction.InteractionMatrix.find_disturbance_slopes_offset | ( | self, | |
pushpullBlockSize = None , |
|||
filename = None , |
|||
overwrite = False |
|||
) |
The slope frames are are deterministic - each successfully sent slopes frame advances the disturbance by one frame. There is, however, an offset between the first successfully sent slopes frame and the first slopes frame that is affected by the disturbance. This offset has to be known properly build the interaction matrix. The offset can be one or two frames. It seems that the offset is now constant (=1) for the LBT AdSec. This method will not be used by default anymore, as it adds uncertainty to the offset resulting in sign flips in the interaction and reconstruction matrix. This method analyzes a fingerprint of the slopes: the sign changes of the baseline subtracted, boxcar-normalized slopes and tests the frequency of occurence of sign flips every pushpullBlockSize for different offsets. Parameters ---------- pushpullBlockSize : integer (optional) number of consecutive disturbance frames with identical push or pull signature. It has to be the same number that was used to create the disturbance. Not needed, if the disturbance was created with this object filename : string (optional) If set, the "fingerprint" = baseline subtracted, boxcar-normalized slopes will be written to a FITS file overwrite : bool (optional) If true, an exisiting file with this filename with be overwrittten
def laospy.interaction.InteractionMatrix.find_disturbance_slopes_offset | ( | self, | |
pushpullBlockSize = None , |
|||
filename = None , |
|||
overwrite = False |
|||
) |
The slope frames are are deterministic - each successfully sent slopes frame advances the disturbance by one frame. There is, however, an offset between the first successfully sent slopes frame and the first slopes frame that is affected by the disturbance. This offset has to be known properly build the interaction matrix. The offset can be one or two frames. It seems that the offset is now constant (=1) for the LBT AdSec. This method will not be used by default anymore, as it adds uncertainty to the offset resulting in sign flips in the interaction and reconstruction matrix. This method analyzes a fingerprint of the slopes: the sign changes of the baseline subtracted, boxcar-normalized slopes and tests the frequency of occurence of sign flips every pushpullBlockSize for different offsets. Parameters ---------- pushpullBlockSize : integer (optional) number of consecutive disturbance frames with identical push or pull signature. It has to be the same number that was used to create the disturbance. Not needed, if the disturbance was created with this object filename : string (optional) If set, the "fingerprint" = baseline subtracted, boxcar-normalized slopes will be written to a FITS file overwrite : bool (optional) If true, an exisiting file with this filename with be overwrittten
def laospy.interaction.InteractionMatrix.get_calGain_ice | ( | self | ) |
Returns the gain vector that is used during the calibration compatible to the adsec ICE interface property Tree Parameters ------------------------ IM.CAL_GAIN_FILE : string Name of the FITS file with the gain vector tha is used during the calibration Returns ------- out : lists (nActuators elements)
def laospy.interaction.InteractionMatrix.get_calGain_ice | ( | self | ) |
Returns the gain vector that is used during the calibration compatible to the adsec ICE interface property Tree Parameters ------------------------ IM.CAL_GAIN_FILE : string Name of the FITS file with the gain vector tha is used during the calibration Returns ------- out : lists (nActuators elements)
def laospy.interaction.InteractionMatrix.get_calRecMat_ice | ( | self | ) |
Returns the reconstruction matrix that is used during the calibration as a nested list, compatible to the adsec ICE interface Property Tree Parameters ------------------------ IM.CAL_REC_MAT_FILE : string Name of the FITS file with the reconstruction matrix that is used during the calibration Returns ------- out : list of lists (nActuatorsx1600 elements)
def laospy.interaction.InteractionMatrix.get_calRecMat_ice | ( | self | ) |
Returns the reconstruction matrix that is used during the calibration as a nested list, compatible to the adsec ICE interface Property Tree Parameters ------------------------ IM.CAL_REC_MAT_FILE : string Name of the FITS file with the reconstruction matrix that is used during the calibration Returns ------- out : list of lists (nActuatorsx1600 elements)
def laospy.interaction.InteractionMatrix.get_disturbance_ice | ( | self | ) |
Returns the disturbance as a nested list, compatible to the adsec ICE interface Returns ------- out : list of lists (4000xnActuators elements)
def laospy.interaction.InteractionMatrix.get_disturbance_ice | ( | self | ) |
Returns the disturbance as a nested list, compatible to the adsec ICE interface Returns ------- out : list of lists (4000xnActuators elements)
def laospy.interaction.InteractionMatrix.get_m2c_ice | ( | self | ) |
Returns the m2c matrix as a nested list, compatible to the adsec ICE interface Returns ------- out : list of lists (nActuatorsxnActuators elements)
def laospy.interaction.InteractionMatrix.get_m2c_ice | ( | self | ) |
Returns the m2c matrix as a nested list, compatible to the adsec ICE interface Returns ------- out : list of lists (nActuatorsxnActuators elements)
def laospy.interaction.InteractionMatrix.get_mask_pixels | ( | self, | |
full_mask = None , |
|||
binning = None |
|||
) |
Returns flat array of illuminated pixels from the mask provided. The mask can be full frame or a qudrant one. It only considers the first Quadrant elements. The pixel position can be from 0 to total number of pixels in the quadrant
def laospy.interaction.InteractionMatrix.get_mask_pixels | ( | self, | |
full_mask = None , |
|||
binning = None |
|||
) |
Returns flat array of illuminated pixels from the mask provided. The mask can be full frame or a qudrant one. It only considers the first Quadrant elements. The pixel position can be from 0 to total number of pixels in the quadrant
def laospy.interaction.InteractionMatrix.init_slopes_display | ( | self, | |
mask, | |||
slopesDisplayTable | |||
) |
Initializes the slopes display Parameters ---------- mask : ndarray (2D boolean) A mask representing the subapertures. slopesDisplayTable : ndarray (Integer, size: number of slopes) The order, in which the slopes have to appear in to match the subapertures. The subapertures in the mask are numbered consecutively.
def laospy.interaction.InteractionMatrix.init_slopes_display | ( | self, | |
mask, | |||
slopesDisplayTable | |||
) |
Initializes the slopes display Parameters ---------- mask : ndarray (2D boolean) A mask representing the subapertures. slopesDisplayTable : ndarray (Integer, size: number of slopes) The order, in which the slopes have to appear in to match the subapertures. The subapertures in the mask are numbered consecutively.
def laospy.interaction.InteractionMatrix.invert_interaction_matrix | ( | self, | |
index = None , |
|||
rcond = 1e-15 |
|||
) |
Computes the (Moore-Penrose) pseudo-inverse of the interaction matrix. The default is to invert the mean of all interaction matrices. The result is kept as recMat. Parameters ---------- rcond : float Cutoff for small singular values. Singular values smaller (in modulus) than rcond * largest_singular_value (again, in modulus) are set to zero. index : integer (optional) if defined, only the Interaction Matrix with this index will be inverted.
def laospy.interaction.InteractionMatrix.invert_interaction_matrix | ( | self, | |
index = None , |
|||
rcond = 1e-15 |
|||
) |
Computes the (Moore-Penrose) pseudo-inverse of the interaction matrix. The default is to invert the mean of all interaction matrices. The result is kept as recMat. Parameters ---------- rcond : float Cutoff for small singular values. Singular values smaller (in modulus) than rcond * largest_singular_value (again, in modulus) are set to zero. index : integer (optional) if defined, only the Interaction Matrix with this index will be inverted.
def laospy.interaction.InteractionMatrix.read_actuator_map_file | ( | self, | |
actuatorMapFileName | |||
) |
Reads the FITS file with the actuator coordinates It is a 2xnActuators array with X and Y coordinates for each actuators, in millimeters Parameters ---------- actuatorMapFileName : string Name of the FITS file with the actuator coordinates
def laospy.interaction.InteractionMatrix.read_actuator_map_file | ( | self, | |
actuatorMapFileName | |||
) |
Reads the FITS file with the actuator coordinates It is a 2xnActuators array with X and Y coordinates for each actuators, in millimeters Parameters ---------- actuatorMapFileName : string Name of the FITS file with the actuator coordinates
def laospy.interaction.InteractionMatrix.read_amp_envelope_file | ( | self, | |
modAmpEnvelopeFileName | |||
) |
Reads the maximum modal amplitude vector FITS file. The maximum amplitude vector and the m2c file belong together! Each element of this vector is the maximum amplitude that the mirror can apply for the corresponding mode (element #0 for mode #0 of the KL/ZK basis, and so on). The first 150 values have been capped at 1.5e-7, while after that the amplitude goes down. Parameters ---------- modAmpEnvelopeFileName : string Name of the maximum modal amplitude vector FITS file
def laospy.interaction.InteractionMatrix.read_amp_envelope_file | ( | self, | |
modAmpEnvelopeFileName | |||
) |
Reads the maximum modal amplitude vector FITS file. The maximum amplitude vector and the m2c file belong together! Each element of this vector is the maximum amplitude that the mirror can apply for the corresponding mode (element #0 for mode #0 of the KL/ZK basis, and so on). The first 150 values have been capped at 1.5e-7, while after that the amplitude goes down. Parameters ---------- modAmpEnvelopeFileName : string Name of the maximum modal amplitude vector FITS file
def laospy.interaction.InteractionMatrix.read_calibration_gain_file | ( | self, | |
calGainFileName | |||
) |
Reads the FITS file with the gain vector that is used during the calibration Parameters ---------- calGainFileName : string Name of the FITS file
def laospy.interaction.InteractionMatrix.read_calibration_gain_file | ( | self, | |
calGainFileName | |||
) |
Reads the FITS file with the gain vector that is used during the calibration Parameters ---------- calGainFileName : string Name of the FITS file
def laospy.interaction.InteractionMatrix.read_calibration_recMat_file | ( | self, | |
calRecMatFileName | |||
) |
Reads the FITS file with the reconstruction matrix that is used during the calibration Parameters ---------- calRecMatFileName : string Name of the FITS file
def laospy.interaction.InteractionMatrix.read_calibration_recMat_file | ( | self, | |
calRecMatFileName | |||
) |
Reads the FITS file with the reconstruction matrix that is used during the calibration Parameters ---------- calRecMatFileName : string Name of the FITS file
def laospy.interaction.InteractionMatrix.read_disturbance_slopes_file | ( | self, | |
extractedSlopesFileName | |||
) |
Reads previously extracted disturbance slopes from a FITS file Parameters --------- extractedSlopesFileName : string Name of the FITS file with the extracted slopes
def laospy.interaction.InteractionMatrix.read_disturbance_slopes_file | ( | self, | |
extractedSlopesFileName | |||
) |
Reads previously extracted disturbance slopes from a FITS file Parameters --------- extractedSlopesFileName : string Name of the FITS file with the extracted slopes
def laospy.interaction.InteractionMatrix.read_fits | ( | self, | |
filename, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
def laospy.interaction.InteractionMatrix.read_fits | ( | self, | |
filename, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
def laospy.interaction.InteractionMatrix.read_fits_abspath | ( | self, | |
filename, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
def laospy.interaction.InteractionMatrix.read_fits_abspath | ( | self, | |
filename, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
def laospy.interaction.InteractionMatrix.read_fits_with_path | ( | self, | |
filename, | |||
pathname, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
Reads a FITS file located in the dataPath Parameters ---------- filename : string will be appended to the data Path datatype : string (optional) see numpy convention for data type interpretation headerKeywords : list of strings (optional) defines the properties that are updated by the values found in the header of the FITS file. Returns ------- out : ndarray
def laospy.interaction.InteractionMatrix.read_fits_with_path | ( | self, | |
filename, | |||
pathname, | |||
datatype = '<f8' , |
|||
headerKeywords = [] |
|||
) |
Reads a FITS file located in the dataPath Parameters ---------- filename : string will be appended to the data Path datatype : string (optional) see numpy convention for data type interpretation headerKeywords : list of strings (optional) defines the properties that are updated by the values found in the header of the FITS file. Returns ------- out : ndarray
def laospy.interaction.InteractionMatrix.read_m2c_file | ( | self, | |
m2cFileName | |||
) |
Reads the mode-to-command matrix FITS file Note: m2c is quadratic (nActuatorsxnActuators). Actuator commands are set to 0 for modes that are not calibrated. m2cNumberOfModes is set to the actual number of modes Parameters ---------- m2cFileName : string Name of mode-to-command matrix FITS file Returns ------- out : ndarray Array with nActuatorsxnActuators elements, (commands, modes)
def laospy.interaction.InteractionMatrix.read_m2c_file | ( | self, | |
m2cFileName | |||
) |
Reads the mode-to-command matrix FITS file Note: m2c is quadratic (nActuatorsxnActuators). Actuator commands are set to 0 for modes that are not calibrated. m2cNumberOfModes is set to the actual number of modes Parameters ---------- m2cFileName : string Name of mode-to-command matrix FITS file Returns ------- out : ndarray Array with nActuatorsxnActuators elements, (commands, modes)
def laospy.interaction.InteractionMatrix.reduceIM | ( | self, | |
full_MPmask = None , |
|||
full_Pmask = None , |
|||
IMpath = None , |
|||
NM4R = None |
|||
) |
This function reduces a new interaction matrix from the calibrated interaction matrix and creates new reconstruction matrix. returns this new reconstruction matrix. Needs the full Metapupil mask and partial mask as the inputs. These masks should be the full CCD size and not the quadrant mask.
def laospy.interaction.InteractionMatrix.reduceIM | ( | self, | |
full_MPmask = None , |
|||
full_Pmask = None , |
|||
IMpath = None , |
|||
NM4R = None |
|||
) |
This function reduces a new interaction matrix from the calibrated interaction matrix and creates new reconstruction matrix. returns this new reconstruction matrix. Needs the full Metapupil mask and partial mask as the inputs. These masks should be the full CCD size and not the quadrant mask.
def laospy.interaction.InteractionMatrix.save_disturbance | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the disturbance Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_disturbance | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the disturbance Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_disturbance_slopes | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the disturbance slopes Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_disturbance_slopes | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the disturbance slopes Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_interaction_matrix | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves a cube of interaction matrices - one for each disturbance block. Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_interaction_matrix | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves a cube of interaction matrices - one for each disturbance block. Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_matrix | ( | self, | |
matrix, | |||
filename, | |||
overwrite, | |||
headerKeywords = [] |
|||
) |
Saves an array to a FITS file and adds properties to the header Parameters ---------- matrix : ndarray array to be stored filename : string overwrite : boolean overwrite, if there exists a file with the specified name headerKeywords : list of strings the keywords of the properties that should be stored into the header
def laospy.interaction.InteractionMatrix.save_matrix | ( | self, | |
matrix, | |||
filename, | |||
overwrite, | |||
headerKeywords = [] |
|||
) |
Saves an array to a FITS file and adds properties to the header Parameters ---------- matrix : ndarray array to be stored filename : string overwrite : boolean overwrite, if there exists a file with the specified name headerKeywords : list of strings the keywords of the properties that should be stored into the header
def laospy.interaction.InteractionMatrix.save_reconstruction_matrix | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the reconstruction matrix. Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.save_reconstruction_matrix | ( | self, | |
filename, | |||
overwrite = False |
|||
) |
Saves the reconstruction matrix. Parameters ---------- filename : string overwrite : boolean (optional)
def laospy.interaction.InteractionMatrix.set_modal_amplitude | ( | self, | |
modAmpVec = None , |
|||
scalefactor = 0.0 |
|||
) |
Sets the modal amplitude vector The modal amplitude vector can either be a scaled version of the modal amplitude envelope vector or can be set explicitely. Modal amplitudes must not exceed the modal Amplitude Envelope Parameters ---------- modAmpVec : ndarray, optional amplitude vector (nActuators elements) Property Tree Parameters ------------------------ IM.AMP_SCALE_FACTOR : double factor [0..1] with which the amplitude vector is scaled
def laospy.interaction.InteractionMatrix.set_modal_amplitude | ( | self, | |
modAmpVec = None , |
|||
scalefactor = 0.0 |
|||
) |
Sets the modal amplitude vector The modal amplitude vector can either be a scaled version of the modal amplitude envelope vector or can be set explicitely. Modal amplitudes must not exceed the modal Amplitude Envelope Parameters ---------- modAmpVec : ndarray, optional amplitude vector (nActuators elements) Property Tree Parameters ------------------------ IM.AMP_SCALE_FACTOR : double factor [0..1] with which the amplitude vector is scaled
|
static |
laospy.interaction.InteractionMatrix.adsecNote |
laospy.interaction.InteractionMatrix.adsecPlot |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.config |
|
static |
laospy.interaction.InteractionMatrix.dataPath |
|
static |
laospy.interaction.InteractionMatrix.distNumberOfModes |
|
static |
laospy.interaction.InteractionMatrix.distSlopesOffset |
|
static |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.dmFigure |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.m2cNumberOfModes |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.modAmpScaleFactor |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.numberOfDistBlocks |
|
static |
laospy.interaction.InteractionMatrix.numberOfSlopes |
|
static |
laospy.interaction.InteractionMatrix.pushpullBlockSize |
|
static |
|
static |
laospy.interaction.InteractionMatrix.repetition |
|
static |
|
static |
|
static |
|
static |
laospy.interaction.InteractionMatrix.slopesNote |
laospy.interaction.InteractionMatrix.slopesXPlot |
laospy.interaction.InteractionMatrix.slopesYPlot |
laospy.interaction.InteractionMatrix.triang |
laospy.interaction.InteractionMatrix.wfs |