# get experiment data and path to experiments path_list, CAM_df = pr.makeDF(CAMDIR) # LOOP OVER ALL EXPERIMENTS AND CALCULATE HISTOGRAM OF LIFETIME SPARSENESSES FOR EACH life_spar_list = [] pop_spar_list = [] meta_list = [] pval_list = [] sal_list = [] for path in path_list: # extract interesting information meta = cn.getMetaData(path) # get meta data for experiment of interest proj = cn.getMaxProjection( path ) # getMaxProjection returns a 512x512 array of the maximum projection of the 2P movie print meta meta_list.append(meta) # returns an array of raw fluorescence traces for each ROI and the timestamps for each time point. timestamps, celltraces = cn.getFluorescenceTraces(path) number_cells = np.size(celltraces, 0) acquisition_rate = 1 / (timestamps[1] - timestamps[0]) print "Number of cells: ", number_cells print "Acquisition rate: %f Hz" % acquisition_rate # returns data frame of stimulus conditions stimulus_table = cn.getStimulusTable(path) number_sweeps = len(stimulus_table)
mean_speed = [] for path in list_of_paths: run_data = cn.getRunningSpeed(path) mean_speed.append(np.nanmean(run_data[0])) CAM_df['mean speed'] = mean_speed CAM_df['path_to_exp'] = list_of_paths # LOOP OVER ALL EXPERIMENTS AND CALCULATE HISTOGRAM OF LIFETIME SPARSENESSES FOR EACH lift_spar_list = [] pop_spar_list = [] meta_list = [] for path in list_of_paths: print path # extract interesting information meta = cn.getMetaData(path) # get meta data for experiment of interest proj = cn.getMaxProjection(path) # getMaxProjection returns a 512x512 array of the # maximum projection of the 2P movie print meta meta_list.append(meta) # returns an array of raw fluorescence traces for each ROI and the timestamps for each # time point. timestamps, celltraces = cn.getFluorescenceTraces(path) number_cells = np.size(celltraces, 0) acquisition_rate = 1/(timestamps[1]-timestamps[0]) print "Number of cells: ", number_cells print "Acquisition rate: %f Hz" % acquisition_rate # returns data frame of stimulus conditions stimulus_table = cn.getStimulusTable(path) number_sweeps = len(stimulus_table)
# get experiment data and path to experiments path_list, CAM_df = pr.makeDF(CAMDIR) # LOOP OVER ALL EXPERIMENTS AND CALCULATE HISTOGRAM OF LIFETIME SPARSENESSES FOR EACH life_spar_list = [] pop_spar_list = [] meta_list = [] pval_list = [] sal_list = [] for path in path_list: # extract interesting information meta = cn.getMetaData(path) # get meta data for experiment of interest proj = cn.getMaxProjection(path) # getMaxProjection returns a 512x512 array of the maximum projection of the 2P movie print meta meta_list.append(meta) # returns an array of raw fluorescence traces for each ROI and the timestamps for each time point. timestamps, celltraces = cn.getFluorescenceTraces(path) number_cells = np.size(celltraces,0) acquisition_rate = 1/(timestamps[1]-timestamps[0]) print "Number of cells: ", number_cells print "Acquisition rate: %f Hz" % acquisition_rate # returns data frame of stimulus conditions stimulus_table = cn.getStimulusTable(path) number_sweeps = len(stimulus_table)