RTC Toolkit  2.0.0
Public Member Functions | Public Attributes | List of all members
rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest Class Reference

! Class for the Data task robotTesting very basic class to add support for numerical verification in robot tests. More...

Inheritance diagram for rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest:

Public Member Functions

def __init__ (self, componentName, introot)
 ! class initializer. More...
 
def configTool (self, path)
 ! configTool wrapper for importing of values from the runtime repo. More...
 
def loadFits (self, path)
 ! a simple function to load a fits image More...
 
def numerical_calc (self, input, rtol=1e-06, atol=1e-09)
 ! The numerical calculation of the dataTask and checks for accuracy within atol and rtol calculation avergages input compares to those output in the dataTask calculated the avg_modes using a matrix vector multiplication with a slopes 2 modes matrix. More...
 
def runNumVer (self, input_path=None)
 ! Entry point fot the numerical verification Performs some path checking and loads required inputs and passes to numerical_calc More...
 
def check_data_task_stats (self, ExpectedIterations=2)
 ! Entry point fot the oldb checking opens oldb.yaml file and loads ExpectedIterations compates this value with the one passed to function and returns 0 if equal or 1 if diffrent. More...
 
def return_when_reached (self, ExpectedValue, timeout=30)
 ! Entry point fot the oldb checking opens oldb.yaml file and loads iterations returns when the value reaches the specified limit If it does not before timeout is reached will return 1 More...
 
def return_value (self)
 ! opens the yaml file and returns number of compute cycles. More...
 

Public Attributes

 componentName
 
 introot
 
 path_to_repo
 
 s2m_file
 
 avg_slopes_file
 
 avg_modes_file
 
 svc_disc_end
 
 oldb_path
 
 input
 
 input_path
 
 slopes
 
 modes
 
 s2m
 
 avg_slopes
 
 avg_modes
 

Detailed Description

! Class for the Data task robotTesting very basic class to add support for numerical verification in robot tests.

Constructor & Destructor Documentation

◆ __init__()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.__init__ (   self,
  componentName,
  introot 
)

! class initializer.

Parameters
componentNamename of the componet for example: exampleDataTask, exampleEndToEndTest.
introota path to the install directory
Returns
An instance test suit

Member Function Documentation

◆ check_data_task_stats()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.check_data_task_stats (   self,
  ExpectedIterations = 2 
)

! Entry point fot the oldb checking opens oldb.yaml file and loads ExpectedIterations compates this value with the one passed to function and returns 0 if equal or 1 if diffrent.

Parameters
ExpectedIterationsthe numener of expected calculation iterations. default= 2
Returns
0 if succesful or 1 if fails. will print detials into logger.

◆ configTool()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.configTool (   self,
  path 
)

! configTool wrapper for importing of values from the runtime repo.

Parameters
pathpath to value within the runtime repo
Returns
value in string format. needs to be cast to required format by user.

◆ loadFits()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.loadFits (   self,
  path 
)

! a simple function to load a fits image

Parameters
pathpath to fits file
Returns
fits image data

◆ numerical_calc()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.numerical_calc (   self,
  input,
  rtol = 1e-06,
  atol = 1e-09 
)

! The numerical calculation of the dataTask and checks for accuracy within atol and rtol calculation avergages input compares to those output in the dataTask calculated the avg_modes using a matrix vector multiplication with a slopes 2 modes matrix.

compares result to those output by the dataTask

Parameters
inputinput file if it exists
rtolreliative toleratance of calculation default = 1e-06
atolabsolute toleratnce of calculation defaul = 1e-09
Returns
0 if succesful or a string if it fails. will print details into logger.

◆ return_value()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.return_value (   self)

! opens the yaml file and returns number of compute cycles.

Returns
number of compute cycless

◆ return_when_reached()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.return_when_reached (   self,
  ExpectedValue,
  timeout = 30 
)

! Entry point fot the oldb checking opens oldb.yaml file and loads iterations returns when the value reaches the specified limit If it does not before timeout is reached will return 1

Parameters
ExpectedValuethe value when thefunction will return
timeouttime-out
Returns
0 if succesful or 1 if fails. will print detials into logger.

◆ runNumVer()

def rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.runNumVer (   self,
  input_path = None 
)

! Entry point fot the numerical verification Performs some path checking and loads required inputs and passes to numerical_calc

Parameters
input_pathpath to input file if it exists
Returns
0 if succesful or 1 if fails. will print detials into logger.

Member Data Documentation

◆ avg_modes

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.avg_modes

◆ avg_modes_file

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.avg_modes_file

◆ avg_slopes

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.avg_slopes

◆ avg_slopes_file

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.avg_slopes_file

◆ componentName

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.componentName

◆ input

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.input

◆ input_path

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.input_path

◆ introot

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.introot

◆ modes

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.modes

◆ oldb_path

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.oldb_path

◆ path_to_repo

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.path_to_repo

◆ s2m

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.s2m

◆ s2m_file

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.s2m_file

◆ slopes

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.slopes

◆ svc_disc_end

rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.rtctkExampleDataTaskRobotTest.svc_disc_end

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