Changeset 4a5de6f in sasview for prview/perspectives
- Timestamp:
- May 27, 2008 2:34:30 PM (16 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- fd68aa9
- Parents:
- 278cc25
- Location:
- prview/perspectives/pr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/pr.py
r7cb0353 r4a5de6f 4 4 5 5 import os 6 import sys 6 7 import wx 7 8 from sans.guitools.plottables import Data1D, Theory1D … … 267 268 x = float(toks[0]) 268 269 y = float(toks[1]) 269 data_x = numpy.append(data_x, x)270 data_y = numpy.append(data_y, y)271 270 try: 272 271 scale = 0.05/math.sqrt(data_x[0]) … … 274 273 scale = 1.0 275 274 #data_err = numpy.append(data_err, 10.0*math.sqrt(y)+1000.0) 276 data_err = numpy.append(data_err, scale*math.sqrt(y)) 275 data_x = numpy.append(data_x, x) 276 data_y = numpy.append(data_y, y) 277 data_err = numpy.append(data_err, scale*math.sqrt(math.fabs(y))) 277 278 except: 278 279 print "Error reading line: ", line … … 387 388 self.q_max = q_max 388 389 389 self._create_plot_pr() 390 self.perform_inversion() 390 try: 391 self._create_plot_pr() 392 self.perform_inversion() 393 except: 394 wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value)) 391 395 392 396 def estimate_plot_inversion(self, alpha, nfunc, d_max, q_min=None, q_max=None): … … 397 401 self.q_max = q_max 398 402 399 self._create_plot_pr() 400 self.perform_estimate() 403 try: 404 self._create_plot_pr() 405 self.perform_estimate() 406 except: 407 wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value)) 401 408 402 409 def _create_plot_pr(self): … … 435 442 self.q_max = q_max 436 443 437 self._create_file_pr(path) 438 439 self.perform_inversion() 444 try: 445 if self._create_file_pr(path): 446 self.perform_inversion() 447 except: 448 wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value)) 440 449 441 450 def estimate_file_inversion(self, alpha, nfunc, d_max, path, q_min=None, q_max=None): … … 446 455 self.q_max = q_max 447 456 448 if self._create_file_pr(path): 449 self.perform_estimate() 457 try: 458 if self._create_file_pr(path): 459 self.perform_estimate() 460 except: 461 wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value)) 462 450 463 451 464 def _create_file_pr(self, path): -
prview/perspectives/pr/requirements.txt
r7cb0353 r4a5de6f 24 24 20. If a figure of merit is clearly bad, put its background red 25 25 21. Option to save data. 26 22. If you click compute before loading data, an error occurs. 27 23. Plot I(q) immediately when you choose a new file. 28 24. *** probably need to ship the perspectives separately...
Note: See TracChangeset
for help on using the changeset viewer.