nanopyx.core.generate.simulate_photoswitching_time_tracks

def simple_state_transition_model( n_particles, n_ticks, p_on, p_transient_off, p_permanent_off, initial_state=1) -> numpy.ndarray:

Simple photoswitching state transition model

Parameters
  • n_particles: number of particles
  • n_ticks: number of time ticks
  • p_on: probability of switching on
  • p_transient_off: probability of switching off transiently
  • p_permanent_off: probability of switching off permanently
  • initial_state: initial state of the photoswitch
Returns

array of states with shape (n_particles, n_ticks)

States: -1: bleached 0: off 1: on Transitions: -1 -> -1 0 -> 0 1 -> 1 0 -> 1 with probability p_on 1 -> 0 with probability p_transient_off 1 -> -1 with probability p_permanent_off

Example:

n_ticks = 1000 n_particles = 100 p_on = 0.1 p_transient_off = 0.8 p_permanent_off = 0.1 initial_state = 0 states = simple_state_transition_model(n_ticks, n_particles, p_on, p_transient_off, p_permanent_off, initial_state)