pulse2percept.utils.constants

DT, MIN_AMP, MS_PER_S, UM_PER_MM, VIDEO_BLOCK_SIZE, ZORDER

Module Attributes

MIN_AMP

Pulses with net currents smaller than 10 picoamps are considered charge-balanced (here expressed in microamps).

DT

Sampling time step (ms); defines the duration of the signal edge transitions.

MS_PER_S

Milliseconds in a second (1000).

UM_PER_MM

Microns in a millimeter (1000).

ZORDER

An enum specifying the zorder values to use in Matplotlib plots, ensuring that foreground items (like implants) always appear on top of background items (like axon maps).

pulse2percept.utils.constants.MIN_AMP = 1e-05

Pulses with net currents smaller than 10 picoamps are considered charge-balanced (here expressed in microamps).

pulse2percept.utils.constants.DT = 0.001

Sampling time step (ms); defines the duration of the signal edge transitions.

pulse2percept.utils.constants.MS_PER_S = 1000.0

Milliseconds in a second (1000).

p2p counts durations in milliseconds and frequencies in hertz, so anything that turns one into the other needs this factor: a pulse train’s window is MS_PER_S / freq ms, and a duration in ms is dur / MS_PER_S seconds. Derived from the unit system once, at import time, rather than written down as a bare 1000 at each site – those are the conversions that go wrong silently. Numerical code divides by it and stays plain floats; nothing here puts a Quantity inside a loop.

Added in version 0.10.0.

pulse2percept.utils.constants.UM_PER_MM = 1000.0

Microns in a millimeter (1000).

p2p stores tissue coordinates in microns, while published cortical and retinal fits are written in millimeters and plots are labelled in them. Same idea as MS_PER_S: derive the factor from the unit system once, then do plain arithmetic with it.

Added in version 0.10.0.

pulse2percept.utils.constants.ZORDER = {'annotate': 2000, 'back': 0, 'background': 1, 'foreground': 50, 'front': 9999}

An enum specifying the zorder values to use in Matplotlib plots, ensuring that foreground items (like implants) always appear on top of background items (like axon maps).