Changeset dfb58f8 in sasview for prview/perspectives/pr/pr.py
- Timestamp:
- May 23, 2008 10:56:21 AM (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:
- f24b8f4
- Parents:
- 43c0a8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/pr.py
r119a11d rdfb58f8 218 218 219 219 sum = 0.0 220 cov2 = numpy.ascontiguousarray(cov) 221 220 222 for i in range(len(x)): 221 if cov ==None:223 if cov2==None: 222 224 value = pr.pr(out, x[i]) 223 225 else: 224 (value, dy[i]) = pr.pr_err(out, cov , x[i])226 (value, dy[i]) = pr.pr_err(out, cov2, x[i]) 225 227 sum += value 226 228 y[i] = value … … 229 231 dy = dy/sum*pr.d_max/len(x) 230 232 231 if cov ==None:233 if cov2==None: 232 234 new_plot = Theory1D(x, y) 233 235 else: … … 337 339 @param elapsed: time spent computing 338 340 """ 341 from copy import deepcopy 339 342 # Save useful info 340 343 self.elapsed = elapsed 341 344 message = "Computation completed in %g seconds [chi2=%g]" % (elapsed, pr.chi2) 342 345 wx.PostEvent(self.parent, StatusEvent(status=message)) 346 347 cov = numpy.ascontiguousarray(cov) 343 348 344 349 # Show result on control panel … … 347 352 self.control_panel.oscillation = pr.oscillations(out) 348 353 #print "OSCILL", pr.oscillations(out) 349 print "PEAKS:", pr.get_peaks(out) 354 print "PEAKS:", pr.get_peaks(out) 355 self.control_panel.positive = pr.get_positive(out) 356 self.control_panel.pos_err = pr.get_pos_err(out, cov) 350 357 351 358 for i in range(len(out)): … … 367 374 368 375 # Show P(r) fit 369 x_values, x_range = self.show_pr(out, self.pr )376 x_values, x_range = self.show_pr(out, self.pr, cov) 370 377 371 378 # Popup result panel
Note: See TracChangeset
for help on using the changeset viewer.