neuralib.rastermap.core.RasterMapResult

class neuralib.rastermap.core.RasterMapResult[source]

Bases: object

Container for storing the rastermap result, For both GUI load and customized plotting purpose

Dimension parameters:

N = Number of neurons/pixel

T = Number of samples

C = Number of clusters = N / binsize

__init__(filename, save_path, isort, embedding, ops, user_clusters=NOTHING, super_neurons=None)

Method generated by attrs for class RasterMapResult.

Parameters:
  • filename (str | None)

  • save_path (str | None)

  • isort (np.ndarray)

  • embedding (np.ndarray)

  • ops (RasterOptions)

  • user_clusters (list[UserCluster])

  • super_neurons (np.ndarray | None)

Return type:

None

Methods

__init__(filename, save_path, isort, ...[, ...])

Method generated by attrs for class RasterMapResult.

asdict()

result as dict

load(path)

Load the results from rastermap output

save(path)

For GUI loading & cache computing for plotting in different time domains

Attributes

filename

Filename of the neural activity data (i.e., *.tif or *.avi for wfield activity; .npy Array[float, [N, T]] file for cellular)

save_path

filename for the rastermap result save

isort

Array[int, N]

embedding

Array[float, [N, 1]]

ops

RasterOptions

user_clusters

list of clusters UserCluster

super_neurons

super neuron activity.

n_clusters

number of clusters (super neurons)

n_samples

number of data samples (T)

filename: str | None

Filename of the neural activity data (i.e., *.tif or *.avi for wfield activity; .npy Array[float, [N, T]] file for cellular)

save_path: str | None

filename for the rastermap result save

isort: ndarray

Array[int, N]

embedding: ndarray

Array[float, [N, 1]]

ops: RasterOptions

RasterOptions

user_clusters: list[UserCluster]

list of clusters UserCluster

super_neurons: ndarray | None

super neuron activity. Array[float, [C, T]]

classmethod load(path)[source]

Load the results from rastermap output

Parameters:

path (str | Path | PathLike[str]) – file path of the rastermap output

Returns:

RasterMapResult

Return type:

Self

save(path)[source]

For GUI loading & cache computing for plotting in different time domains

Parameters:

path (str | Path | PathLike[str])

Return type:

None

asdict()[source]

result as dict

Return type:

dict[str, Any]

property n_clusters: int

number of clusters (super neurons)

property n_samples: int

number of data samples (T)

__init__(filename, save_path, isort, embedding, ops, user_clusters=NOTHING, super_neurons=None)

Method generated by attrs for class RasterMapResult.

Parameters:
  • filename (str | None)

  • save_path (str | None)

  • isort (np.ndarray)

  • embedding (np.ndarray)

  • ops (RasterOptions)

  • user_clusters (list[UserCluster])

  • super_neurons (np.ndarray | None)

Return type:

None