Changeset fa05c6c1 in sasview for src/sas/qtgui
- Timestamp:
- May 8, 2018 4:23:59 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- acd9c311, bac81f4, fca1f50
- Parents:
- 42787fb
- Location:
- src/sas/qtgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py
raed0532 rfa05c6c1 327 327 return 328 328 329 try: 330 basename = os.path.basename(datafile) 329 basename = os.path.basename(datafile) 330 331 input_f = open(datafile, 'r') 332 buff = input_f.read() 333 lines = buff.split('\n') 334 335 wavelength = [] 336 intensity = [] 337 338 for line in lines: 339 toks = line.split() 340 try: 341 wave = float(toks[0]) 342 intens = float(toks[1]) 343 wavelength.append(wave) 344 intensity.append(intens) 345 except: 346 logging.info('Could not extract values from file') 347 if wavelength and intensity: 331 348 if basename not in list(self.spectrum_dic.keys()): 332 349 self.cbCustomSpectrum.addItem(basename) 333 334 input_f = open(datafile, 'r') 335 buff = input_f.read() 336 lines = buff.split('\n') 337 338 wavelength = [] 339 intensity = [] 340 341 for line in lines: 342 toks = line.split() 343 try: 344 wave = float(toks[0]) 345 intens = float(toks[1]) 346 wavelength.append(wave) 347 intensity.append(intens) 348 except: 349 logging.info('Could not extract values from file') 350 except: 351 raise 352 353 self.spectrum_dic[basename] = [wavelength, intensity] 354 self.resolution.set_spectrum(self.spectrum_dic[basename]) 350 self.spectrum_dic[basename] = [wavelength, intensity] 351 self.resolution.set_spectrum(self.spectrum_dic[basename]) 355 352 return 356 353 -
src/sas/qtgui/Calculators/SlitSizeCalculator.py
raed0532 rfa05c6c1 115 115 xdata = data.x 116 116 ydata = data.y 117 #if xdata == [] or xdata is None or ydata == [] or ydata is None: 118 if (not xdata or xdata is None) or (not ydata or ydata is None): 117 if xdata == [] or xdata is None or ydata == [] or ydata is None: 119 118 msg = "The current data is empty please check x and y" 120 119 logging.error(msg) -
src/sas/qtgui/MainWindow/GuiManager.py
raed0532 rfa05c6c1 602 602 """ 603 603 """ 604 #self.DVCalculator.show()605 604 self.KIESSIGCalculator.show() 606 605 … … 613 612 """ 614 613 """ 615 self.ResolutionCalculator.show() 614 try: 615 self.ResolutionCalculator.show() 616 except Exception as ex: 617 logging.error(str(ex)) 618 return 616 619 617 620 def actionGeneric_Scattering_Calculator(self): 618 621 """ 619 622 """ 620 self.GENSASCalculator.show() 623 try: 624 self.GENSASCalculator.show() 625 except Exception as ex: 626 logging.error(str(ex)) 627 return 621 628 622 629 def actionPython_Shell_Editor(self):
Note: See TracChangeset
for help on using the changeset viewer.