pylab_ml.matrix.base_matrix.BaseMatrix
- class BaseMatrix(connectionTableName=None, identify=False, emulator=False)[source]
Bases:
objectBasic interface to a Relay Matrix.
- Date:
May 05, 2026
- Author:
Semi-ATE <info@Semi-ATE.org>
- __init__(connectionTableName=None, identify=False, emulator=False)[source]
Initialise the instrument.
- Parameters:
connectionTableName (str, optional) – filename from setup- or matlab-file with connection definition. The default is $WORKAREA/harness/matrix*.setup
emulator (bool, optional) – if True than emulate only a Matrix. No real hardware. The default is False.
- Example: Initialization
>>> tablename = 'matrix_messplatz.setup' >>> matrix = Pickering_40_5xx(addr='Switch', tablename, instName='matrix') >>> matrix.set('Position2','close') # need connectionTable >>> matrix.set('Oszi','close') >>> matrix.set('APB_Vsup','close') >>> matrix.set('APB_Vsup','open') >>> matrix.set('SMU_Vsup','close') >>> matrix.set('SMU_Vsup') # default = open >>> matrix.set('APB_Vsup','close',SwitchOver=True) >>> matrix.connect('1,1,1;1,2,3;1,3,5','close') # if connectionTable not loaded
- detailed example of usage:
examples/pickeringmatrix/matrix_40_541_201.py
Methods
__init__([connectionTableName, identify, ...])Initialise the instrument.
clear()Clear all connections (open).
connect(crosspointtable, state)Set state from crosspoint.
display([mode])Display state, nodes or connection in ASCII-String.
load_connectionTable([connectionTableName])Load matlab(.m) or setup-file(.setup) with definition from connections.
set(connection[, state, SwitchOver])Set categories or scenarios to state 'open' or 'close'.
Set instrument settings for setup, called von class Instrument.
Attributes
interchoices- clear()[source]
Clear all connections (open).
add the correct command for the instance to this function.
- connect(crosspointtable, state)[source]
Set state from crosspoint.
- Parameters:
crosspointtable (str) – stringlist with nodes (‘1,3,4;1,5,6;1,2,14’) card, row, col.
state (str) – ‘open’ or ‘close’.
- Raises:
Exception – when more than one card use.
- Returns:
- True : etablish stateFalse : error
- Return type:
bool
- display(mode=None)[source]
Display state, nodes or connection in ASCII-String.
mode==None or ‘state’ display actual statemode==’nodes’ display connected nodesmode==’connection’ display available codes for connectionsmode==someone else display help
- load_connectionTable(connectionTableName=None)[source]
Load matlab(.m) or setup-file(.setup) with definition from connections.
create constantsTable and connectionTable
- set(connection, state='open', SwitchOver=False)[source]
Set categories or scenarios to state ‘open’ or ‘close’.
- Parameters:
connection (str) – categories or scenarios.
state (str, optional) – ‘open’ or ‘close’. Defaults to ‘open’.
SwitchOver (TYPE, optional) –
True : connection will be open AFTER the new one was set,False : default -> first: open last connection, than: close new connection
- Returns:
None