Ignore:
Timestamp:
Jun 2, 2010 10:17:18 AM (14 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:
6c79243
Parents:
a45622a
Message:

working on documentation theory view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • theoryview/perspectives/theory/model_thread.py

    r64017a8 r74755ff  
    66class Calc2D(CalcThread): 
    77    """ 
    8         Compute 2D model 
    9         This calculation assumes a 2-fold symmetry of the model 
    10         where points are computed for one half of the detector 
    11         and I(qx, qy) = I(-qx, -qy) is assumed. 
     8    Compute 2D model 
     9    This calculation assumes a 2-fold symmetry of the model 
     10    where points are computed for one half of the detector 
     11    and I(qx, qy) = I(-qx, -qy) is assumed. 
     12     
    1213    """ 
    1314     
     
    3435    def compute(self): 
    3536        """ 
    36             Compute the data given a model function 
     37        Compute the data given a model function 
     38         
    3739        """ 
    3840        self.starttime = time.time() 
     
    105107                       qstep = self.qstep ) 
    106108         
    107     
    108      
    109  
    110109class Calc1D(CalcThread): 
    111     """Compute 1D data""" 
     110    """ 
     111    Compute 1D data 
     112     
     113    """ 
    112114     
    113115    def __init__(self, x, model, 
     
    135137    def compute(self): 
    136138        """ 
    137             Compute model 1d value given qmin , qmax , x value  
     139        Compute model 1d value given qmin , qmax , x value  
     140         
    138141        """ 
    139142         
     
    154157        self.complete(x= self.x[index], y= output[index],  
    155158                      elapsed=elapsed, model= self.model, data=self.data) 
    156          
    157   
    158                  
     159""" 
     160Example of use of Calc2D :: 
     161 
    159162class CalcCommandline: 
     163     
    160164    def __init__(self, n=20000): 
    161165        #print thread.get_ident() 
     
    163167         
    164168        model = CylinderModel() 
    165          
    166           
    167169        print model.runXY([0.01, 0.02]) 
    168170         
     
    173175        x = numpy.arange(-qmax, qmax+qstep*0.01, qstep) 
    174176        y = numpy.arange(-qmax, qmax+qstep*0.01, qstep) 
    175      
    176177     
    177178        calc_thread_2D = Calc2D(x, y, None, model.clone(),-qmax, qmax,qstep, 
     
    196197    CalcCommandline() 
    197198    
     199"""   
     200 
Note: See TracChangeset for help on using the changeset viewer.