Changeset ef2cdb3 in sasview for src/sas/sasgui/perspectives/fitting/fitpage.py
- Timestamp:
- Feb 25, 2017 3:33:43 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 5295cf5
- Parents:
- 4387385 (diff), cb05bfd (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpage.py
r4387385 ref2cdb3 362 362 self.Bind(wx.EVT_RADIOBUTTON, self.onSlitSmear, 363 363 id=self.slit_smearer.GetId()) 364 self. enable_smearer.SetValue(True)364 self.disable_smearer.SetValue(True) 365 365 366 366 sizer_smearer.Add(self.disable_smearer, 0, wx.LEFT, 10) … … 1934 1934 1935 1935 # more disables for 2D 1936 di_flag = False 1937 dq_flag = False 1936 1938 if self.data.__class__.__name__ == "Data2D" or \ 1937 1939 self.enable2D: … … 1939 1941 self.pinhole_smearer.Enable(True) 1940 1942 self.default_mask = copy.deepcopy(self.data.mask) 1941 if self.data.err_data is None or\ 1942 numpy.all(err == 1 for err in self.data.err_data) or \ 1943 not numpy.any(self.data.err_data): 1944 self.dI_didata.Enable(False) 1945 self.dI_noweight.SetValue(True) 1946 self.weightbt_string = self.dI_noweight.GetLabelText() 1947 else: 1948 self.dI_didata.Enable(True) 1949 self.dI_didata.SetValue(True) 1950 self.weightbt_string = self.dI_didata.GetLabelText() 1943 if self.data.err_data is not None \ 1944 and numpy.any(self.data.err_data): 1945 di_flag = True 1946 if self.data.dqx_data is not None \ 1947 and numpy.any(self.data.dqx_data): 1948 dq_flag = True 1951 1949 else: 1952 1950 self.slit_smearer.Enable(True) 1953 1951 self.pinhole_smearer.Enable(True) 1954 1955 if self.data.dy is None or\ 1956 numpy.all(self.data.dy == 1) or\ 1957 not numpy.any(self.data.dy): 1958 self.dI_didata.Enable(False) 1959 self.dI_noweight.SetValue(True) 1960 self.weightbt_string = self.dI_noweight.GetLabelText() 1961 else: 1962 self.dI_didata.Enable(True) 1963 self.dI_didata.SetValue(True) 1964 self.weightbt_string = self.dI_didata.GetLabelText() 1952 if self.data.dy is not None and numpy.any(self.data.dy): 1953 di_flag = True 1954 if self.data.dx is not None and numpy.any(self.data.dx): 1955 dq_flag = True 1956 elif self.data.dxl is not None and numpy.any(self.data.dxl): 1957 dq_flag = True 1958 1959 if dq_flag: 1960 self.enable_smearer.Enable(True) 1961 self.enable_smearer.SetValue(True) 1962 self.disable_smearer.SetValue(False) 1963 else: 1964 self.enable_smearer.Disable() 1965 self.disable_smearer.Enable(True) 1966 self.disable_smearer.SetValue(True) 1967 1968 if di_flag: 1969 self.dI_didata.Enable(True) 1970 self.dI_didata.SetValue(True) 1971 self.weightbt_string = self.dI_didata.GetLabelText() 1972 else: 1973 self.dI_didata.Enable(False) 1974 self.dI_noweight.SetValue(True) 1975 self.weightbt_string = self.dI_noweight.GetLabelText() 1976 1965 1977 # Enable weighting radio buttons 1966 1978 self.dI_noweight.Enable(True) … … 2004 2016 self.EditMask_title.Disable() 2005 2017 2018 self.onSmear(event=None) 2006 2019 self.on_set_focus(None) 2007 2020 self.Refresh()
Note: See TracChangeset
for help on using the changeset viewer.