Changeset 76567bb in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Apr 13, 2018 4:00:37 PM (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:
- b9e89d5
- Parents:
- effdd98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GridPanel.py
reffdd98 r76567bb 295 295 """ 296 296 # headers 297 param_list = ['Filename', 'Rg ', 'Chi^2/dof', 'I(Q=0)', 'Oscillations',298 'Background', 'P+ Fraction', 'P+1-theta Fraction',299 ' Calculation Time']300 # P(r) keys 301 pr_keys = ['background',]297 param_list = ['Filename', 'Rg [Ã 298 ]', 'Ï^2/dof', 'I(Q=0)', 'Oscillations', 299 'Background [Ã 300 ^-1]', 'P+ Fraction', 'P+1-Ï Fraction', 301 'Calc. Time [sec]'] 302 302 303 303 keys = data.keys() … … 314 314 out = pr.out 315 315 cov = pr.cov 316 if out is None: 317 logging.warning("P(r) for {} did not converge.".format(filename)) 318 continue 316 319 self.tblParams.setItem(i_row, 0, QtWidgets.QTableWidgetItem( 317 GuiUtils.formatNumber(filename, high=True)))320 "{}".format(filename))) 318 321 self.tblParams.setItem(i_row, 2, QtWidgets.QTableWidgetItem( 319 322 "{:.3g}".format(pr.chi2[0]))) … … 322 325 self.tblParams.setItem(i_row, 8, QtWidgets.QTableWidgetItem( 323 326 "{:.2g}".format(pr.elapsed))) 324 if out is not None: 325 self.tblParams.setItem(i_row, 1, QtWidgets.QTableWidgetItem( 326 "{:.3g}".format(pr.rg(out)))) 327 self.tblParams.setItem(i_row, 3, QtWidgets.QTableWidgetItem( 328 "{:.3g}".format(pr.iq0(out)))) 329 self.tblParams.setItem(i_row, 4, QtWidgets.QTableWidgetItem( 330 "{:.3g}".format(pr.oscillations(out)))) 331 self.tblParams.setItem(i_row, 6, QtWidgets.QTableWidgetItem( 332 "{:.3g}".format(pr.get_positive(out)))) 333 self.tblParams.setItem(i_row, 7, QtWidgets.QTableWidgetItem( 334 "{:.3g}".format(pr.get_pos_err(out, cov)))) 335 else: 336 self.tblParams.setItem(i_row, 1, QtWidgets.QTableWidgetItem( 337 "NaN")) 338 self.tblParams.setItem(i_row, 3, QtWidgets.QTableWidgetItem( 339 "NaN")) 340 self.tblParams.setItem(i_row, 4, QtWidgets.QTableWidgetItem( 341 "NaN")) 342 self.tblParams.setItem(i_row, 6, QtWidgets.QTableWidgetItem( 343 "NaN")) 344 self.tblParams.setItem(i_row, 7, QtWidgets.QTableWidgetItem( 345 "NaN")) 327 self.tblParams.setItem(i_row, 1, QtWidgets.QTableWidgetItem( 328 "{:.3g}".format(pr.rg(out)))) 329 self.tblParams.setItem(i_row, 3, QtWidgets.QTableWidgetItem( 330 "{:.3g}".format(pr.iq0(out)))) 331 self.tblParams.setItem(i_row, 4, QtWidgets.QTableWidgetItem( 332 "{:.3g}".format(pr.oscillations(out)))) 333 self.tblParams.setItem(i_row, 6, QtWidgets.QTableWidgetItem( 334 "{:.3g}".format(pr.get_positive(out)))) 335 self.tblParams.setItem(i_row, 7, QtWidgets.QTableWidgetItem( 336 "{:.3g}".format(pr.get_pos_err(out, cov)))) 346 337 347 338 self.tblParams.resizeColumnsToContents() 339 340 @classmethod 341 def onHelp(cls): 342 """ 343 Open a local url in the default browser 344 """ 345 # TODO: Add anchor to batch fitting help when written 346 location = GuiUtils.HELP_DIRECTORY_LOCATION 347 url = "/user/sasgui/perspectives/pr/pr_help.html" 348 try: 349 webbrowser.open('file://' + os.path.realpath(location + url)) 350 except webbrowser.Error as ex: 351 logging.warning("Cannot display help. %s" % ex)
Note: See TracChangeset
for help on using the changeset viewer.