Changeset db8fd5b in sasview for fittingview


Ignore:
Timestamp:
Mar 7, 2013 12:17:43 PM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
0d795bf
Parents:
00852df
Message:

fixed problems in custom pinhole and slit states

Location:
fittingview/src/sans/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/basepage.py

    r1c6c1b7 rdb8fd5b  
    938938        self.state.pinhole_smearer = \ 
    939939                                copy.deepcopy(self.pinhole_smearer.GetValue()) 
     940        self.state.dx_max = copy.deepcopy(self.dx_max) 
     941        self.state.dx_min = copy.deepcopy(self.dx_min) 
     942        self.state.dxl = copy.deepcopy(self.dxl) 
     943        self.state.dxw = copy.deepcopy(self.dxw) 
    940944        self.state.slit_smearer = copy.deepcopy(self.slit_smearer.GetValue()) 
    941945                   
     
    13511355        ## we have two more options for smearing 
    13521356        if self.pinhole_smearer.GetValue(): 
     1357            self.dx_min = state.dx_min 
     1358            self.dx_max = state.dx_max 
     1359            if self.dx_min != None: 
     1360                self.smear_pinhole_min.SetValue(str(self.dx_min)) 
     1361            if self.dx_max != None: 
     1362                self.smear_pinhole_max.SetValue(str(self.dx_max)) 
    13531363            self.onPinholeSmear(event=None) 
    13541364        elif self.slit_smearer.GetValue(): 
     1365            self.dxl = state.dxl 
     1366            self.dxw = state.dxw 
     1367            if self.dxl != None: 
     1368                self.smear_slit_height.SetValue(str(self.dxl)) 
     1369            if self.dxw != None: 
     1370                self.smear_slit_width.SetValue(str(self.dxw)) 
    13551371            self.onSlitSmear(event=None) 
    13561372         
  • fittingview/src/sans/perspectives/fitting/pagestate.py

    ra805118 rdb8fd5b  
    6969                      ["smear_type","smear_type", "string"], 
    7070                      ["dq_l", "dq_l", "string"], 
    71                       ["dq_r","dq_r", "string"]] 
     71                      ["dq_r","dq_r", "string"], 
     72                      ["dx_max", "dx_max", "float"], 
     73                      ["dx_min","dx_min", "float"], 
     74                      ["dxl", "dxl", "float"], 
     75                      ["dxw","dxw", "float"]] 
    7276 
    7377list_of_model_attributes = [["values", "values"], 
     
    208212        self.dq_l = None 
    209213        self.dq_r = None 
    210  
     214        self.dx_max = None 
     215        self.dx_min = None 
     216        self.dxl = None 
     217        self.dxw = None 
    211218        #list of dispersion paramaters 
    212219        self.disp_list = [] 
     
    332339        obj.dq_l = copy.deepcopy(self.dq_l) 
    333340        obj.dq_r = copy.deepcopy(self.dq_r) 
    334  
     341        obj.dx_max = copy.deepcopy(self.dx_max) 
     342        obj.dx_min = copy.deepcopy(self.dx_min) 
     343        obj.dxl = copy.deepcopy(self.dxl) 
     344        obj.dxw = copy.deepcopy(self.dxw)         
    335345        obj.disp_box = copy.deepcopy(self.disp_box) 
    336346        obj.qmin = copy.deepcopy(self.qmin) 
     
    417427        rep += "dq_l  : %s\n" % self.dq_l 
    418428        rep += "dq_r  : %s\n" % self.dq_r 
    419          
     429        rep += "dx_max  : %s\n" % str(self.dx_max) 
     430        rep += "dx_min : %s\n" % str(self.dx_min)   
     431        rep += "dxl  : %s\n" % str(self.dxl) 
     432        rep += "dxw : %s\n" % str(self.dxw)     
    420433        rep += "model  : %s\n\n" % str(self.model) 
    421434        temp_parameters = [] 
Note: See TracChangeset for help on using the changeset viewer.