fsr

Module fsr is responsible for computing the relative number of FSRs from the axis until each pixel.

Example usage:

>>> import tuna
>>> raw = tuna.io.read ( "tuna/test/unit/unit_io/adhoc.ad3" )
>>> barycenter = tuna.plugins.run ( "Barycenter algorithm" ) ( raw )
>>> noise = tuna.plugins.run ( "Noise detector" ) ( data = raw,                                                         wrapped = barycenter,                                                         noise_threshold = 1,                                                         noise_mask_radius = 1 )
>>> rings = tuna.plugins.run ( "Ring center finder" ) ( data = raw.array, min_rings = 2 )
>>> borders = tuna.tools.phase_map.ring_border_detector ( barycenter, ( 219, 255 ), noise, rings ); borders.join ( )
>>> fsr = tuna.plugins.run ( "FSR mapper" ) ( distances = borders.distances, wrapped = barycenter, center = ( 219, 255 ), concentric_rings = rings [ 'concentric_rings' ] )
>>> fsr.array [ 0 ] [ 150 : 200 ]
array([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.])
class tuna.tools.fsr.fsr(distances, wrapped, center, concentric_rings)[source]

Responsible for computing and storing a 2D array of integers with the number of FSRs from the axis until each pixel.

It inherits from the threading.Thread class, and it auto-starts its thread execution. Clients are expected to use its .join ( ) method before using its results.

Its constructor has the following signature:

Parameters:

  • distances : can

    Containing the map of border distances to the center.

  • wrapped : can

    Containing the wrapped phase map.

  • center : tuple of 2 integers

    Containing the column and row of the center.

  • concentric_rings : dictionary

    A structure describing the geometry of the concentric rings characteristic of a Fabry-Pérot interferogram.

create_fsr_from_radii()[source]

Supposing the borders map and the concentric rings center are available, this method will generate a list of typical distances from border to center, and create a order map using this list.

run()[source]

Thread run method.

tuna.tools.fsr.fsr_mapper(distances: tuna.io.can.can, wrapped: tuna.io.can.can, center: tuple, concentric_rings: dict) → tuna.io.can.can[source]

This function’s goal is to conveniently compute a 2D array of integers with the number of FSRs from the axis until each pixel.

It inherits from the threading.Thread class, and it auto-starts its thread execution. Clients are expected to use its .join ( ) method before using its results.

Its constructor has the following signature:

Parameters:

  • distances : can

    Containing the map of border distances to the center.

  • wrapped : can

    Containing the wrapped phase map.

  • center : tuple of 2 integers

    Containing the column and row of the center.

  • concentric_rings : dictionary

    A structure describing the geometry of the concentric rings characteristic of a Fabry-Pérot interferogram.

Returns:

  • tuna.io.can

    Containing the order map as calculated from the input.