pylab_ml.matrix.base_matrix.BaseMatrix

class BaseMatrix(connectionTableName=None, identify=False, emulator=False)[source]

Bases: object

Basic interface to a Relay Matrix.

Date:

June 16, 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

  • identify (bool, optional) – If True than identify the instrument. The default is False.

  • 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'.

setup_inst()

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:

IOError: – When state is not ‘open’ or ‘close’.

Returns:

True : etablish state
False : error

Return type:

bool

display(mode=None)[source]

Display state, nodes or connection in ASCII-String.

mode==None or ‘state’ display actual state
mode==’nodes’ display connected nodes
mode==’connection’ display available codes for connections
mode==someone else display help
load_connectionTable(connectionTableName=None)[source]

Load matlab(.m) or setup-file(.setup) with definition from connections. Create constantsTable and connectionTable

Parameters:

connectionTableName (str, optional) – Filename from setup- or matlab-file with connection definition. The default is None.

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 (bool, optional) –

    True : Connection will be open AFTER the new one was set,
    False : default -> first: Open last connection, then: Close new connection

Returns:

None

setup_inst()[source]

Set instrument settings for setup, called von class Instrument.