neuralib.model.rastermap.wfield

class neuralib.model.rastermap.wfield.SequenceSingularVector[source]

A NamedTuple that represents a singular value decomposition result from image sequences.

singular_value: ndarray

The singular values of the decomposition

right_vector: ndarray

Right singular vectors of the decomposition

static __new__(_cls, singular_value, right_vector, left_vector)

Create new instance of SequenceSingularVector(singular_value, right_vector, left_vector)

Parameters:
  • singular_value (ndarray)

  • right_vector (ndarray)

  • left_vector (ndarray)

left_vector: ndarray

Left singular vectors of the decomposition

neuralib.model.rastermap.wfield.compute_singular_vector(sequences, n_components=128)[source]
Parameters:
  • sequences (ndarray) – A numpy array representing a collection of image frames in a sequence. It has a shape of (n_frames, width, height) where ‘n_frames’ is the number of frames, and ‘width’ and ‘height’ are the dimensions of each frame.

  • n_components (int) – An integer representing the number of components for Truncated SVD. The default value is 128.

Returns:

A SequenceSingularVector object containing the singular values, the transformed components, and the left singular vectors.

Return type:

SequenceSingularVector