def load_meta_data(cls, file_path, outputWorkspace): try: if IN_MANTIDPLOT: script = "LoadEventNexus(Filename='%s', OutputWorkspace='%s', MetaDataOnly=True)" % (file_path, outputWorkspace) execute_script(script) if not AnalysisDataService.doesExist(outputWorkspace): return False else: LoadEventNexus(Filename=file_path, OutputWorkspace=outputWorkspace, MetaDataOnly=True) return True except: return False
def load_meta_data(cls, file_path, outputWorkspace): try: if IN_MANTIDPLOT: script = "LoadSpice2D(Filename='%s', OutputWorkspace='%s')" % ( file_path, outputWorkspace) execute_script(script) if not AnalysisDataService.doesExist(outputWorkspace): return False else: api.LoadSpice2D(Filename=file_path, OutputWorkspace=outputWorkspace) return True except: return False
def load_meta_data(cls, file_path, outputWorkspace): try: if IN_MANTIDPLOT: script = "LoadEventNexus(Filename='%s', OutputWorkspace='%s', MetaDataOnly=True)" % ( file_path, outputWorkspace) execute_script(script) if not AnalysisDataService.doesExist(outputWorkspace): return False else: LoadEventNexus(Filename=file_path, OutputWorkspace=outputWorkspace, MetaDataOnly=True) return True except: return False
def _create_sensitivity(self): # Get patch information patch_ws = "" if AnalysisDataService.doesExist(self.patch_ws): patch_ws = self.patch_ws try: reduction_table_ws = self.options_callback() filename = self._content.sensitivity_file_edit.text() script = "ComputeSensitivity(Filename='%s',\n" % filename script += " ReductionProperties='%s',\n" % reduction_table_ws script += " OutputWorkspace='sensitivity',\n" script += " PatchWorkspace='%s')\n" % patch_ws execute_script(script) except: print("Could not compute sensitivity") print(sys.exc_info()[1])
def _run_python_code(self, text): """ Re-emits 'runPytonScript' signal """ execute_script(text)