Ignore:
Timestamp:
Jun 4, 2010 3: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/Gaussian.py

    rf9a1279 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: 
     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 under NSF award DMR-0520547." 
     13# 
     14#       copyright 2008, University of Tennessee 
     15############################################################################## 
    1016 
    11         "This work benefited from DANSE software developed under NSF award DMR-0520547." 
    1217 
    13         copyright 2008, University of Tennessee 
    14 """ 
     18"""  
     19Provide functionality for a C extension model 
    1520 
    16 """ Provide functionality for a C extension model 
    17  
    18         WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 
    19                  DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\gaussian.h 
    20                  AND RE-RUN THE GENERATOR SCRIPT 
     21:WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 
     22         DO NOT MODIFY THIS FILE, MODIFY ..\c_extensions\gaussian.h 
     23         AND RE-RUN THE GENERATOR SCRIPT 
    2124 
    2225""" 
     
    2730     
    2831class Gaussian(CGaussian, BaseComponent): 
    29     """ Class that evaluates a Gaussian model.  
    30         This file was auto-generated from ..\c_extensions\gaussian.h. 
    31         Refer to that file and the structure it contains 
    32         for details of the model. 
    33         List of default parameters: 
     32    """  
     33    Class that evaluates a Gaussian model.  
     34    This file was auto-generated from ..\c_extensions\gaussian.h. 
     35    Refer to that file and the structure it contains 
     36    for details of the model. 
     37    List of default parameters: 
    3438         scale           = 1.0  
    3539         sigma           = 1.0  
     
    6771         
    6872    def __getstate__(self): 
    69         """ return object state for pickling and copying """ 
     73        """ 
     74        return object state for pickling and copying 
     75        """ 
    7076        model_state = {'params': self.params, 'dispersion': self.dispersion, 'log': self.log} 
    7177         
     
    7379         
    7480    def __setstate__(self, state): 
    75         """ create object from pickled state """ 
     81        """ 
     82        create object from pickled state 
     83         
     84        :param state: the state of the current model 
     85         
     86        """ 
    7687         
    7788        self.__dict__, model_state = state 
     
    8192         
    8293    
    83     def run(self, x = 0.0): 
    84         """ Evaluate the model 
    85             @param x: input q, or [q,phi] 
    86             @return: scattering function P(q) 
     94    def run(self, x=0.0): 
     95        """  
     96        Evaluate the model 
     97         
     98        :param x: input q, or [q,phi] 
     99         
     100        :return: scattering function P(q) 
     101         
    87102        """ 
    88103         
    89104        return CGaussian.run(self, x) 
    90105    
    91     def runXY(self, x = 0.0): 
    92         """ Evaluate the model in cartesian coordinates 
    93             @param x: input q, or [qx, qy] 
    94             @return: scattering function P(q) 
     106    def runXY(self, x=0.0): 
     107        """  
     108        Evaluate the model in cartesian coordinates 
     109         
     110        :param x: input q, or [qx, qy] 
     111         
     112        :return: scattering function P(q) 
     113         
    95114        """ 
    96115         
    97116        return CGaussian.runXY(self, x) 
    98117         
    99     def evalDistribution(self, x = []): 
    100         """ Evaluate the model in cartesian coordinates 
    101             @param x: input q[], or [qx[], qy[]] 
    102             @return: scattering function P(q[]) 
     118    def evalDistribution(self, x=[]): 
     119        """  
     120        Evaluate the model in cartesian coordinates 
     121         
     122        :param x: input q[], or [qx[], qy[]] 
     123         
     124        :return: scattering function P(q[]) 
     125         
    103126        """ 
    104127        return CGaussian.evalDistribution(self, x) 
    105128         
    106129    def calculate_ER(self): 
    107         """ Calculate the effective radius for P(q)*S(q) 
    108             @return: the value of the effective radius 
     130        """  
     131        Calculate the effective radius for P(q)*S(q) 
     132         
     133        :return: the value of the effective radius 
     134         
    109135        """        
    110136        return CGaussian.calculate_ER(self) 
     
    112138    def set_dispersion(self, parameter, dispersion): 
    113139        """ 
    114             Set the dispersion object for a model parameter 
    115             @param parameter: name of the parameter [string] 
    116             @dispersion: dispersion object of type DispersionModel 
     140        Set the dispersion object for a model parameter 
     141         
     142        :param parameter: name of the parameter [string] 
     143        :param dispersion: dispersion object of type DispersionModel 
     144         
    117145        """ 
    118146        return CGaussian.set_dispersion(self, parameter, dispersion.cdisp) 
Note: See TracChangeset for help on using the changeset viewer.