Changeset ac7be54 in sasview


Ignore:
Timestamp:
May 8, 2015 12:27:08 PM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
5e880fe1
Parents:
c22c5e3
Message:

fix sphinx errors in api manual

Location:
src/sas
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • src/sas/calculator/sas_gen.py

    rb6627d9 rac7be54  
    197197        """ 
    198198        Evaluate a distribution of q-values. 
    199         * For 1D, a numpy array is expected as input: 
    200             evalDistribution(q) where q is a numpy array. 
    201         * For 2D, a list of numpy arrays are expected: 
    202             [qx_prime,qy_prime], where 1D arrays. 
    203         :param qdist: ndarray of scalar q-values or list [qx,qy] 
    204                       where qx,qy are 1D ndarrays 
     199 
     200        :param qdist: ndarray of scalar q-values (for 1D) or list [qx,qy] 
     201                      where qx,qy are 1D ndarrays (for 2D). 
    205202        """ 
    206203        if qdist.__class__.__name__ == 'list': 
     
    911908 
    912909    def set_sldms(self, sld_mx, sld_my, sld_mz): 
    913         """ 
    914         Sets (|m|, m_theta, m_phi) 
     910        r""" 
     911        Sets (\|m\|, m_theta, m_phi) 
    915912        """ 
    916913        if sld_mx.__class__.__name__ == 'float': 
  • src/sas/data_util/formatnum.py

    r79492222 rac7be54  
    44Format values and uncertainties nicely for printing. 
    55 
    6 :func:`format_uncertainty_pm`(v,err) produces the expanded format v +/- err. 
    7  
    8 :func:`format_uncertainty_compact`(v,err) produces the compact format v(##), 
     6:func:`format_uncertainty_pm` produces the expanded format v +/- err. 
     7 
     8:func:`format_uncertainty_compact` produces the compact format v(##), 
    99where the number in parenthesis is the uncertainty in the last two digits of v. 
    1010 
    11 :func:`format_uncertainty`(v,err) uses the compact format by default, but this 
     11:func:`format_uncertainty` uses the compact format by default, but this 
    1212can be changed to use the expanded +/- format by setting  
    1313format_uncertainty.compact to False. 
  • src/sas/data_util/uncertainty.py

    r79492222 rac7be54  
    1 """ 
    2  
    3 Uncertainty propagation class, and log() and exp() functions. 
     1r""" 
     2Uncertainty propagation class for arithmetic, log and exp. 
    43 
    54Based on scalars or numpy vectors, this class allows you to store and  
    65manipulate values+uncertainties, with propagation of gaussian error for 
    7 addition, subtraction, multiplication, division, power, exp() and log(). 
     6addition, subtraction, multiplication, division, power, exp and log. 
    87 
    98Storage properties are determined by the numbers used to set the value 
     
    1110for inplace operations since numpy does not do automatic type conversion. 
    1211Normal operations can use mixed integer and floating point.  In place 
    13 operations (a *= b, etc.) create at most one extra copy for each operation. 
    14 c = a*b by contrast uses four intermediate vectors, so shouldn't be used 
     12operations such as *a \*= b* create at most one extra copy for each operation. 
     13By contrast, *c = a\*b* uses four intermediate vectors, so shouldn't be used 
    1514for huge arrays. 
    1615""" 
  • src/sas/guiframe/gui_manager.py

    r765e47c rac7be54  
    570570    def on_batch_selection(self, event=None): 
    571571        """ 
    572         :param event: contains parameter enable . when enable is set to True 
    573         the application is in Batch mode 
    574         else the application is default mode(single mode) 
     572        :param event: contains parameter enable. When enable is set to True 
     573            the application is in Batch mode otherwise the application is 
     574            in Single mode. 
    575575        """ 
    576576        if event is not None: 
     
    28982898 
    28992899        :param name: window_name in AuiPaneInfo 
    2900         : return: AuiPaneInfo of the name 
     2900        :return: AuiPaneInfo of the name 
    29012901        """ 
    29022902        for panel in self.plot_panels.values(): 
  • src/sas/guiframe/gui_statusbar.py

    r4342107f rac7be54  
    2222CONSOLE_WIDTH = 500 
    2323CONSOLE_HEIGHT = 300 
    24 FRAME_ICON = wx.Icon(GUIFRAME_ICON.FRAME_ICON_PATH, wx.BITMAP_TYPE_ICO) 
    2524 
    2625if sys.platform.count("win32") > 0: 
     
    186185                except: 
    187186                    try: 
     187                        FRAME_ICON = wx.Icon(GUIFRAME_ICON.FRAME_ICON_PATH, 
     188                                             wx.BITMAP_TYPE_ICO) 
    188189                        self.frame.SetIcon(FRAME_ICON) 
    189190                    except: 
  • src/sas/guiframe/local_perspectives/plotting/graphAppearance.py

    rb5de88e rac7be54  
    55Dialog for general graph appearance 
    66 
    7  
    8 /** 
    9     This software was developed by Institut Laue-Langevin as part of 
    10     Distributed Data Analysis of Neutron Scattering Experiments (DANSE). 
    11  
    12     Copyright 2012 Institut Laue-Langevin 
    13  
    14 **/ 
    15  
    16  
     7This software was developed by Institut Laue-Langevin as part of 
     8Distributed Data Analysis of Neutron Scattering Experiments (DANSE). 
     9 
     10Copyright 2012 Institut Laue-Langevin 
    1711""" 
    1812 
  • src/sas/guiframe/panel_base.py

    r79492222 rac7be54  
    6161    def on_batch_selection(self, event): 
    6262        """ 
    63         :param event: contains parameter enable . when enable is set to True 
    64         the application is in Batch mode 
    65         else the application is default mode(single mode) 
     63        :param event: contains parameter enable. When enable is set to True 
     64            the application is in Batch mode otherwise the application is 
     65            in Single mode. 
    6666        """ 
    6767        self.batch_on = event.enable 
     
    6969        """ 
    7070        return an xml node containing state of the panel 
    71          that guiframe can write to file 
     71        that guiframe can write to file 
    7272        """ 
    7373        return None 
  • src/sas/models/BEPolyelectrolyte.py

    r79492222 rac7be54  
    1 """     
    2  Provide F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\ 
    3                        *(q^(2)-(12*h*C/b^(2))) 
     1""" 
    42 BEPolyelectrolyte as a BaseComponent model 
    53""" 
     
    1210        Class that evaluates a BEPolyelectrolyte. 
    1311         
    14         F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2)\ 
    15                        *(q^(2)-(12*h*C/b^(2)))  
     12        F(x) = K/(4 pi Lb (alpha)^(2)) (q^(2)+k2)/(1+(r02)^(2)) (q^(2)+k2)\ 
     13                        (q^(2)-(12 h C/b^(2))) 
    1614         
    17         The model has Eight parameters:  
    18             K        =  Constrast factor of the polymer 
    19             Lb       =  Bjerrum length 
    20             H        =  virial parameter 
    21             B        =  monomer length 
    22             Cs       =  Concentration of monovalent salt  
    23             alpha    =  ionazation degree  
     15        The model has Eight parameters:: 
     16 
     17            K        = Constrast factor of the polymer 
     18            Lb       = Bjerrum length 
     19            H        = virial parameter 
     20            B        = monomer length 
     21            Cs       = Concentration of monovalent salt 
     22            alpha    = ionazation degree 
    2423            C        = polymer molar concentration 
    2524            bkd      = background 
     
    7574        """ 
    7675            Evaluate   
    77             F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2)) 
    78                 *(q^(2)+k2)*(q^(2)-(12*h*C/b^(2))) 
     76            F(x) = K 1/(4 pi Lb (alpha)^(2)) (q^(2)+k2)/(1+(r02)^(2)) 
     77                 (q^(2)+k2) (q^(2)-(12 h C/b^(2))) 
    7978         
    8079            has 3 internal parameters : 
    81                    The inverse Debye Length: K2 = 4*pi*Lb*(2*Cs+alpha*C) 
    82                    r02 =1/alpha/Ca^(0.5)*(B/(48*pi*Lb)^(0.5)) 
    83                    Ca = C*6.022136e-4 
     80                   The inverse Debye Length: K2 = 4 pi Lb (2 Cs+alpha C) 
     81                   r02 =1/alpha/Ca^(0.5) (B/(48 pi Lb)^(0.5)) 
     82                   Ca = 6.022136e-4 C 
    8483        """ 
    8584        Ca = self.params['c'] * 6.022136e-4 
  • src/sas/models/CoreMultiShellModel.py

    r79492222 rac7be54  
    170170         
    171171        : return: (r, beta) where r is a list of radius of the transition points 
    172                 beta is a list of the corresponding SLD values  
    173         : Note: This works only for func_shell# = 2. 
     172            beta is a list of the corresponding SLD values 
     173        : Note: This works only for func_shell num = 2. 
    174174        """ 
    175175        r = [] 
  • src/sas/models/GuinierPorodModel.py

    r79492222 rac7be54  
    11"""  
    2     I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql 
    3         = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql 
    4     Guinier function as a BaseComponent model 
     2Guinier function as a BaseComponent model 
    53""" 
    64from sas.models.BaseComponent import BaseComponent 
     
    119    Class that evaluates a GuinierPorod model. 
    1210 
    13     I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql 
    14         = scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql 
     11    Calculate:: 
     12 
     13        I(q) = scale/q^s exp(-q^2 Rg^2 / (3-s) ) for q<= ql 
     14        I(q) = scale/q^m exp(-ql^2 Rg^2 / (3-s)) ql^(m-s) for q>=ql 
    1515    """ 
    1616    def __init__(self): 
  • src/sas/models/MultiplicationModel.py

    r79492222 rac7be54  
    55#from sas.models.pluginmodel import Model1DPlugin 
    66class MultiplicationModel(BaseComponent): 
    7     """ 
    8         Use for P(Q)*S(Q); function call must be in the order of P(Q) and then S(Q): 
     7    r""" 
     8        Use for P(Q)\*S(Q); function call must be in the order of P(Q) and then S(Q): 
    99        The model parameters are combined from both models, P(Q) and S(Q), except 1) 'effect_radius' of S(Q) 
    1010        which will be calculated from P(Q) via calculate_ER(),  
     
    109109        : return: (r, beta) where r is a list of radius of the transition points 
    110110                beta is a list of the corresponding SLD values  
    111         : Note: This works only for func_shell# = 2 (exp function). 
     111        : Note: This works only for func_shell num = 2 (exp function). 
    112112        """ 
    113113        try: 
  • src/sas/models/PeakGaussModel.py

    r79492222 rac7be54  
    11#!/usr/bin/env python 
    22"""  
    3     Model describes a Gaussian shaped peak including a flat background 
    4     Provide F(q) = scale*exp( -1/2 *[(q-q0)/B]^2 )+ background 
    5     PeakGaussModel function as a BaseComponent model 
     3PeakGaussModel function as a BaseComponent model 
    64""" 
    75 
     
    1210    
    1311    """ 
    14         Class that evaluates a gaussian  shaped peak. 
     12        Class that evaluates a gaussian shaped peak with a flat background. 
    1513         
    16         F(q) = scale*exp( -1/2 *[(q-qo)/B]^2 )+ background 
     14        F(q) = scale exp( -1/2 [(q-qo)/B]^2 )+ background 
    1715         
    1816        The model has three parameters:  
     
    5654    def _PeakGauss(self, x): 
    5755        """ 
    58             Evaluate  F(x) = scale*exp( -1/2 *[(x-q0)/B]^2 )+ background 
     56            Evaluate  F(x) = scale exp( -1/2 [(x-q0)/B]^2 )+ background 
    5957            
    6058        """ 
  • src/sas/models/TwoPowerLawModel.py

    r79492222 rac7be54  
    11#!/usr/bin/env python 
    22"""  
    3 Provide I(q) = A*pow(qval,-1.0*m1) for q<=qc 
    4     =scale*pow(qval,-1.0*m2) for q>qc 
    53TwoPowerLaw function as a BaseComponent model 
     4 
     5Calculate:: 
     6 
     7    I(q) = A pow(qval,-m1) for q<=qc 
     8    I(q) = scale pow(qval,-m2) for q>qc 
    69""" 
    710 
     
    1417    Class that evaluates a TwoPowerLawModel. 
    1518 
    16     I(q) = coef_A*pow(qval,-1.0*power1) for q<=qc 
    17         =C*pow(qval,-1.0*power2) for q>qc 
    18     where C=coef_A*pow(qc,-1.0*power1)/pow(qc,-1.0*power2). 
     19    Calculate:: 
     20 
     21       I(q) = coef_A pow(qval,-power1) for q<=qc 
     22       I(q) = C pow(qval,-power2) for q>qc 
     23 
     24    where C=coef_A pow(qc,-power1)/pow(qc,-power2). 
    1925     
    2026    List of default parameters: 
  • src/sas/perspectives/calculator/data_editor.py

    r49ab5d7 rac7be54  
    5353    """ 
    5454    :param data: when not empty the class can 
    55                 same information into a dat object 
     55        same information into a dat object 
    5656        and post event containing the changed data object to some other frame 
    5757    """ 
  • src/sas/perspectives/calculator/model_editor.py

    r2d50115 rac7be54  
    8989    will create a file that cannot be compiled.  Should add the check to 
    9090    the write method or to the on_modelx method. 
    91           - PDB:April 5, 2015 
     91 
     92    - PDB:April 5, 2015 
    9293    """ 
    9394    def __init__(self, parent=None, base=None, id=None, title='', 
  • src/sas/perspectives/fitting/fitpanel.py

    racf8e4a5 rac7be54  
    298298 
    299299        :param m_dict: dictionnary made of model name as key and model class 
    300         as value 
     300            as value 
    301301        """ 
    302302        self.model_list_box = dict 
  • src/sas/perspectives/fitting/fitproblem.py

    r2f4b430 rac7be54  
    2525        """ 
    2626        :param flag: bool.When flag is 1 get the computer smear value. When 
    27         flag is 0 ingore smear value. 
     27            flag is 0 ingore smear value. 
    2828        """ 
    2929 
     
    7676    def set_fit_data(self, data): 
    7777        """ 
    78          Store of list of data and create  by create new fitproblem of each data 
    79          id , if there was existing information about model, this information 
    80          get copy to the new fitproblem 
     78        Store of list of data and create  by create new fitproblem of each data 
     79        id, if there was existing information about model, this information 
     80        get copy to the new fitproblem 
    8181        :param data: list of data selected 
    8282        """ 
     
    202202        """ 
    203203        :param flag: bool.When flag is 1 get the computer smear value. When 
    204         flag is 0 ingore smear value. 
     204            flag is 0 ingore smear value. 
    205205        """ 
    206206        self._smear_on = flag 
     
    346346        """ 
    347347        return data for the given fitproblem id 
    348         :param fid: is key representing a fitproblem. usually extract from data 
    349                     id 
     348        :param fid: key representing a fitproblem, usually extract from data id 
    350349        """ 
    351350        if fid in self.iterkeys(): 
     
    531530        """ 
    532531        :param flag: bool.When flag is 1 get the computer smear value. When 
    533         flag is 0 ingore smear value. 
     532            flag is 0 ingore smear value. 
    534533        """ 
    535534        self.smearer_enable = flag 
Note: See TracChangeset for help on using the changeset viewer.