Changeset fb59ed9 in sasview for sansview/perspectives/fitting/basepage.py
- Timestamp:
- Oct 20, 2010 6:08:34 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:
- d2539aa
- Parents:
- f118fe2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
ra1b2471 rfb59ed9 94 94 ##[cb state, name, value, "+/-", error of fit, min, max , units] 95 95 self.parameters=[] 96 # non-fittable parameter whose value is astring 97 self.str_parameters = [] 96 98 ## list of parameters to fit , must be like self.parameters 97 99 self.param_toFit=[] … … 947 949 self._reset_parameters_state(self.orientation_params, 948 950 state.orientation_params) 951 self._reset_parameters_state(self.str_parameters, 952 state.str_parameters) 949 953 self._reset_parameters_state(self.parameters,state.parameters) 950 954 ## display dispersion info layer … … 1486 1490 elif k == "Structure Factors": 1487 1491 self.struct_rbutton.SetValue(True) 1492 elif k == "Multi-Functions": 1493 continue 1488 1494 else: 1489 1495 self.plugin_rbutton.SetValue(True) … … 1536 1542 elif k == "Structure Factors": 1537 1543 self.struct_rbutton.SetValue(True) 1544 elif k == "Multi-Functions": 1545 continue 1538 1546 else: 1539 1547 self.plugin_rbutton.SetValue(True) … … 1622 1630 self.text2 = wx.StaticText( self,-1,"P(Q)*S(Q)" ) 1623 1631 self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: " ) 1632 self.mutifactor_text1 = wx.StaticText( self,-1,"" ) 1624 1633 self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" ) 1625 1634 self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld) … … 1652 1661 mutifactor_selection.Add(self.mutifactor_text) 1653 1662 mutifactor_selection.Add(self.multifactorbox) 1663 mutifactor_selection.Add((5,5)) 1664 mutifactor_selection.Add(self.mutifactor_text1) 1654 1665 mutifactor_selection.Add((10,5)) 1655 1666 mutifactor_selection.Add(self.show_sld_button) … … 1662 1673 1663 1674 self._set_multfactor_combobox() 1675 self.multifactorbox.SetSelection(1) 1664 1676 self.show_sld_button.Hide() 1665 1677 #-------------------------------------------------------- … … 1680 1692 sld_data = Data1D(x,y) 1681 1693 sld_data.name = 'SLD' 1682 1683 self.panel = SLDPanel(self, data=sld_data, id =-1 )1694 sld_data.axes = self.sld_axes 1695 self.panel = SLDPanel(self, data=sld_data,axes =self.sld_axes,id =-1 ) 1684 1696 self.panel.ShowModal() 1685 1697 1686 def _set_multfactor_combobox(self ):1698 def _set_multfactor_combobox(self, multiplicity=10): 1687 1699 """ 1688 1700 Set comboBox for muitfactor of CoreMultiShellModel 1689 """ 1690 for idx in range(0,5): 1701 :param multiplicit: no. of multi-functionality 1702 """ 1703 # build content of the combobox 1704 for idx in range(0,multiplicity): 1691 1705 self.multifactorbox.Append(str(idx),int(idx)) 1692 self.multifactorbox.SetSelection(1)1706 #self.multifactorbox.SetSelection(1) 1693 1707 self._hide_multfactor_combobox() 1694 1708 … … 1699 1713 if not self.mutifactor_text.IsShown(): 1700 1714 self.mutifactor_text.Show(True) 1715 self.mutifactor_text1.Show(True) 1701 1716 if not self.multifactorbox.IsShown(): 1702 1717 self.multifactorbox.Show(True) … … 1708 1723 if self.mutifactor_text.IsShown(): 1709 1724 self.mutifactor_text.Hide() 1725 self.mutifactor_text1.Hide() 1710 1726 if self.multifactorbox.IsShown(): 1711 1727 self.multifactorbox.Hide() … … 1862 1878 # set multifactor for Mutifunctional models 1863 1879 if form_factor().__class__ in self.model_list_box["Multi-Functions"]: 1880 m_id = self.multifactorbox.GetCurrentSelection() 1881 multiplicity = form_factor().multiplicity_info[0] 1882 self.multifactorbox.Clear() 1883 #self.mutifactor_text.SetLabel(form_factor().details[]) 1884 self._set_multfactor_combobox(multiplicity) 1864 1885 self._show_multfactor_combobox() 1865 self.show_sld_button.Show(True) 1866 m_id = self.multifactorbox.GetCurrentSelection() 1886 #ToDo: this info should be called directly from the model 1887 text = form_factor().multiplicity_info[1]#'No. of Shells: ' 1888 1889 #self.mutifactor_text.Clear() 1890 self.mutifactor_text.SetLabel(text) 1891 if m_id > multiplicity -1: 1892 # default value 1893 m_id = 1 1894 1867 1895 self.multi_factor = self.multifactorbox.GetClientData(m_id) 1868 1896 if self.multi_factor == None: self.multi_factor =0 1869 1897 form_factor = form_factor(int(self.multi_factor)) 1898 self.multifactorbox.SetSelection(m_id) 1899 # Check len of the text1 and max_multiplicity 1900 text = '' 1901 if form_factor.multiplicity_info[0] == len(form_factor.multiplicity_info[2]): 1902 text = form_factor.multiplicity_info[2][self.multi_factor] 1903 self.mutifactor_text1.SetLabel(text) 1904 # Check if model has get sld profile. 1905 if len(form_factor.multiplicity_info[3]) > 0: 1906 self.sld_axes = form_factor.multiplicity_info[3] 1907 self.show_sld_button.Show(True) 1908 else: 1909 self.sld_axes = "" 1910 1870 1911 else: 1871 1912 self._hide_multfactor_combobox()
Note: See TracChangeset
for help on using the changeset viewer.