cohesivm.interfaces
This module contains the Interface Abstract Base Class and the implemented interfaces. The main
responsibility is to establish a physical connection to the available contacts which are defined within the class.
- class InterfaceType[source]
Bases:
ABCThis class is used to check if the
MeasurementandInterfaceare compatible.
- class HighLow[source]
Bases:
InterfaceTypeConsist of a “High” terminal which is the positive or high-voltage output used for sourcing voltage or current and a “Low” terminal which serves as the negative or low-voltage reference.
- class Interface(pixel_dimensions: Shape | Dict[str, Shape])[source]
Bases:
ABCA child class implements the properties of the interface and a method which establishes a connection to the available contacts.
- Parameters:
pixel_dimensions – The sizes and shapes of the pixels on the sample.
Required properties
- _interface_type:
The
InterfaceTypeof the interface which needs to correspond to theMeasurement.- _interface_dimensions:
The
Shapeof the interface.- _contact_ids:
A list of strings which corresponds to the identifiers of the contacts.
- _contact_positions:
A mapping of the
_contact_idsand the positions of the contacts on the interface.
- property interface_type: InterfaceType
Constant interface type object.
- property contact_positions: Dict[str, Tuple[float, float]]
A dictionary which contains the positions of the contacts on the interface as tuples of floats. The coordinates are given in mm and the origin is in the bottom-left corner.
- select_contact(contact_id: str) None[source]
Checks if the contact value is valid and runs the _select_contact method for the actual contact selection.
- Parameters:
contact_id – The ID of the contact.
- Raises:
ValueError – If the contact is not available on the interface.
Implemented Interfaces
- class TrivialHighLow(pixel_dimensions: Shape)[source]
This interface is the conventional, single-point connection to a sample with one positive/high-voltage terminal and one negative/low-voltage terminal. It can be used if the selection of contacts is carried out manually (not recommended).
- Parameters:
pixel_dimensions – The size and shape of the pixel on the sample.
- class MA8X8(com_port: str, pixel_dimensions: Shape | Dict[str, Shape])[source]
The implementation of the Measurement Array 8x8 interface which consist of 64 front contacts and a single back contact on an area of 25 mm x 25 mm. The interface is controlled by an Arduino Nano Every board which is connected through a serial COM port.
- Parameters:
com_port – The COM port of the Arduino Nano Every board.
pixel_dimensions – The sizes and shapes of the pixels on the sample.