Changeset d7a39e5 in sasview for invariantview/perspectives/invariant/invariant_panel.py
- Timestamp:
- Jun 3, 2010 1:09:19 PM (14 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:
- 7e4a6ff
- Parents:
- d955bf19
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_panel.py
r3de66c1 rd7a39e5 1 1 """ 2 3 @author: Gervaise B. Alina 2 This module provide GUI for the neutron scattering length density calculator 3 4 4 """ 5 5 … … 47 47 class InvariantPanel(ScrolledPanel): 48 48 """ 49 49 Provides the Invariant GUI. 50 50 """ 51 51 ## Internal nickname for the window, used by the AUI manager … … 81 81 def err_check_on_data(self): 82 82 """ 83 83 Check if data is valid for further computation 84 84 """ 85 85 flag = False … … 98 98 def set_data(self, data): 99 99 """ 100 100 Set the data 101 101 """ 102 102 self._data = data … … 115 115 def set_message(self): 116 116 """ 117 117 Display warning message if available 118 118 """ 119 119 if self.inv_container is not None: … … 133 133 def set_manager(self, manager): 134 134 """ 135 135 set value for the manager 136 136 """ 137 137 self._manager = manager … … 139 139 def get_background(self): 140 140 """ 141 @return the background textcrtl value as a float141 return the background textcrtl value as a float 142 142 """ 143 143 background = self.background_tcl.GetValue().lstrip().rstrip() … … 151 151 def get_scale(self): 152 152 """ 153 @return the scale textcrtl value as a float153 return the scale textcrtl value as a float 154 154 """ 155 155 scale = self.scale_tcl.GetValue().lstrip().rstrip() … … 167 167 def get_contrast(self): 168 168 """ 169 @return the contrast textcrtl value as a float169 return the contrast textcrtl value as a float 170 170 """ 171 171 par_str = self.contrast_tcl.GetValue().strip() … … 189 189 def get_porod_const(self): 190 190 """ 191 @return the porod constant textcrtl value as a float191 return the porod constant textcrtl value as a float 192 192 """ 193 193 par_str = self.porod_constant_tcl.GetValue().strip() … … 304 304 def set_extrapolation_low(self, inv, low_q=False): 305 305 """ 306 @return float value necessary to compute invariant a low q306 return float value necessary to compute invariant a low q 307 307 """ 308 308 #get funtion … … 341 341 def set_extrapolation_high(self, inv, high_q=False): 342 342 """ 343 @return float value necessary to compute invariant a high q343 return float value necessary to compute invariant a high q 344 344 """ 345 345 power_high = None … … 372 372 def display_details(self, event): 373 373 """ 374 374 open another panel for more details on invariant calculation 375 375 """ 376 376 panel = InvariantDetailsPanel(parent=self, … … 382 382 def compute_invariant(self, event=None): 383 383 """ 384 384 compute invariant 385 385 """ 386 386 msg= "" … … 465 465 def reset_panel(self): 466 466 """ 467 467 set the panel at its initial state. 468 468 """ 469 469 self.background_tcl.SetValue(str(BACKGROUND)) … … 491 491 def _reset_output(self): 492 492 """ 493 493 clear outputs textcrtl 494 494 """ 495 495 self.invariant_total_tcl.Clear() … … 504 504 def _define_structure(self): 505 505 """ 506 506 Define main sizers needed for this panel 507 507 """ 508 508 ## Box sizers must be defined first before defining buttons/textctrls (MAC). … … 550 550 def _layout_data_name(self): 551 551 """ 552 552 Draw widgets related to data's name 553 553 """ 554 554 #Sizer hint … … 586 586 def _layout_bkg_scale(self): 587 587 """ 588 588 Draw widgets related to background and scale 589 589 """ 590 590 background_txt = wx.StaticText(self, -1, 'Background : ') … … 605 605 def _layout_contrast_porod(self): 606 606 """ 607 607 Draw widgets related to porod constant and contrast 608 608 """ 609 609 contrast_txt = wx.StaticText(self, -1, 'Contrast : ') … … 627 627 def _enable_fit_power_law_low(self, event=None): 628 628 """ 629 629 Enable and disable the power value editing 630 630 """ 631 631 if self.fix_enable_low.IsEnabled(): … … 637 637 def _enable_low_q_section(self, event=None): 638 638 """ 639 639 Disable or enable some button if the user enable low q extrapolation 640 640 """ 641 641 if self.enable_low_cbox.GetValue(): … … 658 658 def _enable_power_law_low(self, event=None): 659 659 """ 660 660 Enable editing power law section at low q range 661 661 """ 662 662 if self.guinier.GetValue(): … … 672 672 def _layout_extrapolation_low(self): 673 673 """ 674 674 Draw widgets related to extrapolation at low q range 675 675 """ 676 676 self.enable_low_cbox = wx.CheckBox(self, -1, "Enable Extrapolate Low Q") … … 742 742 def _enable_fit_power_law_high(self, event=None): 743 743 """ 744 744 Enable and disable the power value editing 745 745 """ 746 746 if self.fix_enable_high.IsEnabled(): … … 752 752 def _enable_high_q_section(self, event=None): 753 753 """ 754 754 Disable or enable some button if the user enable high q extrapolation 755 755 """ 756 756 if self.enable_high_cbox.GetValue(): … … 771 771 def _layout_extrapolation_high(self): 772 772 """ 773 773 Draw widgets related to extrapolation at high q range 774 774 """ 775 775 self.enable_high_cbox = wx.CheckBox(self, -1, "Enable Extrapolate high-Q") … … 833 833 def _layout_extrapolation(self): 834 834 """ 835 835 Draw widgets related to extrapolation 836 836 """ 837 837 extra_hint = "Extrapolation Maximum Q Range [1/A]: " … … 869 869 def _layout_volume_surface_sizer(self): 870 870 """ 871 871 Draw widgets related to volume and surface 872 872 """ 873 873 unit_volume = '' … … 922 922 def _layout_invariant_sizer(self): 923 923 """ 924 924 Draw widgets related to invariant 925 925 """ 926 926 uncertainty = "+/-" … … 954 954 def _layout_inputs_sizer(self): 955 955 """ 956 956 Draw widgets related to inputs 957 957 """ 958 958 self._layout_bkg_scale() … … 963 963 def _layout_outputs_sizer(self): 964 964 """ 965 965 Draw widgets related to outputs 966 966 """ 967 967 self._layout_volume_surface_sizer() … … 973 973 def _layout_button(self): 974 974 """ 975 975 Do the layout for the button widgets 976 976 """ 977 977 #compute button … … 995 995 def _do_layout(self): 996 996 """ 997 997 Draw window content 998 998 """ 999 999 self._define_structure() … … 1016 1016 1017 1017 class InvariantDialog(wx.Dialog): 1018 """ 1019 """ 1018 1020 def __init__(self, parent=None, id=1,graph=None, 1019 1021 data=None, title="Invariant",base=None): … … 1025 1027 1026 1028 class InvariantWindow(wx.Frame): 1029 """ 1030 """ 1027 1031 def __init__(self, parent=None, id=1,graph=None, 1028 1032 data=None, title="Invariant",base=None):
Note: See TracChangeset
for help on using the changeset viewer.