Changeset aea6bb7 in sasview
- Timestamp:
- Dec 7, 2018 5:21:41 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- 1dc1d431, 44a698c
- Parents:
- 740c381
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
r740c381 raea6bb7 345 345 logging.warning('Calculation failed: {}'.format(msg)) 346 346 return self.model 347 else: 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 347 348 if self._low_extrapolate: 349 extrapolated_data = inv.get_extra_data_low(self._low_points) 350 power_low = inv.get_extrapolation_power(range='low') 351 352 # Plot the chart 353 title = "Low-Q extrapolation" 354 355 # Convert the data into plottable 356 extrapolated_data = self._manager.createGuiData(extrapolated_data) 357 358 extrapolated_data.name = title 359 extrapolated_data.title = title 360 extrapolated_data.symbol = "Line" 361 extrapolated_data.has_errors = False 362 363 # copy labels and units of axes for plotting 364 extrapolated_data._xaxis = temp_data._xaxis 365 extrapolated_data._xunit = temp_data._xunit 366 extrapolated_data._yaxis = temp_data._yaxis 367 extrapolated_data._yunit = temp_data._yunit 368 369 # Add the plot to the model item 370 # This needs to run in the main thread 371 reactor.callFromThread(GuiUtils.updateModelItemWithPlot, 372 372 self._model_item, 373 373 extrapolated_data, 374 374 title) 375 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 376 if self._high_extrapolate: 377 # for presentation in InvariantDetails 378 qmax_plot = Q_MAXIMUM_PLOT * max(temp_data.x) 379 380 if qmax_plot > Q_MAXIMUM: 381 qmax_plot = Q_MAXIMUM 382 power_high = inv.get_extrapolation_power(range='high') 383 high_out_data = inv.get_extra_data_high(q_end=qmax_plot, npts=500) 384 385 # Plot the chart 386 title = "High-Q extrapolation" 387 388 # Convert the data into plottable 389 high_out_data = self._manager.createGuiData(high_out_data) 390 high_out_data.name = title 391 high_out_data.title = title 392 high_out_data.symbol = "Line" 393 high_out_data.has_errors = False 394 395 # copy labels and units of axes for plotting 396 high_out_data._xaxis = temp_data._xaxis 397 high_out_data._xunit = temp_data._xunit 398 high_out_data._yaxis = temp_data._yaxis 399 high_out_data._yunit = temp_data._yunit 400 401 # Add the plot to the model item 402 # This needs to run in the main thread 403 reactor.callFromThread(GuiUtils.updateModelItemWithPlot, 404 404 self._model_item, high_out_data, title) 405 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 406 item = QtGui.QStandardItem(str(float('%.3g'% volume_fraction))) 407 self.model.setItem(WIDGETS.W_VOLUME_FRACTION, item) 408 item = QtGui.QStandardItem(str(float('%.3g'% volume_fraction_error))) 409 self.model.setItem(WIDGETS.W_VOLUME_FRACTION_ERR, item) 410 if surface: 411 item = QtGui.QStandardItem(str(float('%.3g'% surface))) 412 self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE, item) 413 item = QtGui.QStandardItem(str(float('%.3g'% surface_error))) 414 self.model.setItem(WIDGETS.W_SPECIFIC_SURFACE_ERR, item) 415 item = QtGui.QStandardItem(str(float('%.3g'% qstar_total))) 416 self.model.setItem(WIDGETS.W_INVARIANT, item) 417 item = QtGui.QStandardItem(str(float('%.3g'% qstar_total_error))) 418 self.model.setItem(WIDGETS.W_INVARIANT_ERR, item) 419 420 item = QtGui.QStandardItem(str(float('%.3g'% qstar_low))) 421 self.model.setItem(WIDGETS.D_LOW_QSTAR, item) 422 item = QtGui.QStandardItem(str(float('%.3g'% qstar_low_err))) 423 self.model.setItem(WIDGETS.D_LOW_QSTAR_ERR, item) 424 item = QtGui.QStandardItem(str(float('%.3g'% qstar_high))) 425 self.model.setItem(WIDGETS.D_HIGH_QSTAR, item) 426 item = QtGui.QStandardItem(str(float('%.3g'% qstar_high_err))) 427 self.model.setItem(WIDGETS.D_HIGH_QSTAR_ERR, item) 428 429 return self.model 430 430 431 431 def title(self):
Note: See TracChangeset
for help on using the changeset viewer.