コード例 #1
0
ファイル: CR_Interface.py プロジェクト: bmountjoy/LMTools
	def cr_text_static(self, fname, names, waves, spec, f_width, wl_low, wl_high):
		
		#self.writeMessage("- continuum removal: " + fname)
		
		out_dir = self.outputSCRDirEntry.get()
		out_dir = out_dir + "/" + str(wl_low) + "-" + str(wl_high)
		d_norm  = self.depthNormalizedIntVar.get()
		
		if not os.path.exists(out_dir):
			os.makedirs(out_dir)
	
		mt_out_path = out_dir + "/mt_" + fname[:fname.rfind('.')] + ".csv"
		cr_out_path = out_dir + "/cr_" + fname[:fname.rfind('.')] + ".csv"
		
		#self.writeMessage("- setup")
		
		CR_module.cr_text_setup(waves, f_width, mt_out_path, cr_out_path)
		
		for i in range(len(spec)):
			
			#self.writeMessage("\t - spectra " + str(i+1) + "/" + str(len(spec)))
			
			CR_module.cr_text(spec[i], waves, f_width, names[i], d_norm)
			
		CR_module.cr_text_teardown()