deepcinac.cinac_stratification

Module Contents

Classes

MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc...

NeuropilEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc...

RealTransientEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc...

FakeTransientEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc...

MovementEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc...

StratificationCellTypeCamembert

StratificationCamembert

StratificationDataProcessor

StratificationCellTypeDataProcessor

Class used to stratified data for cell type

Functions

neuronal_activity_encoding(raw_traces, smooth_traces, ...)

Give for each frame of the cell what kind of activity is going on (real transient, fake etc...)

deepcinac.cinac_stratification.neuronal_activity_encoding(raw_traces, smooth_traces, raster_dur, identifier=None)

Give for each frame of the cell what kind of activity is going on (real transient, fake etc…) :param raw_traces: 1d float representing the raw fluorescence signal (should be normalized using z-score) :param smooth_traces: 1d float representing the smoothed fluorescence signal (should be normalized using z-score) :param raster_dur: 1d int (or bool), representing the frames during which a given cell is active :param (corresponding to the traces). It represents the “ground truth” used to know real transients.:

Returns:

class deepcinac.cinac_stratification.MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc…

class deepcinac.cinac_stratification.NeuropilEvent(frame_index)

Bases: MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc…

class deepcinac.cinac_stratification.RealTransientEvent(frames_period, amplitude)

Bases: MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc…

class deepcinac.cinac_stratification.FakeTransientEvent(frames_period, amplitude)

Bases: MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc…

class deepcinac.cinac_stratification.MovementEvent(frames_period)

Bases: MovieEvent

Class that represent an event in a movie, for exemple a transient, neuropil etc…

class deepcinac.cinac_stratification.StratificationCellTypeCamembert(data_list, description, n_max_transformations, debug_mode=False)
augment_them_all()

Add to all movie patches in the camembert a given number of augmentation self.n_max_transformations :return:

print_data_description()
class deepcinac.cinac_stratification.StratificationCamembert(data_list, description, n_max_transformations, debug_mode=False)
compute_slices()

Compute the slices of the camembert :return:

add_augmentation_to_all_patches(n_augmentation)

Add to all movie patches in the camember a given number of augmentation, except neuropil :param n_augmentation: :return:

set_weights()
balance_all(main_ratio_balance, first_round)
balance_transients(which_ones, crop_non_crop_ratio_balance, non_crop_ratio_balance)
class deepcinac.cinac_stratification.StratificationDataProcessor(data_list, description, n_max_transformations, main_ratio_balance=(0.6, 0.25, 0.15), crop_non_crop_ratio_balance=(0.9, 0.1), non_crop_ratio_balance=(0.6, 0.4), debug_mode=False)
get_new_data_list()
class deepcinac.cinac_stratification.StratificationCellTypeDataProcessor(data_list, description, n_max_transformations, debug_mode=False)

Class used to stratified data for cell type So far we make it simple, the postulate being that the data has already been stratify by the user (given the same amount of pramidal and interneuron cells for exemple). So for now we just used it to do data augmentation on each movie patch and create a new dataset thus

get_new_data_list()