def __init__(self,cwd): print('method __init__ in K_class runs...') self.gw = get_raw.Get_raw(cwd) self.alph=alpha.Alpha(cwd) self.common_xaxis_12, self.k_12 = self.k1_eq12() self.common_xaxis_15, self.k_15 = self.k1_eq15()
def __init__(self, cwd): print('method __init__ in Vary_igp runs...') self.gw = get_raw.Get_raw(cwd) self.gmd = get_m_d.Gmd(cwd) self.ign_pts, self.m_start_min, self.d_dispersion_max, self.d_dispersion_min, self.d_mean, self.dispersion_rel = self.gmd.get_md_igpo( )
def run(self): try: if self.sender == 'Raw data': from methods import get_raw my_arg = get_raw.Get_raw(self.cwd) elif self.sender == 'Tmin and Tmax': from methods import get_Tmax_Tmin my_arg = get_Tmax_Tmin.Get_Tmax_Tmin(self.cwd) elif self.sender == 'Std.Dev. in d': from methods import get_vary_igp my_arg = get_vary_igp.Vary_igp(self.cwd) elif self.sender == 'Index n': from methods import get_m_d my_arg = get_m_d.Gmd(self.cwd) elif self.sender == 'Absorption alpha': from methods import alpha my_arg = alpha.Alpha(self.cwd) elif self.sender == 'Wavenumber k': from methods import k my_arg = k.K_class(self.cwd) self.signals.pass_plots.emit([my_arg, self.sender]) except Exception as inst: self.signals.critical.emit(''.join([ "Critical message returned from the local method ", self.sender, ":\n\n", str(inst) ])) self.signals.finished.emit()
def __init__(self, cwd): print('method __init__ in Gmd runs...') self.gtt = get_Tmax_Tmin.Get_Tmax_Tmin(cwd) self.gw = get_raw.Get_raw(cwd) _, _, com_axisTminTmax_final, _ = self.gtt.get_T_alpha() self.common_xaxis_eV, self.Tmin, self.Tmax = com_axisTminTmax_final _, self.Ts = self.gtt.fit_Ts_to_data(self.common_xaxis_eV) # convert to wavelength in nm self.common_xaxis_nm = 1239.84187 / self.common_xaxis_eV _, self.nn1 = self.n1() if self.gw.ignore_data_pts == 0: _, self.m_start_min, self.nn2, self.d2 = self.n2( self.common_xaxis_nm, self.nn1) else: _, self.m_start_min, self.nn2, self.d2 = self.n2( self.common_xaxis_nm[:-self.gw.ignore_data_pts], self.nn1[:-self.gw.ignore_data_pts]) _, self.n_trans = self.n_trans()
def __init__(self, cwd): print('method __init__ in Alpha runs...') self.gw = get_raw.Get_raw(cwd) self.gmd = get_m_d.Gmd(cwd) self.gtt = get_Tmax_Tmin.Get_Tmax_Tmin(cwd) _, self.Ts = self.gtt.fit_Ts_to_data(self.gw.x_Tsubfilm) _, _, com_axisTminTmax_final, all_extremas = self.gtt.get_T_alpha() _, extremas_final, _ = all_extremas x_min_, y_min_, x_max_, y_max_ = [ extremas_final[:][0], extremas_final[:][1], extremas_final[:][2], extremas_final[:][3] ] indcs = numpy.where((self.gw.x_Tsubfilm > x_min_[-1]) & (self.gw.x_Tsubfilm > x_max_[-1])) self.x_all = self.gw.x_Tsubfilm[indcs] self.y_all = self.gw.y_Tsubfilm[indcs] self.Ts = self.Ts[indcs] self.xaxis, self.Tmin, self.Tmax = com_axisTminTmax_final _, self.Ts_min_max = self.gtt.fit_Ts_to_data(self.xaxis) ############################################################### if self.gw.fit_poly_ranges_check == False: self.coef = P.polyfit(self.xaxis, self.gmd.nn2, self.gw.fit_poly_order) self.curve_all = numpy.poly1d(self.coef[::-1])(self.gw.x_Tsubfilm) elif self.gw.fit_poly_ranges_check == True: self.acc_min_max = numpy.array([]) self.acc_n = numpy.array([]) self.rej_min_max = numpy.array([]) self.rej_n = numpy.array([]) # add first and last index element from the min_max list ranges = [self.xaxis[0] ] + self.gw.fit_poly_ranges + [self.xaxis[-1]] for i in range(len(ranges) - 1): indx = numpy.where((self.xaxis >= ranges[i]) & (self.xaxis < ranges[i + 1])) if i % 2 == 0: self.rej_min_max = numpy.append(self.rej_min_max, self.xaxis[indx]) self.rej_n = numpy.append(self.rej_n, self.gmd.nn2[indx]) else: self.acc_min_max = numpy.append(self.acc_min_max, self.xaxis[indx]) self.acc_n = numpy.append(self.acc_n, self.gmd.nn2[indx]) self.coef = P.polyfit(self.acc_min_max, self.acc_n, self.gw.fit_poly_order) self.curve_all = numpy.poly1d(self.coef[::-1])(self.gw.x_Tsubfilm) self.xaxis_12, self.alpha_12 = self.alpha_eq12() self.xaxis_15, self.alpha_15 = self.alpha_eq15() self.xaxis_A3, self.alpha_A3 = self.alpha_eqA3() self.min_max2, self.nn2, self.curve_2 = self.show_n_fit()