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/BaseModel.py

    rf9bf661 r79ac6f8  
    11#!/usr/bin/env python 
    2 """ 
    3     This software was developed by the University of Tennessee as part of the 
    4     Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    5     project funded by the US National Science Foundation. 
    62 
    7     If you use DANSE applications to do scientific research that leads to 
    8     publication, we ask that you acknowledge the use of the software with the 
    9     following sentence: 
    10  
    11     "This work benefited from DANSE software developed under NSF award DMR-0520547." 
    12  
    13     copyright 2008, University of Tennessee 
    14 """ 
     3############################################################################ 
     4#This software was developed by the University of Tennessee as part of the 
     5#Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
     6#project funded by the US National Science Foundation. 
     7# 
     8#If you use DANSE applications to do scientific research that leads to 
     9#publication, we ask that you acknowledge the use of the software with the 
     10#following sentence: 
     11# 
     12#"This work benefited from DANSE software developed 
     13# under NSF award DMR-0520547." 
     14# 
     15#copyright 2008, University of Tennessee 
     16############################################################################# 
    1517 
    1618"""  
    17     Provide base functionality for all model components 
     19Provide base functionality for all model components 
     20 
     21The following has changed since going from BaseComponent to BaseModel: 
     22 
     23    - Arithmetic operation between models is no longer supported. 
     24      It was found to be of little use and not very flexible. 
    1825     
    19     The following has changed since going from BaseComponent to BaseModel: 
    20      
    21         - Arithmetic operation between models is no longer supported. 
    22           It was found to be of little use and not very flexible. 
    23          
    24         - Parameters are now stored as Parameter object to provide  
    25           the necessary extra information like limits, units, etc...  
     26    - Parameters are now stored as Parameter object to provide  
     27      the necessary extra information like limits, units, etc...  
    2628""" 
    2729 
     
    3133class Parameter(object): 
    3234    """ 
    33         Parameter class 
     35    Parameter class 
    3436    """ 
    3537    name  = '' 
     
    4446class ParameterProperty(object): 
    4547    """ 
    46         Parameter property allow direct access to 
    47         the parameter values 
     48    Parameter property allow direct access to 
     49    the parameter values 
    4850    """ 
    4951    def __init__(self,name,**kw): 
     
    6264class BaseModel(ModelAdaptor): 
    6365    """  
    64         Basic model component 
     66    Basic model component 
    6567    """ 
    6668    ## Name of the model 
     
    7779    def __call__(self, x=0): 
    7880        """      
    79             Evaluate the model. Equivalent to runXY(x) 
    80             @param x: input value 
    81             @return: value of the model 
     81        Evaluate the model. Equivalent to runXY(x) 
     82         
     83        :param x: input value 
     84         
     85        :return: value of the model 
     86         
    8287        """ 
    8388        return self.runXY(x) 
     
    8994        obj.params = copy.deepcopy(self.params) 
    9095        obj.details = copy.deepcopy(self.details) 
    91      
    9296        return obj 
    9397     
    9498    def setParam(self, name, value): 
    9599        """  
    96             Set the value of a model parameter 
     100        Set the value of a model parameter 
     101     
     102        :param name: name of the parameter 
     103        :param value: value of the parameter 
    97104         
    98             @param name: name of the parameter 
    99             @param value: value of the parameter 
    100105        """ 
    101106        # Lowercase for case insensitivity 
     
    108113    def getParam(self, name): 
    109114        """  
    110             Set the value of a model parameter 
     115        Set the value of a model parameter 
    111116 
    112             @param name: name of the parameter 
    113             @param value: value of the parameter 
     117        :param name: name of the parameter 
     118        :param value: value of the parameter 
     119         
    114120        """ 
    115121        # Lowercase for case insensitivity 
     
    119125    def getParamList(self): 
    120126        """  
    121             Return a list of all available parameters for the model  
     127        Return a list of all available parameters for the model  
    122128        """ 
    123129        param_list = self.params.keys() 
Note: See TracChangeset for help on using the changeset viewer.