Changeset 80963c6c in sasview for src/sas/qtgui
- Timestamp:
- Feb 7, 2019 6:02:47 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- a1b49a7
- Parents:
- a74dd016 (diff), a0f3c29 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/qtgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/Plotter2D.py
r8db20a9 rd09f462f 468 468 # check scale 469 469 if self.scale == 'log_{10}': 470 with numpy.errstate(all='ignore'): 471 output = numpy.log10(output) 472 index = numpy.isfinite(output) 473 if not index.all(): 474 cutoff = (numpy.quantile(output[index], 0.05) - numpy.log10(2) if index.any() else 0.) 475 output[output < cutoff] = cutoff 476 output[~index] = cutoff 470 #with numpy.errstate(all='ignore'): 471 # output = numpy.log10(output) 472 #index = numpy.isfinite(output) 473 #if not index.all(): 474 # cutoff = (numpy.quantile(output[index], 0.05) - numpy.log10(2) if index.any() else 0.) 475 # output[output < cutoff] = cutoff 476 # output[~index] = cutoff 477 try: 478 if self.zmin <= 0 and len(output[output > 0]) > 0: 479 zmin_temp = self.zmin 480 output[output > 0] = numpy.log10(output[output > 0]) 481 elif self.zmin <= 0: 482 zmin_temp = self.zmin 483 output[output > 0] = numpy.zeros(len(output)) 484 output[output <= 0] = MIN_Z 485 else: 486 zmin_temp = self.zmin 487 output[output > 0] = numpy.log10(output[output > 0]) 488 except: 489 #Too many problems in 2D plot with scale 490 output[output > 0] = numpy.log10(output[output > 0]) 491 pass 492 477 493 vmin, vmax = None, None 478 494 -
src/sas/qtgui/Perspectives/Inversion/InversionLogic.py
r3c4f02e ra74dd016 156 156 return new_plot 157 157 158 def add_errors(self, sigma=0.05): 159 """ 160 Adds errors to data set is they are not available. 161 Uses $\Delta y = \sigma | y |$. 162 """ 163 self._data.dy = sigma * np.fabs(self._data.y) 164 158 165 def computeDataRange(self): 159 166 """ -
src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py
raed159f ra74dd016 473 473 self._calculator.set_qmax(qmax) 474 474 if np.size(self.logic.data.dy) == 0 or np.all(self.logic.data.dy) == 0: 475 self. _calculator.add_errors()475 self.logic.add_errors() 476 476 self.updateDataList(data) 477 477 self.populateDataComboBox(self.logic.data.filename, data)
Note: See TracChangeset
for help on using the changeset viewer.