TwiceAsNice  2019-02-18
Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
adsec.adSecArbLN_ice.Loop Class Reference
Inheritance diagram for adsec.adSecArbLN_ice.Loop:
Inheritance graph
Collaboration diagram for adsec.adSecArbLN_ice.Loop:
Collaboration graph

Public Member Functions

def __init__ (self)
 
def ice_ids (self, current=None)
 
def ice_id (self, current=None)
 
def ice_staticId ()
 
def initAlert (self, ident, current=None)
 
def LoadSlopeFilter (self, slopeFilter, bankID, current=None)
 
def LoadModeFilter (self, modeFilter, bankID, current=None)
 
def GetCurrentM2C (self, current=None)
 
def GetM2C (self, name, current=None)
 
def RunAo (self, decimation, loopFreq, ovsFreq, current=None)
 
def RefreshSlopeBuff (self, current=None)
 
def ReadSecSlopeBuff (self, index, current=None)
 
def ReadSecFrameCounter (self, current=None)
 
def StopAo (self, restoreShape, current=None)
 
def PauseAo (self, current=None)
 
def ResumeAo (self, current=None)
 
def SetDataDecimation (self, decimation, current=None)
 
def LoadShape (self, filename, current=None)
 
def GetShape (self, current=None)
 
def LoadGain (self, gain, bankID, current=None)
 
def LoadDisturb (self, on, disturb, current=None)
 
def LoadRecMat (self, m2c, recMat, bankID, current=None)
 
def Offloading (self, enable, current=None)
 
def CalibrateCmd (self, procname, param, current=None)
 
def ApplyCommands (self, commands, current=None)
 
def GetOffloads (self, current=None)
 
def SelectFocalStation (self, name, current=None)
 
def SaveStatus (self, current=None)
 
def __str__ (self)
 

Static Public Attributes

 ice_staticId = staticmethod(ice_staticId)
 

Static Private Attributes

def __repr__ = __str__
 

Detailed Description

Command loop support

Constructor & Destructor Documentation

◆ __init__()

def adsec.adSecArbLN_ice.Loop.__init__ (   self)

Member Function Documentation

◆ __str__()

def adsec.adSecArbLN_ice.Loop.__str__ (   self)

◆ ApplyCommands()

def adsec.adSecArbLN_ice.Loop.ApplyCommands (   self,
  commands,
  current = None 
)
Sends a vector of commands to be applied to the AdSec.
Each element of the  vector is an actuator command in meters.
This command will be applied as an offset from the last loaded shape.
Arguments:
commands -- Vector(672) of commands.
current -- The Current object for the invocation.

◆ CalibrateCmd()

def adsec.adSecArbLN_ice.Loop.CalibrateCmd (   self,
  procname,
  param,
  current = None 
)
A stub for future implementation.
Arguments:
procname -- 
param -- 
current -- The Current object for the invocation.

◆ GetCurrentM2C()

def adsec.adSecArbLN_ice.Loop.GetCurrentM2C (   self,
  current = None 
)
Request the name of the current M2C matrix.
@retval The current M2C matrix name.
Arguments:
current -- The Current object for the invocation.

◆ GetM2C()

def adsec.adSecArbLN_ice.Loop.GetM2C (   self,
  name,
  current = None 
)
Request the value of an M2C matrix.
@retval The M2C matrix.
Arguments:
name -- the M2C matrix file name.
current -- The Current object for the invocation.

◆ GetOffloads()

def adsec.adSecArbLN_ice.Loop.GetOffloads (   self,
  current = None 
)
If offloading is enabled returns the current value of Tip/Tilt/Focus offload request.
Arguments:
current -- The Current object for the invocation.

◆ GetShape()

def adsec.adSecArbLN_ice.Loop.GetShape (   self,
  current = None 
)
Returns the name of shape currently applied.  Callable during open loop.
Arguments:
current -- The Current object for the invocation.

◆ ice_id()

def adsec.adSecArbLN_ice.Loop.ice_id (   self,
  current = None 
)

◆ ice_ids()

def adsec.adSecArbLN_ice.Loop.ice_ids (   self,
  current = None 
)

◆ ice_staticId()

def adsec.adSecArbLN_ice.Loop.ice_staticId ( )

◆ initAlert()

def adsec.adSecArbLN_ice.Loop.initAlert (   self,
  ident,
  current = None 
)
To be called by client to intialize the alert callback
Arguments:
ident -- 
current -- The Current object for the invocation.

◆ LoadDisturb()

def adsec.adSecArbLN_ice.Loop.LoadDisturb (   self,
  on,
  disturb,
  current = None 
)
Loads a matrix with holds a history of disturbance vectors.
Each disturbance vector is a command vector which offsets the result of the AO loop.
Offsetting can be triggered by either the slope sending or the oversampling loop,
depending on the bitmask sent by the slope computer BCU at each frame.
Arguments:
on -- 
disturb -- disturbance history matrix (4000x672).
current -- The Current object for the invocation.

◆ LoadGain()

def adsec.adSecArbLN_ice.Loop.LoadGain (   self,
  gain,
  bankID,
  current = None 
)
Loads the loop modal gain vector. Callable at any time.
Arguments:
gain -- Loop gain vector (672 elements)
bankID -- Memory bank identifier.
current -- The Current object for the invocation.

◆ LoadModeFilter()

def adsec.adSecArbLN_ice.Loop.LoadModeFilter (   self,
  modeFilter,
  bankID,
  current = None 
)
Loads a mode filter to be loaded onto the AdSec.
Arguments:
modeFilter -- Modal filter specification (672x672x2).
bankID -- Memory bank identifier.
current -- The Current object for the invocation.

◆ LoadRecMat()

def adsec.adSecArbLN_ice.Loop.LoadRecMat (   self,
  m2c,
  recMat,
  bankID,
  current = None 
)
Loads new M2C and modal reconstructor matrices.
Callable during close and open loop. If called during close loop, the alternate bank with respect
to the one currently in use must specified.
Arguments:
m2c -- M2C matrix (672x672)
recMat -- Reconstructor matrix (672x672).
bankID -- Memory bank identifier.
current -- The Current object for the invocation.

◆ LoadShape()

def adsec.adSecArbLN_ice.Loop.LoadShape (   self,
  filename,
  current = None 
)
Apply a predefined shape to the secondary. Callable only during open-loop.
A shape is a string which identifies one of the predefined mirror shapes, generated during
calibration of the mirror.
Arguments:
filename -- Name of shape file.
current -- The Current object for the invocation.

◆ LoadSlopeFilter()

def adsec.adSecArbLN_ice.Loop.LoadSlopeFilter (   self,
  slopeFilter,
  bankID,
  current = None 
)
Loads a slope filter onto the AdSec.
Arguments:
slopeFilter -- Slope filter specification (672x1600).
bankID -- Memory bank identifier.
current -- The Current object for the invocation.

◆ Offloading()

def adsec.adSecArbLN_ice.Loop.Offloading (   self,
  enable,
  current = None 
)
Enable/Disable Tip/Tilt/Focus offloading from AdSec to the telescope.
Enabling offload does not guarantee that offloading will be sent, because
a number of internal checks are done. Offloads are only sent if:
- loop is closed
- loop gain is not zero
- AdSec is not skipping frames
Arguments:
enable -- If true enables, if false disables.
current -- The Current object for the invocation.

◆ PauseAo()

def adsec.adSecArbLN_ice.Loop.PauseAo (   self,
  current = None 
)
Tell the AdSec system that we want to pause. Callable during closed loop.
Pausing will suspend offloading as a side effect.
Arguments:
current -- The Current object for the invocation.

◆ ReadSecFrameCounter()

def adsec.adSecArbLN_ice.Loop.ReadSecFrameCounter (   self,
  current = None 
)
Get the WFS Frame Counter vector from the internal cache, 20000 elements long.
Arguments:
current -- The Current object for the invocation.

◆ ReadSecSlopeBuff()

def adsec.adSecArbLN_ice.Loop.ReadSecSlopeBuff (   self,
  index,
  current = None 
)
Get one of the downloaded slope frames from the internal cache.
Return value is a slope frame, 1600 elements long.
Arguments:
index -- slope indexp  .
current -- The Current object for the invocation.
Returns a tuple containing the following:
_retval -- 
counter -- 

◆ RefreshSlopeBuff()

def adsec.adSecArbLN_ice.Loop.RefreshSlopeBuff (   self,
  current = None 
)
Downloads the slope buffer from AdSec and stores them into an internal cache.
Use ReadSecSlopeBuff() and ReadSecFrameCounter() get the cache contents.
The slope buffer includes:
1) A circular buffer of slope frames, 20000 entries long (total size 20000x1600)
2) A vector of WFS frame counters associated with the slope frames, 20000 entries long.
The buffer accumulates slopes received by the AdSec in a circular fashion, overwriting old data.
Download of the buffer is a long operation, typically about 30 seconds.
Calling this function does not change in any way the contents of the AdSec buffer.
Arguments:
current -- The Current object for the invocation.

◆ ResumeAo()

def adsec.adSecArbLN_ice.Loop.ResumeAo (   self,
  current = None 
)
Resumes the loop after a pause. Callable when the system is paused.
Offloading loops will be resumed if they had been suspended by a previous PauseAo command.
Arguments:
current -- The Current object for the invocation.

◆ RunAo()

def adsec.adSecArbLN_ice.Loop.RunAo (   self,
  decimation,
  loopFreq,
  ovsFreq,
  current = None 
)
Prepare mirror for closed loop operation.
This function should be called just before the sending of slopes is enabled from the slope computer.
If slopes are sent without calling this function, they will not be rejected, but AdSec behaviour will be undefined.
Arguments:
decimation -- Decimation value. Sets the decimation value of the diagnostic channel, 0= no decimation
loopFreq -- Loop frequency in Hz. Expected frequency of the AO loop, within a few percent.
ovsFreq -- Oversampling frequency. Requested speed of the internal oversampling loop of the AdSec.
current -- The Current object for the invocation.

◆ SaveStatus()

def adsec.adSecArbLN_ice.Loop.SaveStatus (   self,
  current = None 
)
Saves the current AdSec status to some data structure
Arguments:
current -- The Current object for the invocation.
Returns: the status data identifier

◆ SelectFocalStation()

def adsec.adSecArbLN_ice.Loop.SelectFocalStation (   self,
  name,
  current = None 
)
Selects a focal station, that is, a switch BCU input port.
Arguments:
name -- 
current -- The Current object for the invocation.

◆ SetDataDecimation()

def adsec.adSecArbLN_ice.Loop.SetDataDecimation (   self,
  decimation,
  current = None 
)
Define the amount data decimation in the diagnostic channel.
Equivalent to the  parameter of the RunAo command.
Arguments:
decimation -- Decimation value. 0=no decimation
current -- The Current object for the invocation.

◆ StopAo()

def adsec.adSecArbLN_ice.Loop.StopAo (   self,
  restoreShape,
  current = None 
)
Stop the close loop mode.  Callable during closed loop.
If the  parameter is true, the last loaded shape is reloaded. This operations takes a few seconds.
If the  parameter is false, the mirror is left in the last position assumed during closed loop.
Arguments:
restoreShape -- If true restores the last loaded shape.
current -- The Current object for the invocation.

Member Data Documentation

◆ __repr__

def adsec.adSecArbLN_ice.Loop.__repr__ = __str__
staticprivate

◆ ice_staticId

adsec.adSecArbLN_ice.Loop.ice_staticId = staticmethod(ice_staticId)
static

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