simcats.sensor.barrier_function

SimCATS subpackage of the sensor package containing all functionalities related to barrier functions.

Package Contents

Classes

BarrierFunctionInterface

Interface that models the conductivity (similar to a pinch-off measurement) of a barrier.

BarrierFunctionGLF

Implementation of the BarrierFunctionInterface that models a conductivity off of a barrier using a generalized logistic function (GLF).

BarrierFunctionMultiGLF

Implementation of the BarrierFunctionInterface that models a conductivity off of a barrier using a combination of

Package Implementation Details

class simcats.sensor.barrier_function.BarrierFunctionInterface

Bases: abc.ABC

Inheritance diagram of simcats.sensor.barrier_function.BarrierFunctionInterface

Interface that models the conductivity (similar to a pinch-off measurement) of a barrier.

abstract get_value(potential)

Returns the value of the barrier function for a given potential.

Parameters:

potential (Union[float, np.ndarray]) – Potential for which the conductance of the barrier function is to be calculated.

Returns:

Value of the barrier function for a given potential.

Return type:

Union[float, np.ndarray]

property pinch_off: float
Abstractmethod:

Return type:

float

Potential value of the pinch off.

property fully_conductive: float
Abstractmethod:

Return type:

float

Potential value of the point from which on the barrier vanishes and becomes fully conductive.

class simcats.sensor.barrier_function.BarrierFunctionGLF(pinch_off_percentage, fully_conductive_percentage, asymptote_left, asymptote_right, growth_rate, asymmetry, shape_factor, denominator_offset=1, offset=0)

Bases: simcats.sensor.barrier_function.BarrierFunctionInterface

Inheritance diagram of simcats.sensor.barrier_function.BarrierFunctionGLF

Implementation of the BarrierFunctionInterface that models a conductivity off of a barrier using a generalized logistic function (GLF).

For further information see: https://en.wikipedia.org/wiki/Generalised_logistic_function

Initializes an object of the class to represent the barrier function using the generalized logistic function. For further information see: https://en.wikipedia.org/wiki/Generalised_logistic_function

Parameters:
  • pinch_off_percentage (float) – Percentage of the GLF height before which the barrier response is considered non-conductive. The height is defined as the absolute difference between the two asymptotes.

  • fully_conductive_percentage (float) – Percentage of the GLF height after which the barrier response is considered fully conductive. The height is defined as the absolute difference between the two asymptotes.

  • asymptote_left (float) – Originally called A. This parameter is the left horizontal asymptote of the function. Any rational number can be used as the left asymptote. This parameter may take any rational number.

  • asymptote_right (float) – Originally called K. Specifies the right horizontal asymptote of the function when denominator_offset=1. If asymptote_left=0 and denominator_offset=1 then this parameter is also called the carrying capacity. This parameter may take any rational number.

  • growth_rate (float) – Originally called B. The growth rate of the function. The value must be a float and can be any rational number. Be careful with negative values, because the function is mirrored on a vertical straight line for these. This line passes through the point where the potential equals offset.

  • asymmetry (float) –

    Originally called nu. This parameter introduces skew and affects symmetry. It also affects near which asymptote maximum growth occurs. The value of asymmetry must be a rational number greater than zero.

    • asymmetry > 1: the curve rises more gradually before the midpoint and more sharply after.

    • asymmetry < 1: the curve rises quickly early on and levels off more slowly.

  • shape_factor (float) – Originally called Q. is related to the value Y(0) and adjusts the curve’s value at the y-intercept. Thereby it changes the shape of the function without changing the asymptotes. The shape factor can be any rational number.

  • denominator_offset (float) –

    Originally called C. A constant added to the denominator inside the power. Controls the initial level of the denominator.This parameter must be a rational number. It typically takes a value of 1. Otherwise, the upper asymptote is

    asymptote_left + (asymptote_right-asymptote_left)/(denominator_offset^(1/asymmetry)).

  • offset (float) – Potential offset that shifts the GLF starting from the zero point. If the offset is positive, the function is shifted to the right and if it is negative, it is shifted to the left. Default is 0.

property pinch_off_percentage: float

Percentage of the GLF height before which the barrier response is considered non-conductive. The height is defined as the absolute difference between the two asymptotes.

Return type:

float

property fully_conductive_percentage: float

Percentage of the GLF height after which the barrier response is considered fully conductive. The height is defined as the absolute difference between the two asymptotes.

Return type:

float

property asymptote_left
Originally called A. This parameter is the left horizontal asymptote of the function. Any rational number can
be used as the left asymptote. This parameter may take any rational number.
property asymptote_right
Originally called K. Specifies the right horizontal asymptote of the function when denominator_offset=1. If
asymptote_left=0 and denominator_offset=1 then this parameter is also called the carrying capacity. This
parameter may take any rational number.
property growth_rate
Originally called B. The growth rate of the function. The value must be a float and can´be any rational
number. Be careful with negative values, because the function is mirrored on a vertical straight line for these.
This line passes through the point where the potential equals `offset`.
property asymmetry
Originally called nu. This parameter introduces skew and affects symmetry. It also affects near which
asymptote maximum growth occurs. The value of asymmetry must be a rational number greater than zero.
  • If asymmetry > 1: the curve rises more gradually before the midpoint and more sharply after.

  • If asymmetry < 1: the curve rises quickly early on and levels off more slowly.

property shape_factor
Originally called Q. is related to the value Y(0) and adjusts the curve’s value at the y-intercept. Thereby
it changes the shape of the function without changing the asymptotes. The shape factor can be any rational
number.
property denominator_offset: float

Originally called C. A constant added to the denominator inside the power. Controls the initial level of the denominator.This parameter must be a rational number. It typically takes a value of 1. Otherwise, the upper asymptote is

asymptote_left + (asymptote_right-asymptote_left)/(denominator_offset^(1/asymmetry)).

Return type:

float

property offset: float

Attribute that shifts the GLF starting from the zero point. If the offset is positive, the function is shifted to the right and if it is negative, it is shifted to the left. Default is 0.

Return type:

float

get_value(potential)

Returns the value of the barrier function for a given potential.

Parameters:

potential (Union[float, np.ndarray]) – Potential for which the conductance of the barrier function is to be calculated.

Returns:

Value of the barrier function for a given potential.

Return type:

Union[float, np.ndarray]

property pinch_off: float

Potential value of the pinch off.

Return type:

float

property fully_conductive: float

Potential value of the point from which on the barrier vanishes and becomes fully conductive.

Return type:

float

class simcats.sensor.barrier_function.BarrierFunctionMultiGLF(pinch_off, fully_conductive, *params)

Bases: simcats.sensor.barrier_function.BarrierFunctionInterface

Inheritance diagram of simcats.sensor.barrier_function.BarrierFunctionMultiGLF

Implementation of the BarrierFunctionInterface that models a conductivity off of a barrier using a combination of multiple generalized logistic functions (GLFs). For further information see: https://en.wikipedia.org/wiki/Generalised_logistic_function

Initializes an object of the class to represent the barrier function using several generalized logistic functions.

For further information see: https://en.wikipedia.org/wiki/Generalised_logistic_function

The number of GLFs is specified by the number of parameters. To do this, the parameter count must be divisible by seven and a GLF is added for every seven other parameters.

Each GLF has the following parameters:

  • asymptote_left (float): Originally called A. This parameter is the left horizontal asymptote of the function. Any rational number can be used as the left asymptote.

  • asymptote_right (float): Originally called K. Specifies the right horizontal asymptote of the function when denominator_offset=1. If asymptote_left=0 and denominator_offset=1 then this parameter is also called the carrying capacity. This parameter may take any rational number.

  • growth_rate (float): Originally called B. The growth rate of the function. The value must be a float and can be any rational number. Be careful with negative values, because the function is mirrored on a vertical straight line for these. This line passes through the point where the potential equals offset.

  • asymmetry (float): Originally called nu. This parameter introduces skew and affects symmetry. It also affects near which asymptote maximum growth occurs. The value of asymmetry must be a rational number greater than zero.

    • If asymmetry > 1: the curve rises more gradually before the midpoint and more sharply after.

    • If asymmetry < 1: the curve rises quickly early on and levels off more slowly.

  • shape_factor (float): Originally called Q. is related to the value Y(0) and adjusts the curve’s value at the y-intercept. Thereby it changes the shape of the function without changing the asymptotes. The shape factor can be any rational number.

  • denominator_offset (float): Originally called C. A constant added to the denominator inside the power. Controls the initial level of the denominator.This parameter must be a rational number. It typically takes a value of 1. Otherwise, the upper asymptote is

    asymptote_left + (asymptote_right - asymptote_left) / (denominator_offset^(1 / asymmetry)).

  • offset (float): Potential offset, that shifts the function starting from the zero point. If the offset is positive, the function is shifted to the right and if it is negative, it is shifted to the left.

Parameters:
  • pinch_off (float) – Potential at which the pinch-off of the barrier is located.

  • fully_conductive (float) – Potential of the point from which on the barrier function is fully conductive.

  • *params – Additional positional arguments representing the GLF parameters. The number of additional parameters must be divisible by seven and determines the number of GLFs that are used for the Multi-GLF. All parameters consist of sequential groups of seven floats that each represent a single GLF. All individual parameters are described above and are in the same order as they are described.

property pinch_off: float

Potential value of the pinch off.

Return type:

float

property fully_conductive: float

Potential value of the point from which on the barrier vanishes and becomes fully conductive.

Return type:

float

property params: Tuple[float]

Parameters of the multiple GLFs. The number of GLFs is specified by the number of parameters. To do this, the parameter count must be divisible by seven and a GLF is added for every seven other parameters.

Each GLF has the following parameters:

  • asymptote_left (float): Originally called A. This parameter is the left horizontal asymptote of the function. Any rational number can be used as the left asymptote.

  • asymptote_right (float): Originally called K. Specifies the right horizontal asymptote of the function when denominator_offset=1. If asymptote_left=0 and denominator_offset=1 then this parameter is also called the carrying capacity. This parameter may take any rational number.

  • growth_rate (float): Originally called B. The growth rate of the function. The value must be a float and can be any rational number. Be careful with negative values, because the function is mirrored on a vertical straight line for these. This line passes through the point where the potential equals offset.

  • asymmetry (float): Originally called nu. This parameter introduces skew and affects symmetry. It also affects near which asymptote maximum growth occurs. The value of asymmetry must be a rational number greater than zero.

    • If asymmetry > 1: the curve rises more gradually before the midpoint and more sharply after.

    • If asymmetry < 1: the curve rises quickly early on and levels off more slowly.

  • shape_factor (float): Originally called Q. is related to the value Y(0) and adjusts the curve’s value at the y-intercept. Thereby it changes the shape of the function without changing the asymptotes. The shape factor can be any rational number.

  • denominator_offset (float): Originally called C. A constant added to the denominator inside the power. Controls the initial level of the denominator. This parameter must be a rational number. It typically takes a value of 1. Otherwise, the upper asymptote is

    asymptote_left + (asymptote_right - asymptote_left) / (denominator_offset^(1 / asymmetry)).

  • offset (float): Potential offset, that shifts the function starting from the zero point. If the offset is positive, the function is shifted to the right and if it is negative, it is shifted to the left.

Returns:

The parameters of the multiple GLFs as described above.

Return type:

Tuple[float]

get_value(potential)

Returns the value of the barrier function for a given potential.

Parameters:

potential (Union[float, np.ndarray]) – Potential for which the conductance of the barrier function is to be calculated.

Returns:

Value of the barrier function for a given potential.

Return type:

Union[float, np.ndarray]