Changeset 07eb396 in sasview for invariantview/src
- Timestamp:
- Jul 19, 2012 11:07:32 AM (12 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:
- 3df5ecf
- Parents:
- 80ff71e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/src/sans/perspectives/invariant/invariant_panel.py
r699df7f r07eb396 478 478 wx.PostEvent(self.parent, StatusEvent(status=msg, 479 479 type="stop")) 480 raise 480 481 else: 481 482 try: … … 515 516 msg = "Expect float for power at low q, " 516 517 msg += " got %s" % (power_low) 517 raise ValueError, msg 518 wx.PostEvent(self.parent, StatusEvent(status=msg, 519 info="error", 520 type="stop")) 518 521 519 522 #Get the number of points to extrapolated … … 525 528 msg = "Expect float for number of points at low q," 526 529 msg += " got %s" % (npts_low) 527 raise ValueError, msg 530 wx.PostEvent(self.parent, StatusEvent(status=msg, 531 info="error", 532 type="stop")) 528 533 #Set the invariant calculator 529 534 inv.set_extrapolation(range="low", npts=npts_low, … … 551 556 msg = "Expect float for power at high q," 552 557 msg += " got %s" % (power_high) 553 raise ValueError, msg 558 wx.PostEvent(self.parent, StatusEvent(status=msg, 559 info="error", 560 type="stop")) 554 561 555 562 npts_high = self.npts_high_tcl.GetValue().lstrip().rstrip() … … 560 567 msg = "Expect float for number of points at high q," 561 568 msg += " got %s" % (npts_high) 562 raise ValueError, msg 569 wx.PostEvent(self.parent, StatusEvent(status=msg, 570 info="error", 571 type="stop")) 563 572 inv.set_extrapolation(range="high", npts=npts_high, 564 573 function=function_high, power=power_high) … … 638 647 return 639 648 self.Show(False) 640 #Compute qstar extrapolated to low q range 641 self.get_low_qstar(inv=inv, npts_low=npts_low, low_q=low_q) 642 #Compute qstar extrapolated to high q range 643 self.get_high_qstar(inv=inv, high_q=high_q) 644 #Compute qstar extrapolated to total q range and set value to txtcrtl 645 self.get_total_qstar(inv=inv, extrapolation=extrapolation) 646 # Parse additional parameters 647 porod_const = self.get_porod_const() 648 contrast = self.get_contrast() 649 649 r_msg = '' 650 try: 651 r_msg = 'Low Q: ' 652 #Compute qstar extrapolated to low q range 653 self.get_low_qstar(inv=inv, npts_low=npts_low, low_q=low_q) 654 r_msg = 'High Q: ' 655 #Compute qstar extrapolated to high q range 656 self.get_high_qstar(inv=inv, high_q=high_q) 657 r_msg = '' 658 #Compute qstar extrapolated to total q range 659 #and set value to txtcrtl 660 self.get_total_qstar(inv=inv, extrapolation=extrapolation) 661 # Parse additional parameters 662 porod_const = self.get_porod_const() 663 contrast = self.get_contrast() 664 except: 665 msg = r_msg + "Error occurred computing invariant: %s" % \ 666 sys.exc_value 667 wx.PostEvent(self.parent, StatusEvent(status=msg, 668 info="error", 669 type="stop")) 650 670 try: 651 671 #Compute volume and set value to txtcrtl
Note: See TracChangeset
for help on using the changeset viewer.