TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
laospy.influence.ActuatorInfluence Class Reference
Collaboration diagram for laospy.influence.ActuatorInfluence:
Collaboration graph

Public Member Functions

def __init__ (self, config)
 
def init_dm (self)
 
def init_source (self)
 
def init_influence_function (self)
 
def read_fisba_data (self, path)
 
def read_next (self)
 
def display_measurement (self, type='response')
 
def display_array (self, array, act=None)
 
def display_actgrid (self, array, transform=True)
 
def display_flat (self)
 
def push (self)
 
def pull (self)
 
def response (self)
 
def save (self)
 
def save_zero (self)
 
def save_influence_matrix (self)
 
def save_inverse_influence_matrix (self)
 
def save_metapupil_parameters (self)
 
def save_flat_pattern (self)
 
def load (self, actuatorIndex)
 
def load_zero (self)
 
def load_influence_matrix (self)
 
def load_inverse_influence_matrix (self)
 
def load_metapupil_parameters (self)
 
def measure_zero (self)
 
def measure_response (self, actuatorIndex)
 
def measure_all_actuators (self)
 
def locate_actuator (self, display=False)
 
def find_actgrid_transform (self, display=False)
 
def transform_into_actgrid (self, array)
 
def get_actgrid_position (self, pos)
 
def get_actgrid_scale (self)
 
def extract_influence_function (self, actuatorIndex, display=False)
 
def create_metapupil_zernike_array (self, j, brim=True, display=False)
 
def build_influence_matrix (self, useMetapupil=True, display=False)
 
def invert_influence_matrix (self, rcond=1e-15)
 
def find_metapupil_parameters (self, display=False)
 
def flatten_dm (self, threshold)
 
def __init__ (self, config)
 
def init_dm (self)
 
def init_source (self)
 
def init_influence_function (self)
 
def read_fisba_data (self, path)
 
def read_next (self)
 
def display_measurement (self, type='response')
 
def display_array (self, array, act=None)
 
def display_actgrid (self, array, transform=True)
 
def display_flat (self)
 
def push (self)
 
def pull (self)
 
def response (self)
 
def save (self)
 
def save_zero (self)
 
def save_influence_matrix (self)
 
def save_inverse_influence_matrix (self)
 
def save_metapupil_parameters (self)
 
def save_flat_pattern (self)
 
def load (self, actuatorIndex)
 
def load_zero (self)
 
def load_influence_matrix (self)
 
def load_inverse_influence_matrix (self)
 
def load_metapupil_parameters (self)
 
def measure_zero (self)
 
def measure_response (self, actuatorIndex)
 
def measure_all_actuators (self)
 
def locate_actuator (self, display=False)
 
def find_actgrid_transform (self, display=False)
 
def transform_into_actgrid (self, array)
 
def get_actgrid_position (self, pos)
 
def get_actgrid_scale (self)
 
def extract_influence_function (self, actuatorIndex, display=False)
 
def create_metapupil_zernike_array (self, j, brim=True, display=False)
 
def build_influence_matrix (self, useMetapupil=True, display=False)
 
def invert_influence_matrix (self, rcond=1e-15)
 
def find_metapupil_parameters (self, display=False)
 
def flatten_dm (self, threshold)
 

Public Attributes

 config
 
 sourceIsWFS
 
 wfcFileSuffix
 
 datapath
 
 dm
 
 pushPullVal
 
 actuators
 
 ccd
 
 numImages
 
 fisbapath
 
 actSampling
 
 infRad
 
 fisbaCenter
 
 fisbaRad
 
 sizexy
 
 useBrim
 
 actuatorIndex
 
 influenceMatrix
 
 transform
 
 offset
 
 invInfluenceMatrix
 
 pupilCenter
 
 pupilDiam
 
 insideActuators
 
 outsideActuators
 

Static Public Attributes

 pushArray = ma.zeros((1020,1020))
 
 pullArray = ma.zeros((1020,1020))
 
 responseArray = ma.zeros((1020,1020))
 
 flatArray = ma.zeros((1020,1020))
 
 zeroArray = ma.zeros((1020,1020))
 
 influenceFunction = ma.zeros((1020,1020))
 
int actuatorIndex = -1
 

Private Member Functions

def _init_measurement_display (self)
 
def _set_fisba_filesize (self)
 
def _newest_fisba_filename (self)
 
def _init_actgrid_display (self, array, transform=True)
 
def _pushpull (self, direction)
 
def _create_actuator_slopes (self)
 
def _init_measurement_display (self)
 
def _set_fisba_filesize (self)
 
def _newest_fisba_filename (self)
 
def _init_actgrid_display (self, array, transform=True)
 
def _pushpull (self, direction)
 
def _create_actuator_slopes (self)
 

Private Attributes

 _actMap
 
 _actIndices
 
 _fisbaFileSize
 
 _measImg1
 
 _measImg2
 
 _measImg3
 
 _colorbar1
 
 _colorbar2
 
 _colorbar3
 
 _measNote1
 
 _measNote2
 
 _measNote3
 
 _arrayFig
 
 _arrayAx
 
 _arrayImg
 
 _arrayNnote
 
 _actgridAx
 
 _actgridIm
 

Static Private Attributes

int _numAct = 349
 
 _actCoords = np.zeros((_numAct, 2))
 
int _maskValue = -0x80000000
 
int _fisbaFileSize = 0
 

Detailed Description

Methods to measure the spatial influence of the DM actuators with the FISBA or the WFS. 

Creation of 
 - Influence Matrices
 - relationship between Actuator position and illuminated metapupil

Constructor & Destructor Documentation

◆ __init__() [1/2]

def laospy.influence.ActuatorInfluence.__init__ (   self,
  config 
)
Parameters
----------
config : node
    the config property tree node

Property Tree Parameters:
------------------------
INF.DATAPATH
    The path of the measurements, influence matrix etc.

INF.SOURCE
    Either "WFS" or "FISBA"

◆ __init__() [2/2]

def laospy.influence.ActuatorInfluence.__init__ (   self,
  config 
)
Parameters
----------
config : node
    the config property tree node

Property Tree Parameters:
------------------------
INF.DATAPATH
    The path of the measurements, influence matrix etc.

INF.SOURCE
    Either "WFS" or "FISBA"

Member Function Documentation

◆ _create_actuator_slopes() [1/2]

def laospy.influence.ActuatorInfluence._create_actuator_slopes (   self)
private
Calculates the slopes response for the WFS measurement

Returns
--------
cslopes : ndarray
    complex slopes (x + j*y). 

◆ _create_actuator_slopes() [2/2]

def laospy.influence.ActuatorInfluence._create_actuator_slopes (   self)
private
Calculates the slopes response for the WFS measurement

Returns
--------
cslopes : ndarray
    complex slopes (x + j*y). 

◆ _init_actgrid_display() [1/2]

def laospy.influence.ActuatorInfluence._init_actgrid_display (   self,
  array,
  transform = True 
)
private
Initializes the actuator grid display

Parameters
----------
array : ndarray
    array to be displayed
transform : boolean
    true if array should be transformed into the actuator grid

◆ _init_actgrid_display() [2/2]

def laospy.influence.ActuatorInfluence._init_actgrid_display (   self,
  array,
  transform = True 
)
private
Initializes the actuator grid display

Parameters
----------
array : ndarray
    array to be displayed
transform : boolean
    true if array should be transformed into the actuator grid

◆ _init_measurement_display() [1/2]

def laospy.influence.ActuatorInfluence._init_measurement_display (   self)
private
Initializes the measurement display

◆ _init_measurement_display() [2/2]

def laospy.influence.ActuatorInfluence._init_measurement_display (   self)
private
Initializes the measurement display

◆ _newest_fisba_filename() [1/2]

def laospy.influence.ActuatorInfluence._newest_fisba_filename (   self)
private
returns the filename of the most recent µShape dataset 

◆ _newest_fisba_filename() [2/2]

def laospy.influence.ActuatorInfluence._newest_fisba_filename (   self)
private
returns the filename of the most recent µShape dataset 

◆ _pushpull() [1/2]

def laospy.influence.ActuatorInfluence._pushpull (   self,
  direction 
)
private
pushes or pulls the  current actuator and returns the measurement

Parameters
----------
direction : int 
    direction should be 1 or -1

◆ _pushpull() [2/2]

def laospy.influence.ActuatorInfluence._pushpull (   self,
  direction 
)
private
pushes or pulls the  current actuator and returns the measurement

Parameters
----------
direction : int 
    direction should be 1 or -1

◆ _set_fisba_filesize() [1/2]

def laospy.influence.ActuatorInfluence._set_fisba_filesize (   self)
private
Determines the size of the µ-Shape datafiles 

◆ _set_fisba_filesize() [2/2]

def laospy.influence.ActuatorInfluence._set_fisba_filesize (   self)
private
Determines the size of the µ-Shape datafiles 

◆ build_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.build_influence_matrix (   self,
  useMetapupil = True,
  display = False 
)
Extracts the influence function for all actuators from FISBA measurements. 

Inverts the influence matrix and saves the result

Parameters:
-----------
useMetapupil : boolean
    if True, only the subapertures inside the (brimmed) metapupil will be considered

display : boolean
    Displays the response of each actuator

◆ build_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.build_influence_matrix (   self,
  useMetapupil = True,
  display = False 
)
Extracts the influence function for all actuators from FISBA measurements. 

Inverts the influence matrix and saves the result

Parameters:
-----------
useMetapupil : boolean
    if True, only the subapertures inside the (brimmed) metapupil will be considered

display : boolean
    Displays the response of each actuator

◆ create_metapupil_zernike_array() [1/2]

def laospy.influence.ActuatorInfluence.create_metapupil_zernike_array (   self,
  j,
  brim = True,
  display = False 
)
Creates a zernike mode defined on the metapupil.  

The unmasked area corresponds to the metapupil. Optionally, a "brim" can be added, in 
which the unit circle is extended outwards and mirrored radially. In addition     
the brim transits radially from the Zernike unit circle to zero at the edge of the 
actuator pattern. This should define reasonable positions for actuators that are not 
inside the metapupil.

Parameters
----------
j : integer
    zernike mode to fill the metapupil

brim : boolean
    True if a brim should be added to the zernike mode in the metapupil

display : boolean
    displays the result on the actuator grid

◆ create_metapupil_zernike_array() [2/2]

def laospy.influence.ActuatorInfluence.create_metapupil_zernike_array (   self,
  j,
  brim = True,
  display = False 
)
Creates a zernike mode defined on the metapupil.  

The unmasked area corresponds to the metapupil. Optionally, a "brim" can be added, in 
which the unit circle is extended outwards and mirrored radially. In addition     
the brim transits radially from the Zernike unit circle to zero at the edge of the 
actuator pattern. This should define reasonable positions for actuators that are not 
inside the metapupil.

Parameters
----------
j : integer
    zernike mode to fill the metapupil

brim : boolean
    True if a brim should be added to the zernike mode in the metapupil

display : boolean
    displays the result on the actuator grid

◆ display_actgrid() [1/2]

def laospy.influence.ActuatorInfluence.display_actgrid (   self,
  array,
  transform = True 
)
Transforms the array and displays it  behind the actuator grid

Parameters
----------
array : ndarray
    array to be displayed
transform : boolean
    true if array should be transformed into the actuator grid

◆ display_actgrid() [2/2]

def laospy.influence.ActuatorInfluence.display_actgrid (   self,
  array,
  transform = True 
)
Transforms the array and displays it  behind the actuator grid

Parameters
----------
array : ndarray
    array to be displayed
transform : boolean
    true if array should be transformed into the actuator grid

◆ display_array() [1/2]

def laospy.influence.ActuatorInfluence.display_array (   self,
  array,
  act = None 
)
 

◆ display_array() [2/2]

def laospy.influence.ActuatorInfluence.display_array (   self,
  array,
  act = None 
)
 

◆ display_flat() [1/2]

def laospy.influence.ActuatorInfluence.display_flat (   self)

◆ display_flat() [2/2]

def laospy.influence.ActuatorInfluence.display_flat (   self)

◆ display_measurement() [1/2]

def laospy.influence.ActuatorInfluence.display_measurement (   self,
  type = 'response' 
)
Displays the measurement

◆ display_measurement() [2/2]

def laospy.influence.ActuatorInfluence.display_measurement (   self,
  type = 'response' 
)
Displays the measurement

◆ extract_influence_function() [1/2]

def laospy.influence.ActuatorInfluence.extract_influence_function (   self,
  actuatorIndex,
  display = False 
)
Extracts the influence of an actuator from FISBA measurements

Parameters
----------
actuatorIndex : int
    The actuator for which the influence function is isolated
    
display : boolean
    displays the extracted responses
  
Returns
-------
response : ndarray (flat)
    the actuator response 

◆ extract_influence_function() [2/2]

def laospy.influence.ActuatorInfluence.extract_influence_function (   self,
  actuatorIndex,
  display = False 
)
Extracts the influence of an actuator from FISBA measurements

Parameters
----------
actuatorIndex : int
    The actuator for which the influence function is isolated
    
display : boolean
    displays the extracted responses
  
Returns
-------
response : ndarray (flat)
    the actuator response 

◆ find_actgrid_transform() [1/2]

def laospy.influence.ActuatorInfluence.find_actgrid_transform (   self,
  display = False 
)
identifies the location of actuators and determines a transformation from measurement
coordinates into actuator space coordinates. The transformation is determined by a least 
square fit of the position of a number of actuators 

Parameters
----------
display : boolean (optional)
    shows the actuator responses and the position of the maxima that are used to find
    the transformation
    
Property Tree Parameters:
------------------------
INF.ACTLIST : list of int
    the actuators that are probed to determine the transformation
    
INF.ACTSAMPLING : int
    number of pixels per actuator spacing
    
INF.INFRAD : float
    The radius of the region around each actuator, in which the actuator response is 
    considered. In actuator grid spacing 

◆ find_actgrid_transform() [2/2]

def laospy.influence.ActuatorInfluence.find_actgrid_transform (   self,
  display = False 
)
identifies the location of actuators and determines a transformation from measurement
coordinates into actuator space coordinates. The transformation is determined by a least 
square fit of the position of a number of actuators 

Parameters
----------
display : boolean (optional)
    shows the actuator responses and the position of the maxima that are used to find
    the transformation
    
Property Tree Parameters:
------------------------
INF.ACTLIST : list of int
    the actuators that are probed to determine the transformation
    
INF.ACTSAMPLING : int
    number of pixels per actuator spacing
    
INF.INFRAD : float
    The radius of the region around each actuator, in which the actuator response is 
    considered. In actuator grid spacing 

◆ find_metapupil_parameters() [1/2]

def laospy.influence.ActuatorInfluence.find_metapupil_parameters (   self,
  display = False 
)
Determines the position and the diameter of the metapupil in the actuator grid

Property Tree Parameters:
------------------------
INF.METAPUPIL_CENTER : NicePoint
    The center of the metapupil in CCD quadrant coordinates
    
INF.METAPUPIL_DIAM : Float
    THe diameter of the metapupil in CCD pixels

◆ find_metapupil_parameters() [2/2]

def laospy.influence.ActuatorInfluence.find_metapupil_parameters (   self,
  display = False 
)
Determines the position and the diameter of the metapupil in the actuator grid

Property Tree Parameters:
------------------------
INF.METAPUPIL_CENTER : NicePoint
    The center of the metapupil in CCD quadrant coordinates
    
INF.METAPUPIL_DIAM : Float
    THe diameter of the metapupil in CCD pixels

◆ flatten_dm() [1/2]

def laospy.influence.ActuatorInfluence.flatten_dm (   self,
  threshold 
)
Flattens the Xinetics mirror

Parameters
----------
threshold : int
the maximum value the absolute actuator command is allowed to be

◆ flatten_dm() [2/2]

def laospy.influence.ActuatorInfluence.flatten_dm (   self,
  threshold 
)
Flattens the Xinetics mirror

Parameters
----------
threshold : int
the maximum value the absolute actuator command is allowed to be

◆ get_actgrid_position() [1/2]

def laospy.influence.ActuatorInfluence.get_actgrid_position (   self,
  pos 
)
returns the actuator grid coordinates of a position

Parameters
----------
pos : ndarray(2)
    position in metapupil or FISBA coordinates
    
Returns
-------
actgridPos : ndarray(2) 
    position in actuator grid coordinates, rounded to next full integer

◆ get_actgrid_position() [2/2]

def laospy.influence.ActuatorInfluence.get_actgrid_position (   self,
  pos 
)
returns the actuator grid coordinates of a position

Parameters
----------
pos : ndarray(2)
    position in metapupil or FISBA coordinates
    
Returns
-------
actgridPos : ndarray(2) 
    position in actuator grid coordinates, rounded to next full integer

◆ get_actgrid_scale() [1/2]

def laospy.influence.ActuatorInfluence.get_actgrid_scale (   self)
returns the scale between metapupil/FISBA measurement and actuator grid

◆ get_actgrid_scale() [2/2]

def laospy.influence.ActuatorInfluence.get_actgrid_scale (   self)
returns the scale between metapupil/FISBA measurement and actuator grid

◆ init_dm() [1/2]

def laospy.influence.ActuatorInfluence.init_dm (   self)
Initializes connection to the Xinetics Service object and the pushPullVal. 

Property Tree Parameters:
------------------------
INF.DM.ENDPOINT : string
    The endpoint of the DM Service

INF.PUSHPULLVAL : int
    The Actuator Command Amplitude for each push or pull motion

◆ init_dm() [2/2]

def laospy.influence.ActuatorInfluence.init_dm (   self)
Initializes connection to the Xinetics Service object and the pushPullVal. 

Property Tree Parameters:
------------------------
INF.DM.ENDPOINT : string
    The endpoint of the DM Service

INF.PUSHPULLVAL : int
    The Actuator Command Amplitude for each push or pull motion

◆ init_influence_function() [1/2]

def laospy.influence.ActuatorInfluence.init_influence_function (   self)
Initializes parameters related to the influence functions

Property Tree Parameters:
------------------------
INF.ACTSAMPLING : int
    number of pixels per actuator spacing
    
INF.INFRAD : float
    The radius of the region around each actuator, in which the actuator response is 
    considered. In actuator grid spacing 

INF.FISBA_CENTER : NicePoint
    Center of the region covered by the FISBA. In actuator grid coordinates
    
INF.FISBA_RAD : float            
    Radius of the region covered by the FISBA. In actuator grid spacing
    
INF.BRIM : 

◆ init_influence_function() [2/2]

def laospy.influence.ActuatorInfluence.init_influence_function (   self)
Initializes parameters related to the influence functions

Property Tree Parameters:
------------------------
INF.ACTSAMPLING : int
    number of pixels per actuator spacing
    
INF.INFRAD : float
    The radius of the region around each actuator, in which the actuator response is 
    considered. In actuator grid spacing 

INF.FISBA_CENTER : NicePoint
    Center of the region covered by the FISBA. In actuator grid coordinates
    
INF.FISBA_RAD : float            
    Radius of the region covered by the FISBA. In actuator grid spacing
    
INF.BRIM : 

◆ init_source() [1/2]

def laospy.influence.ActuatorInfluence.init_source (   self)
Initializes the source for the measurement.

If the source is WFC, a camera object is created.
If the source is FISBA, the fisbapath is set and the size of the µShape files determined. 
In the latter case the FISBA should be running, measuring in continuous mode and saving 
the data in numbered files of µShape binary format

◆ init_source() [2/2]

def laospy.influence.ActuatorInfluence.init_source (   self)
Initializes the source for the measurement.

If the source is WFC, a camera object is created.
If the source is FISBA, the fisbapath is set and the size of the µShape files determined. 
In the latter case the FISBA should be running, measuring in continuous mode and saving 
the data in numbered files of µShape binary format

◆ invert_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.invert_influence_matrix (   self,
  rcond = 1e-15 
)
Computes the (Moore-Penrose) pseudo-inverse of the influence matrix.
      
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.

◆ invert_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.invert_influence_matrix (   self,
  rcond = 1e-15 
)
Computes the (Moore-Penrose) pseudo-inverse of the influence matrix.
      
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.

◆ load() [1/2]

def laospy.influence.ActuatorInfluence.load (   self,
  actuatorIndex 
)
Loads the calibration data of the specified actuator

◆ load() [2/2]

def laospy.influence.ActuatorInfluence.load (   self,
  actuatorIndex 
)
Loads the calibration data of the specified actuator

◆ load_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.load_influence_matrix (   self)
Loads the (inverted) influence matrix

◆ load_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.load_influence_matrix (   self)
Loads the (inverted) influence matrix

◆ load_inverse_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.load_inverse_influence_matrix (   self)
Loads the inverted influence matrix

◆ load_inverse_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.load_inverse_influence_matrix (   self)
Loads the inverted influence matrix

◆ load_metapupil_parameters() [1/2]

def laospy.influence.ActuatorInfluence.load_metapupil_parameters (   self)
Loads the center position and diameter of the metapupil in actuator grid units

◆ load_metapupil_parameters() [2/2]

def laospy.influence.ActuatorInfluence.load_metapupil_parameters (   self)
Loads the center position and diameter of the metapupil in actuator grid units

◆ load_zero() [1/2]

def laospy.influence.ActuatorInfluence.load_zero (   self)
Loads the zero-response 

◆ load_zero() [2/2]

def laospy.influence.ActuatorInfluence.load_zero (   self)
Loads the zero-response 

◆ locate_actuator() [1/2]

def laospy.influence.ActuatorInfluence.locate_actuator (   self,
  display = False 
)
Locates an actuator in the responseArray

If the source is FISBA, the maximum pixel in the responseArray is chosen. If the source is 
WFS a Gaussian is fitted to the slopes response of the actuator in the metapupil

Returns
-------
coordinates, array : ndarray, ndarray
    coordinates of the actuator and image of response 

◆ locate_actuator() [2/2]

def laospy.influence.ActuatorInfluence.locate_actuator (   self,
  display = False 
)
Locates an actuator in the responseArray

If the source is FISBA, the maximum pixel in the responseArray is chosen. If the source is 
WFS a Gaussian is fitted to the slopes response of the actuator in the metapupil

Returns
-------
coordinates, array : ndarray, ndarray
    coordinates of the actuator and image of response 

◆ measure_all_actuators() [1/2]

def laospy.influence.ActuatorInfluence.measure_all_actuators (   self)
Measures the response of all actuators and measures zero

◆ measure_all_actuators() [2/2]

def laospy.influence.ActuatorInfluence.measure_all_actuators (   self)
Measures the response of all actuators and measures zero

◆ measure_response() [1/2]

def laospy.influence.ActuatorInfluence.measure_response (   self,
  actuatorIndex 
)
Sets the current actuator and measures its response

The result will be saved in the datapath

◆ measure_response() [2/2]

def laospy.influence.ActuatorInfluence.measure_response (   self,
  actuatorIndex 
)
Sets the current actuator and measures its response

The result will be saved in the datapath

◆ measure_zero() [1/2]

def laospy.influence.ActuatorInfluence.measure_zero (   self)
@brief measures the zero-response

The zero-response is the surface deviation of the DM 
without an actuator being pushed or pulled

◆ measure_zero() [2/2]

def laospy.influence.ActuatorInfluence.measure_zero (   self)
@brief measures the zero-response

The zero-response is the surface deviation of the DM 
without an actuator being pushed or pulled

◆ pull() [1/2]

def laospy.influence.ActuatorInfluence.pull (   self)
Pulls the current actuator. 

◆ pull() [2/2]

def laospy.influence.ActuatorInfluence.pull (   self)
Pulls the current actuator. 

◆ push() [1/2]

def laospy.influence.ActuatorInfluence.push (   self)
Pushes the current actuator

◆ push() [2/2]

def laospy.influence.ActuatorInfluence.push (   self)
Pushes the current actuator

◆ read_fisba_data() [1/2]

def laospy.influence.ActuatorInfluence.read_fisba_data (   self,
  path 
)
reads µShape binary data (.dat) into a numpy masked array

The header of the file contains a counter, the number of columns and rows, 
the value for masked pixels, the length of the comment followed by the comment itself.
The rest of the file is the array.

◆ read_fisba_data() [2/2]

def laospy.influence.ActuatorInfluence.read_fisba_data (   self,
  path 
)
reads µShape binary data (.dat) into a numpy masked array

The header of the file contains a counter, the number of columns and rows, 
the value for masked pixels, the length of the comment followed by the comment itself.
The rest of the file is the array.

◆ read_next() [1/2]

def laospy.influence.ActuatorInfluence.read_next (   self)
Reads the next valid measurement from the source

If the source is WFS, the average over INF.NUMIMAGES CCD images is returned

If the source is FISBA, the next valif µShape file is returned, that for sure is contains 
the response to a previous DM Actuator Command. The latest existing and the next file are 
skipped, since the the DM actuation may have happened during the measurement.

◆ read_next() [2/2]

def laospy.influence.ActuatorInfluence.read_next (   self)
Reads the next valid measurement from the source

If the source is WFS, the average over INF.NUMIMAGES CCD images is returned

If the source is FISBA, the next valif µShape file is returned, that for sure is contains 
the response to a previous DM Actuator Command. The latest existing and the next file are 
skipped, since the the DM actuation may have happened during the measurement.

◆ response() [1/2]

def laospy.influence.ActuatorInfluence.response (   self)
Calculates the actuator's response. 

◆ response() [2/2]

def laospy.influence.ActuatorInfluence.response (   self)
Calculates the actuator's response. 

◆ save() [1/2]

def laospy.influence.ActuatorInfluence.save (   self)
Saves push pull and response to file. 

◆ save() [2/2]

def laospy.influence.ActuatorInfluence.save (   self)
Saves push pull and response to file. 

◆ save_flat_pattern() [1/2]

def laospy.influence.ActuatorInfluence.save_flat_pattern (   self)
Saves the determined flat pattern into a FITS file, which can be imported by the 
Xinetics device

◆ save_flat_pattern() [2/2]

def laospy.influence.ActuatorInfluence.save_flat_pattern (   self)
Saves the determined flat pattern into a FITS file, which can be imported by the 
Xinetics device

◆ save_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.save_influence_matrix (   self)
Saves the influence matrix

◆ save_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.save_influence_matrix (   self)
Saves the influence matrix

◆ save_inverse_influence_matrix() [1/2]

def laospy.influence.ActuatorInfluence.save_inverse_influence_matrix (   self)
Saves the inverse influence matrix

◆ save_inverse_influence_matrix() [2/2]

def laospy.influence.ActuatorInfluence.save_inverse_influence_matrix (   self)
Saves the inverse influence matrix

◆ save_metapupil_parameters() [1/2]

def laospy.influence.ActuatorInfluence.save_metapupil_parameters (   self)
Saves center position and diameter of the metapupil in actuator grid units

◆ save_metapupil_parameters() [2/2]

def laospy.influence.ActuatorInfluence.save_metapupil_parameters (   self)
Saves center position and diameter of the metapupil in actuator grid units

◆ save_zero() [1/2]

def laospy.influence.ActuatorInfluence.save_zero (   self)
Saves the zero-response 

The zero-response is the surface deviation of the DM without an actuator being pushed or 
pulled

◆ save_zero() [2/2]

def laospy.influence.ActuatorInfluence.save_zero (   self)
Saves the zero-response 

The zero-response is the surface deviation of the DM without an actuator being pushed or 
pulled

◆ transform_into_actgrid() [1/2]

def laospy.influence.ActuatorInfluence.transform_into_actgrid (   self,
  array 
)
Transforms an array (µShape or metapupil) into the actuator grid array

The FISBA measurements are stretched along one axis (setup not perpendicular to 
Xinetics surface). The rotation depends on the orientation of the FISBA. The measurements 
will be transformed into an array, that reflects the actuator grid, but oversampled by a 
specified factor. 

Parameters
----------
array : masked ndarry
    µShape measurement array or metapupil

transform : ndarray (2x2)
    Result of find_actuator_space_transform()
    
offset : ndarray (2)
    Result of find_actuator_space_transform()

◆ transform_into_actgrid() [2/2]

def laospy.influence.ActuatorInfluence.transform_into_actgrid (   self,
  array 
)
Transforms an array (µShape or metapupil) into the actuator grid array

The FISBA measurements are stretched along one axis (setup not perpendicular to 
Xinetics surface). The rotation depends on the orientation of the FISBA. The measurements 
will be transformed into an array, that reflects the actuator grid, but oversampled by a 
specified factor. 

Parameters
----------
array : masked ndarry
    µShape measurement array or metapupil

transform : ndarray (2x2)
    Result of find_actuator_space_transform()
    
offset : ndarray (2)
    Result of find_actuator_space_transform()

Member Data Documentation

◆ _actCoords

laospy.influence.ActuatorInfluence._actCoords = np.zeros((_numAct, 2))
staticprivate

◆ _actgridAx

laospy.influence.ActuatorInfluence._actgridAx
private

◆ _actgridIm

laospy.influence.ActuatorInfluence._actgridIm
private

◆ _actIndices

laospy.influence.ActuatorInfluence._actIndices
private

◆ _actMap

laospy.influence.ActuatorInfluence._actMap
private

◆ _arrayAx

laospy.influence.ActuatorInfluence._arrayAx
private

◆ _arrayFig

laospy.influence.ActuatorInfluence._arrayFig
private

◆ _arrayImg

laospy.influence.ActuatorInfluence._arrayImg
private

◆ _arrayNnote

laospy.influence.ActuatorInfluence._arrayNnote
private

◆ _colorbar1

laospy.influence.ActuatorInfluence._colorbar1
private

◆ _colorbar2

laospy.influence.ActuatorInfluence._colorbar2
private

◆ _colorbar3

laospy.influence.ActuatorInfluence._colorbar3
private

◆ _fisbaFileSize [1/2]

int laospy.influence.ActuatorInfluence._fisbaFileSize = 0
staticprivate

◆ _fisbaFileSize [2/2]

laospy.influence.ActuatorInfluence._fisbaFileSize
private

◆ _maskValue

int laospy.influence.ActuatorInfluence._maskValue = -0x80000000
staticprivate

◆ _measImg1

laospy.influence.ActuatorInfluence._measImg1
private

◆ _measImg2

laospy.influence.ActuatorInfluence._measImg2
private

◆ _measImg3

laospy.influence.ActuatorInfluence._measImg3
private

◆ _measNote1

laospy.influence.ActuatorInfluence._measNote1
private

◆ _measNote2

laospy.influence.ActuatorInfluence._measNote2
private

◆ _measNote3

laospy.influence.ActuatorInfluence._measNote3
private

◆ _numAct

int laospy.influence.ActuatorInfluence._numAct = 349
staticprivate

◆ actSampling

laospy.influence.ActuatorInfluence.actSampling

◆ actuatorIndex [1/2]

int laospy.influence.ActuatorInfluence.actuatorIndex = -1
static

◆ actuatorIndex [2/2]

laospy.influence.ActuatorInfluence.actuatorIndex

◆ actuators

laospy.influence.ActuatorInfluence.actuators

◆ ccd

laospy.influence.ActuatorInfluence.ccd

◆ config

laospy.influence.ActuatorInfluence.config

◆ datapath

laospy.influence.ActuatorInfluence.datapath

◆ dm

laospy.influence.ActuatorInfluence.dm

◆ fisbaCenter

laospy.influence.ActuatorInfluence.fisbaCenter

◆ fisbapath

laospy.influence.ActuatorInfluence.fisbapath

◆ fisbaRad

laospy.influence.ActuatorInfluence.fisbaRad

◆ flatArray

laospy.influence.ActuatorInfluence.flatArray = ma.zeros((1020,1020))
static

◆ influenceFunction

laospy.influence.ActuatorInfluence.influenceFunction = ma.zeros((1020,1020))
static

◆ influenceMatrix

laospy.influence.ActuatorInfluence.influenceMatrix

◆ infRad

laospy.influence.ActuatorInfluence.infRad

◆ insideActuators

laospy.influence.ActuatorInfluence.insideActuators

◆ invInfluenceMatrix

laospy.influence.ActuatorInfluence.invInfluenceMatrix

◆ numImages

laospy.influence.ActuatorInfluence.numImages

◆ offset

laospy.influence.ActuatorInfluence.offset

◆ outsideActuators

laospy.influence.ActuatorInfluence.outsideActuators

◆ pullArray

laospy.influence.ActuatorInfluence.pullArray = ma.zeros((1020,1020))
static

◆ pupilCenter

laospy.influence.ActuatorInfluence.pupilCenter

◆ pupilDiam

laospy.influence.ActuatorInfluence.pupilDiam

◆ pushArray

laospy.influence.ActuatorInfluence.pushArray = ma.zeros((1020,1020))
static

◆ pushPullVal

laospy.influence.ActuatorInfluence.pushPullVal

◆ responseArray

laospy.influence.ActuatorInfluence.responseArray = ma.zeros((1020,1020))
static

◆ sizexy

laospy.influence.ActuatorInfluence.sizexy

◆ sourceIsWFS

laospy.influence.ActuatorInfluence.sourceIsWFS

◆ transform

laospy.influence.ActuatorInfluence.transform

◆ useBrim

laospy.influence.ActuatorInfluence.useBrim

◆ wfcFileSuffix

laospy.influence.ActuatorInfluence.wfcFileSuffix

◆ zeroArray

laospy.influence.ActuatorInfluence.zeroArray = ma.zeros((1020,1020))
static

The documentation for this class was generated from the following file: