rebuild_eigenbrain

seas.ica.rebuild_eigenbrain(eig_vec: numpy.ndarray, index: Optional[int] = None, roimask: Optional[numpy.ndarray] = None, eigb_shape: Optional[Tuple[int, int]] = None, maskind: float = 1, bulk: bool = False)[source]

Reshape components from (n_components, xy) shape into (n_components, x, y), either through reassigning pixels where the roimask indicates, or by reshaping it into the original dimensions.

If one component is requested with index, just that components is returned. If the bulk flag is used instead, all are rebuilt and returned.

Parameters
  • eig_vec – The component eigenvectors (from components dictionary).

  • index – Which index to rebuild.

  • roimask – The roimask used to extract the xy coordinates (if applicable).

  • eigb_shape – The xy shape of the original movie (if roimask was not used).

  • bulk – Whether to rebuild all components, or just the one indicated by index.

Returns

The reshaped eigenvector (x,y) OR eigenbrains:

The array of reshaped eigenvectors (n_components, x, y)

Return type

eigenbrain