def deriv_text_static(self, fname, names, waves, spec, f_width, wl_low, wl_high): self.writeMessage("- derivative metrics: " + fname) window = int(self.derivWindowEntry.get()) threshold = float(self.derivThresholdEntry.get()) out_dir = self.outputDerivDirEntry.get() out_dir = out_dir + "/" + str(wl_low) + "-" + str(wl_high) run_second_deriv = True if not os.path.exists(out_dir): os.makedirs(out_dir) #deriv_out_path = out_dir + "/deriv_" + fname[:fname.rfind('.')] + ".txt" sp_out_path = out_dir + "/spectra_" + fname d1_out_path = out_dir + "/1st_deriv_" + fname d2_out_path = out_dir + "/2nd_deviv_" + fname mm_out_path = out_dir + "/min_max_" + fname if_out_path = out_dir + "/inflection_" + fname CR_module.deriv_text_setup(waves, f_width, sp_out_path, d1_out_path, d2_out_path, mm_out_path, if_out_path) for i in range(len(spec)): #self.writeMessage("\tspectra " + str(i+1) + "/" + str(len(spec))) CR_module.deriv_text_static(spec[i], waves, f_width, names[i], window, threshold) CR_module.deriv_text_teardown()