def estimate_OU_par(cell, temperature, W=None, gamma_A=0.03, gamma_B=0.03): """ Estimate mean and variance of OU processes given a set of conditions, according to which a set of traces is filtered. Parameters ---------- cell : string Cell type. temperature : integer Temperature condition. W : list Waveform. gamma_A : float Regression parameter for the amplitude. gamma_b : float Regression parameter for the background. Returns ------- The mean and standard deviations of the amplitude and the background. """ ######### CORRECTION BECAUSE NOT ENOUGH TRACES AT 34°C AND 40°C ######### print( 'CAUTION : Parameters for None temperature selected since not enough \ traces at 34°C and 40°C') temperature = None ##################### LOAD DATA ################ if cell == 'NIH3T3': path = "Data/NIH3T3.ALL.2017-04-04/ALL_TRACES_INFORMATION.p" dataClass = LoadData(path, 10000000, temperature=temperature, division=False) elif cell == 'U2OS': path = "Data/U2OS-2017-03-20/ALL_TRACES_INFORMATION_march_2017.p" dataClass = LoadData(path, 10000000, temperature=temperature, division=True) try: (ll_area, ll_signal, ll_nan_circadian_factor, ll_obs_phi, ll_peak, ll_idx_cell_cycle_start, T_theta, T_phi) = \ dataClass.load(load_annotation=True) except: dataClass.path = '../' + dataClass.path (ll_area, ll_signal, ll_nan_circadian_factor, ll_obs_phi, ll_peak, ll_idx_cell_cycle_start, T_theta, T_phi) = \ dataClass.load(load_annotation=True) return estimate_OU_par_from_signal(ll_signal, W, gamma_A, gamma_B)