Changeset 5062bbf in sasview for sansview/plugins


Ignore:
Timestamp:
Jun 7, 2010 10:26:43 AM (15 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:
b94945d
Parents:
79ac6f8
Message:

working on documentation

Location:
sansview/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/plugins/testmodel.py

    rf99a6b1 r5062bbf  
    11""" 
    2     Test plug-in model 
     2Test plug-in model 
    33""" 
    44from sans.models.pluginmodel import Model1DPlugin 
     
    99# Your model HAS to be called Model 
    1010class Model(Model1DPlugin): 
    11     """ Class that evaluates a cos(x) model.  
     11    """ 
     12    Class that evaluates a cos(x) model.  
    1213    """ 
    1314     
     
    1617     
    1718    def __init__(self): 
    18         """ Initialization """ 
     19        """ 
     20        Initialization 
     21        """ 
    1922        Model1DPlugin.__init__(self, name= self.name) 
    2023         
     
    3336    
    3437    def function(self, x = 0.0): 
    35         """ Evaluate the model 
    36             @param x: input x 
    37             @return: function value 
     38        """ 
     39        Evaluate the model 
     40         
     41        :param x: input x 
     42         
     43        :return: function value 
     44         
    3845        """ 
    3946        return self.params['A']+self.params['B']*math.cos(2.0*x)+self.params['C']*math.sin(2.0*x) 
  • sansview/plugins/testmodel_2.py

    raaea3714 r5062bbf  
    11""" 
    2     Test plug-in model 
     2Test plug-in model 
    33""" 
    44from sans.models.pluginmodel import Model1DPlugin   ##Do not change this line!!! 
     
    88# Your model HAS to be called Model 
    99class Model(Model1DPlugin):         ##Do not change this line!!! 
    10     """ Class that evaluates a ploynomial model.  
     10    """ 
     11    Class that evaluates a ploynomial model.  
    1112    """ 
    1213     
     
    1516     
    1617    def __init__(self):      ##Do not change this line!!! 
    17         """ Initialization """ 
     18        """ 
     19        Initialization 
     20        """ 
    1821        Model1DPlugin.__init__(self, name= self.name)  ##Do not change this line!!! 
    1922         
     
    4144    
    4245    def function(self, x = 0.0): ##Do not change this line!!! 
    43         """ Evaluate the model 
    44             @param x: input x 
    45             @return: function value 
     46        """  
     47        Evaluate the model 
     48         
     49        :param x: input x 
     50         
     51        :return: function value 
     52         
    4653        """ 
    4754        ##You can modify from HERE to the END of this function!!! 
Note: See TracChangeset for help on using the changeset viewer.