Previous topic

models.ml.params

Next topic

models.viz2.model

This Page

models.viz2.layer_mapping

class glimpse.models.viz2.layer_mapping.CoordinateMapper(params, center=True)

Converts coordinates between model layers.

Given an offset expressed in the coordinates of one layer, these methods convert that value to the equivalent offset in the coordinates of a lower layer. Note that these methods assume that all kernels are square.

GetMappingFunction(activity_layer, background_layer)

Lookup the function that maps activity from one layer to another, where layers are identified by strings (e.g., “s1”, or “image”).

Parameters:
  • activity_layer (str) – Identifier of foreground layer.
  • background_layer (str) – Identifier of background layer.
Return type:

callable

MapC1ToImage(x)
MapC1ToRetina(x)
MapC1ToS1(x)
MapC2ToImage(x)
MapC2ToS2(x)
MapRetinaToImage(x)
MapS1ToImage(x)
MapS1ToRetina(x)
MapS2ToC1(x)
MapS2ToImage(x)
class glimpse.models.viz2.layer_mapping.LayerSizeMapper(backend, params)

Converts spatial extents between model layers.

These methods compute the image size required to support a model layer (e.g., C2) with at least the given spatial extent (e.g., 3x3 units).

GetMappingFunction(activity_layer, background_layer)

Lookup the function that maps activity from one layer to another, where layers are identified by strings (e.g., “s1”, or “image”).

Parameters:
  • activity_layer (str) – Identifier of foreground layer.
  • background_layer (str) – Identifier of background layer.
Return type:

callable

MapC1ToImage(height, width)
MapC1ToS1(height, width)
MapC2ToImage(height, width)
MapC2ToS2(height, width)
MapRetinaToImage(height, width)
MapS1ToImage(height, width)
MapS1ToRetina(height, width)
MapS2ToC1(height, width)
MapS2ToImage(height, width)
class glimpse.models.viz2.layer_mapping.RegionMapper(params)

Converts coordinate range between model layers.

The methods of this object re-express a slice — given in coordinates of one layer — in terms of coordinates of some lower-level layer. Note that these methods assume that all kernels are square.

GetMappingFunction(activity_layer, background_layer)

Lookup the function that maps activity from one layer to another, where layers are identified by strings (e.g., “s1”, or “image”).

Parameters:
  • activity_layer (str) – Identifier of foreground layer.
  • background_layer (str) – Identifier of background layer.
Return type:

callable

MapC1ToImage(x)

Map C1 region to image coordinates. x – (slice) region in C1 coordinates

MapC1ToRetina(x)
MapC1ToS1(x)
MapC2ToImage(x)
MapC2ToS2(x)
MapRetinaToImage(x)
MapS1ToImage(x)
MapS1ToRetina(x)
MapS2ToC1(x)
MapS2ToImage(x)