Ignore:
Timestamp:
Jun 4, 2010 5:04:49 PM (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:
5062bbf
Parents:
7116b6e0
Message:

working on documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/AddComponent.py

    r3db3895 r79ac6f8  
    11#!/usr/bin/env python 
    2 """ Provide base functionality for all model components 
    3     @author: Mathieu Doucet / UTK 
    4     @contact: mathieu.doucet@nist.gov 
     2 
     3"""  
     4Provide base functionality for all model components 
     5 
     6:author: Mathieu Doucet / UTK 
     7 
     8:contact: mathieu.doucet@nist.gov 
     9 
    510""" 
    611 
     
    1318 
    1419class AddComponent(BaseComponent): 
    15     """ Basic model component for Addition 
    16         Provides basic arithmetics 
     20    """  
     21    Basic model component for Addition 
     22    Provides basic arithmetics 
    1723    """ 
    1824 
    1925    def __init__(self, base=None, other=None): 
    2026        """ 
    21             @param base: component to add to  
    22             @param other: component to add 
     27        :param base: component to add to  
     28        :param other: component to add 
     29         
    2330        """ 
    2431        BaseComponent.__init__(self) 
     
    3239    def run(self, x=0): 
    3340        """ 
    34             Evaluate each part of the component and sum the results 
    35             @param x: input parameter 
    36             @return: value of the model at x 
     41        Evaluate each part of the component and sum the results 
     42         
     43        :param x: input parameter 
     44         
     45        :return: value of the model at x 
     46         
    3747        """ 
    3848        return self.operateOn.run(x) + self.other.run(x) 
     
    4050    def runXY(self, x=0): 
    4151        """ 
    42             Evaluate each part of the component and sum the results 
    43             @param x: input parameter 
    44             @return: value of the model at x 
     52        Evaluate each part of the component and sum the results 
     53         
     54        :param x: input parameter 
     55         
     56        :return: value of the model at x 
     57         
    4558        """ 
    4659        return self.operateOn.runXY(x) + self.other.runXY(x) 
     
    4861    def setParam(self, name, value): 
    4962        """  
    50             Set the value of a model parameter 
    51             @param name: name of parameter to set 
    52             @param value: value to give the paramter 
     63        Set the value of a model parameter 
     64         
     65        :param name: name of parameter to set 
     66        :param value: value to give the paramter 
     67         
    5368        """ 
    5469        return BaseComponent.setParamWithToken(self, name,  
     
    5772    def getParam(self, name): 
    5873        """  
    59             Set the value of a model parameter 
    60             @param name: name of the parameter 
    61             @return: value of the parameter 
     74        Set the value of a model parameter 
     75         
     76        :param name: name of the parameter 
     77         
     78        :return: value of the parameter 
     79         
    6280        """ 
    6381        return BaseComponent.getParamWithToken(self, name, 'add', self.other) 
    6482     
    6583    def getParamList(self): 
    66         """ Return a list of all available parameters for the model  
     84        """  
     85        Return a list of all available parameters for the model  
    6786        """ 
    6887        return BaseComponent.getParamListWithToken(self, 'add', self.other) 
Note: See TracChangeset for help on using the changeset viewer.