4.1.1.3.1.5. lib.simulation.measurement#

Module that hosts the measurement capabilities/modes of an experiment. Its main purpose is to create a tuple of points/parameters at which photons are retrieved.

4.1.1.3.1.5.1. Module Contents#

4.1.1.3.1.5.1.1. Classes#

Measurement

Class for the Software components: Mainly PatternGenerator and Estimator

PatternGenerator

PhasePatternGenerator

Stay at a single spatial position and perform a phase scan. No input record is needed to get a pattern…

PointLinearPhasePattern

Pattern that allows a linear phase scan at a certain fixed spatial coordinate. Phase scan will always be centered around 0 and range from -L/2 to +L/2. One gets block_size lines in two perpendicular directions, specified via phi0 as offset angle to x-axis.

MinfluxPatternGenerator

Perform a Minflux sequence at specified position. Requires Record to estimate new position of pattern (phase offset)!

MinfluxPattern

Class that overloads get_phases of PointLinearPhase pattern to include the endpoint of an interval centered around phase_offset.

Pattern

Class that represents Pattern objects, i.e. information about the measurement sites and instrument’s configuration at those sites. :param config: configuration object from which to initialize the

4.1.1.3.1.5.1.2. API#

class lib.simulation.measurement.Measurement(param_dict={})#

Class for the Software components: Mainly PatternGenerator and Estimator

Initialization

get_pattern(instrument)#

Retrieve a new pattern (for current iteration stage)

class lib.simulation.measurement.PatternGenerator(config)#

Initialization

get_generator()#
class lib.simulation.measurement.PhasePatternGenerator(config)#

Stay at a single spatial position and perform a phase scan. No input record is needed to get a pattern…

Initialization

get_pattern()#
class lib.simulation.measurement.PointLinearPhasePattern(lamb, dim, L, N, block_size)#

Pattern that allows a linear phase scan at a certain fixed spatial coordinate. Phase scan will always be centered around 0 and range from -L/2 to +L/2. One gets block_size lines in two perpendicular directions, specified via phi0 as offset angle to x-axis.

Initialization

Parameters:
  • lamb – wavelength of standing wave

  • dim – number of dimensions

  • x0 – point at which to perform that phase scan (fixed!)

  • L – length of phase scan (nm)

  • N – Number of steps in each dimension

get_positions(x0)#

Center position of PSF (fixed at one spatial position for phase scan) :return: x0 with shape K,n,M,d

get_phases(phase_offset)#

make the linear phase scan for each dimension. Alter only phase of one vec for phase scan and set the other to zero+max to measure with minimum :return: phases in nm, shape (K, n, M)

get_c0s(c0)#

amplitude of electric field of each incident k-vector :return: c0, shape = (K, n, M)

get_kvec(phi0)#

Retrieve k vectors along pattern as array. theta is opening angle, phi0 is orientation angle (to x-axis). Two angles for the two incoming waves-> they have an offset of pi (head-on collision along orientation axis). theta is always chosen to be 45 degree, i.e. normal beams :param phi0: offset orientation to x-axis

get_angles(phi0)#

Retrieve PSF-angles along pattern as array. 2 theta is opening angle, phi0 is orientation angle. Two angles for the two incoming waves-> they have an offset of pi. theta is always chosen to be 45 degree, i.e. normal beams :param phi0: offset orientation to x-axis

class lib.simulation.measurement.MinfluxPatternGenerator(config)#

Perform a Minflux sequence at specified position. Requires Record to estimate new position of pattern (phase offset)!

Initialization

get_pattern()#
class lib.simulation.measurement.MinfluxPattern(lamb, dim, L, N, block_size)#

Bases: lib.simulation.measurement.PointLinearPhasePattern

Class that overloads get_phases of PointLinearPhase pattern to include the endpoint of an interval centered around phase_offset.

Initialization

Parameters:
  • lamb – wavelength of standing wave

  • dim – number of dimensions

  • x0 – point at which to perform that phase scan (fixed!)

  • L – length of phase scan (nm)

  • N – Number of steps in each dimension

get_phases(phase_offset)#

make the linear phase scan for each dimension. Alter only phase of one vec for phase scan and set the other to zero+max to measure with minimum :return: phases in nm, shape (K, n, M)

class lib.simulation.measurement.Pattern#

Class that represents Pattern objects, i.e. information about the measurement sites and instrument’s configuration at those sites. :param config: configuration object from which to initialize the

pattern object.

Returns:

None

Initialization

every entry has shape K,n,M,d with K #measurements, n #incident wave vectors, M #molecules, d #dimensions. x0, lam and c0 have the shape (dim, K)

append(obj)#

Method to append new entries to the measurement record. :param obj: Object that contains keys/vals of MeasurementRecord. :return: pass