Skip to content

Commit

Permalink
Fixes more sphinx doc build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
butlerpd committed Jul 26, 2015
1 parent 1f5f206 commit fb3f9af
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
3 changes: 1 addition & 2 deletions src/sas/guiframe/documentation_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ class DocumentationWindow(wx.Frame):
called
(self, parent, dummy_id, path, url_instruction, title, size=(850, 540))
:param path: path to html file beginning AFTER /doc/ and ending in the
:param path: path to html file beginning AFTER /doc/ and ending in the\
file.html.
:param url_instructions: anchor string or other query e.g. '#MyAnchor'
:param title: text to place in the title bar of the help panel
"""
Expand Down
49 changes: 28 additions & 21 deletions src/sas/models/MultiplicationModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ class MultiplicationModel(BaseComponent):
The model parameters are combined from both models, P(Q) and S(Q), except 1) 'effect_radius' of S(Q)
which will be calculated from P(Q) via calculate_ER(),
and 2) 'scale' in P model which is synchronized w/ volfraction in S
then P*S is multiplied by a new param, 'scale_factor'.
then P*S is multiplied by a new parameter, 'scale_factor'.
The polydispersion is applicable only to P(Q), not to S(Q).
Note: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'.
.. note:: P(Q) refers to 'form factor' model while S(Q) does to 'structure factor'.
"""
def __init__(self, p_model, s_model ):
BaseComponent.__init__(self)
Expand Down Expand Up @@ -80,8 +81,8 @@ def __init__(self, p_model, s_model ):

def _clone(self, obj):
"""
Internal utility function to copy the internal
data members to a fresh copy.
Internal utility function to copy the internal data members to a
fresh copy.
"""
obj.params = copy.deepcopy(self.params)
obj.description = copy.deepcopy(self.description)
Expand All @@ -95,8 +96,8 @@ def _clone(self, obj):

def _set_dispersion(self):
"""
combined the two models dispersions
Polydispersion should not be applied to s_model
combine the two models' dispersions. Polydispersity should not be
applied to s_model
"""
##set dispersion only from p_model
for name , value in self.p_model.dispersion.iteritems():
Expand All @@ -106,9 +107,10 @@ def getProfile(self):
"""
Get SLD profile of p_model if exists
: return: (r, beta) where r is a list of radius of the transition points
beta is a list of the corresponding SLD values
: Note: This works only for func_shell num = 2 (exp function).
:return: (r, beta) where r is a list of radius of the transition points\
beta is a list of the corresponding SLD values
.. note:: This works only for func_shell num = 2 (exp function).
"""
try:
x, y = self.p_model.getProfile()
Expand All @@ -120,8 +122,8 @@ def getProfile(self):

def _set_params(self):
"""
Concatenate the parameters of the two models to create
this model parameters
Concatenate the parameters of the two models to create
these model parameters
"""

for name , value in self.p_model.params.iteritems():
Expand All @@ -140,8 +142,8 @@ def _set_params(self):

def _set_details(self):
"""
Concatenate details of the two models to create
this model details
Concatenate details of the two models to create
this model's details
"""
for name, detail in self.p_model.details.iteritems():
if name != 'scale':
Expand All @@ -153,7 +155,7 @@ def _set_details(self):

def _set_scale_factor(self):
"""
Set scale=volfraction to P model
Set scale=volfraction for P model
"""
value = self.params['volfraction']
if value != None:
Expand All @@ -167,7 +169,7 @@ def _set_scale_factor(self):

def _set_effect_radius(self):
"""
Set effective radius to S(Q) model
Set effective radius to S(Q) model
"""
if not 'effect_radius' in self.s_model.params.keys():
return
Expand Down Expand Up @@ -205,7 +207,7 @@ def setParam(self, name, value):

def _setParamHelper(self, name, value):
"""
Helper function to setparam
Helper function to setparam
"""
# Look for dispersion parameters
toks = name.split('.')
Expand All @@ -228,7 +230,7 @@ def _setParamHelper(self, name, value):

def _set_fixed_params(self):
"""
fill the self.fixed list with the p_model fixed list
Fill the self.fixed list with the p_model fixed list
"""
for item in self.p_model.fixed:
self.fixed.append(item)
Expand All @@ -239,6 +241,7 @@ def _set_fixed_params(self):
def run(self, x = 0.0):
"""
Evaluate the model
:param x: input q-value (float or [float, float] as [r, theta])
:return: (scattering function value)
"""
Expand All @@ -249,9 +252,11 @@ def run(self, x = 0.0):
self.s_model.run(x)

def runXY(self, x = 0.0):
""" Evaluate the model
@param x: input q-value (float or [float, float] as [qx, qy])
@return: scattering function value
"""
Evaluate the model
:param x: input q-value (float or [float, float] as [qx, qy])
:return: scattering function value
"""
# set effective radius and scaling factor before run
self._set_effect_radius()
Expand All @@ -265,6 +270,7 @@ def runXY(self, x = 0.0):
def evalDistribution(self, x = []):
"""
Evaluate the model in cartesian coordinates
:param x: input q[], or [qx[], qy[]]
:return: scattering function P(q[])
"""
Expand All @@ -278,6 +284,7 @@ def evalDistribution(self, x = []):
def set_dispersion(self, parameter, dispersion):
"""
Set the dispersion object for a model parameter
:param parameter: name of the parameter [string]
:dispersion: dispersion object of type DispersionModel
"""
Expand All @@ -292,7 +299,7 @@ def set_dispersion(self, parameter, dispersion):

def fill_description(self, p_model, s_model):
"""
Fill the description for P(Q)*S(Q)
Fill the description for P(Q)*S(Q)
"""
description = ""
description += "Note:1) The effect_radius (effective radius) of %s \n"%\
Expand Down
3 changes: 3 additions & 0 deletions src/sas/models/sas_extension/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
This is an empty package - should probably delete
"""

0 comments on commit fb3f9af

Please sign in to comment.