brainspy.utils.transforms#

File that contains a set of methods to perform linear transformation from a given range to the range of the activation electrodes.

Functions

check_values(x_max, x_min, y_max, y_min)

To check wheather the arguments provided to the functions - get_offset and get_scale are valid by raising an Assertion Error if x_max < x_min or y_max < y_min

get_linear_transform_constants(y_min, y_max, ...)

Get the scale and offset of a line defined by two points.

get_offset(y_min, y_max, x_min, x_max)

Get the offset/y-intercept of a line defined by two points.

get_scale(y_min, y_max, x_min, x_max)

Get the scale/slope of a line defined by two points.

linear_transform(y_min, y_max, x_min, x_max, ...)

Define a line by two points.