Changeset eef2e0ed in sasview for park_integration


Ignore:
Timestamp:
Mar 27, 2009 1:02:10 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
ca7a626
Parents:
1ae3fe1
Message:

remove comments

Location:
park_integration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • park_integration/AbstractFitEngine.py

    raed7c57 reef2e0ed  
    212212    def setFitRange(self,qmin=None,qmax=None): 
    213213        """ to set the fit range""" 
    214         self.qmin = qmin 
    215         self.qmax = qmax 
     214        if qmin!=None: 
     215            self.qmin = qmin 
     216        if qmax !=None: 
     217            self.qmax = qmax 
    216218         
    217219         
     
    235237        x,y,dy = [numpy.asarray(v) for v in (self.x,self.y,self.dy)] 
    236238            
    237         # Find entries to consider 
    238         if self.qmin==None: 
    239             self.qmin= min(self.data.x) 
    240         if  self.qmax==None: 
    241             self.qmin= max(self.data.x) 
    242          
    243239        idx = (x>=self.qmin) & (x <= self.qmax) 
    244240   
     
    292288    def setFitRange(self,qmin=None,qmax=None): 
    293289        """ to set the fit range""" 
    294         self.qmin= qmin 
    295         self.qmax= qmax 
     290        if qmin!=None: 
     291            self.qmin= qmin 
     292        if qmax!=None: 
     293            self.qmax= qmax 
    296294       
    297295         
     
    308306        """ 
    309307        res=[] 
    310         #Here we define that  qmin >=0 and qmax>=qmain 
    311         x = max(self.data.xmin, self.data.xmax) 
    312         y = max(self.data.ymin, self.data.ymax) 
    313          
    314         ## fitting range 
    315         if self.qmin == None: 
    316             self.qmin = 0 
    317         if self.qmax == None: 
    318             self.qmax = math.sqrt(x*x +y*y) 
    319          
    320308         
    321309        for i in range(len(self.y_bins)): 
     
    516504        if self.fitArrangeDict.has_key(Uid): 
    517505             self.fitArrangeDict[Uid].set_to_fit( value) 
     506              
     507              
    518508    def get_problem_to_fit(self,Uid): 
    519509        """ 
  • park_integration/ScipyFitting.py

    ra320904 reef2e0ed  
    6363 
    6464    def fit(self ,handler=None): 
    65         # Protect against simultanous fitting attempts 
    66         #if len(self.fitArrangeDict)>1:  
    67         #    raise RuntimeError, "Scipy can't fit more than a single fit problem at a time." 
    68         # fitproblem contains first fitArrange object(one model and a list of data) 
    69         #list of fitproblem 
    7065        
    7166        fitproblem=[] 
    7267        for id ,fproblem in self.fitArrangeDict.iteritems(): 
    73             #print "ScipyFitting:fproblem.get_to_fit() ",fproblem.get_to_fit() 
    7468            if fproblem.get_to_fit()==1: 
    7569                fitproblem.append(fproblem) 
     
    8377        listdata=[] 
    8478        model = fitproblem[0].get_model() 
    85         #print "data",fitproblem[0].dList 
    8679        listdata = fitproblem[0].get_data() 
    8780        # Concatenate dList set (contains one or more data)before fitting 
    8881        #data=self._concatenateData( listdata) 
    8982        data=listdata 
    90         
    91         
    9283        functor= sansAssembly(self.paramList,model,data) 
    93          
    9484         
    9585        out, cov_x, info, mesg, success = optimize.leastsq(functor,model.getParams(self.paramList), full_output=1, warning=True) 
Note: See TracChangeset for help on using the changeset viewer.