SurfaceElectrodeArray#
- class SurfaceElectrodeArray(
- num_rows,
- num_cols,
- inter_electrode_distances__mm,
- electrode_radius__mm,
- center_point__mm_deg=(0.0, 0.0),
- bending_radius__mm=0.0,
- rotation_angle__deg=0.0,
- differentiation_mode='monopolar',
Bases:
object
Surface electrode array for EMG recording.
Represents a grid of surface electrodes with configurable spacing, size, and differentiation modes.
- Parameters:
num_rows (
int
) – Number of rows in the electrode arraynum_cols (
int
) – Number of columns in the electrode arrayinter_electrode_distances__mm (
float
) – Inter-electrode distances in mm.electrode_radius__mm (
float
, optional) – Radius of the electrodes in mmcenter_point__mm_deg (
tuple[float
,float]
) – Position along z in mm and rotation around the muscle theta in degrees.bending_radius__mm (
float
, optional) – Bending radius around which the electrode grid is bent. Usually this is equal to the radius of the muscle.rotation_angle__deg (
float
, optional) – Rotation angle of the electrodes in degrees. This is the angle between the electrode grid and the muscle surface.differentiation_mode (
{"monopolar", "bipolar_longitudinal", "bipolar_transversal", "laplacian"}
) – Differentiation mode. Default is monopolar.
- pos_z#
Longitudinal electrode positions in mm, shape (num_rows, num_cols). Available after class initialization via _create_electrode_grid().
- Type:
- pos_theta#
Angular electrode positions in radians, shape (num_rows, num_cols). Available after class initialization via _create_electrode_grid().
- Type:
- electrode_positions#
Complete electrode position arrays (pos_z, pos_theta). Available after class initialization via _create_electrode_grid().
- Type:
tuple[np.ndarray
,np.ndarray]
Methods
Attributes
Complete electrode position arrays (z, theta) in physical coordinates.
Angular positions of electrodes in radians.
Longitudinal positions of electrodes in mm.
- property pos_z: ndarray#
Longitudinal positions of electrodes in mm.
- Returns:
Array of shape (num_rows, num_cols) containing z-coordinates of each electrode position in mm.
- Return type:
- Raises:
AttributeError – If electrode grid has not been created. Run constructor first.
- property pos_theta: ndarray#
Angular positions of electrodes in radians.
- Returns:
Array of shape (num_rows, num_cols) containing angular coordinates of each electrode position in radians.
- Return type:
- Raises:
AttributeError – If electrode grid has not been created. Run constructor first.
- property electrode_positions: tuple[ndarray, ndarray]#
Complete electrode position arrays (z, theta) in physical coordinates.
- Returns:
Tuple containing: - pos_z: Longitudinal positions in mm, shape (num_rows, num_cols) - pos_theta: Angular positions in radians, shape (num_rows, num_cols)
- Return type:
tuple[np.ndarray
,np.ndarray]
- Raises:
AttributeError – If electrode grid has not been created. Run constructor first.
- get_H_sf(ktheta_mesh_kzktheta, kz_mesh_kzktheta)[source]#
Get the spatial filter for the electrode array.
- Parameters:
ktheta_mesh_kzktheta (
numpy.ndarray
) – Angular spatial frequency meshkz_mesh_kzktheta (
numpy.ndarray
) – Longitudinal spatial frequency mesh
- Returns:
H_sf – Spatial filter for the specified differentiation mode
- Return type: