Skip to content

Commit a1f1f49

Browse files
authored
Merge pull request #147 from cadenmyers13/addcontrib-dep
deprecate: `addContribution` deprecation
2 parents d3c210e + bc0ce35 commit a1f1f49

25 files changed

+123
-34
lines changed

docs/examples/coreshellnp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def makeRecipe(stru1, stru2, datname):
8585

8686
# Make the FitRecipe and add the FitContribution.
8787
recipe = FitRecipe()
88-
recipe.addContribution(contribution)
88+
recipe.add_contribution(contribution)
8989

9090
# Vary the inner radius and thickness of the shell. Constrain the core
9191
# diameter to twice the shell radius.

docs/examples/crystalpdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def makeRecipe(ciffile, datname):
7979

8080
# Make the FitRecipe and add the FitContribution.
8181
recipe = FitRecipe()
82-
recipe.addContribution(contribution)
82+
recipe.add_contribution(contribution)
8383

8484
# Configure the fit variables
8585

docs/examples/crystalpdfall.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def makeRecipe(
104104

105105
# Make the FitRecipe and add the FitContributions.
106106
recipe = FitRecipe()
107-
recipe.addContribution(xcontribution_ni)
108-
recipe.addContribution(xcontribution_si)
109-
recipe.addContribution(ncontribution_ni)
110-
recipe.addContribution(xcontribution_sini)
107+
recipe.add_contribution(xcontribution_ni)
108+
recipe.add_contribution(xcontribution_si)
109+
recipe.add_contribution(ncontribution_ni)
110+
recipe.add_contribution(xcontribution_sini)
111111

112112
# Now we vary and constrain Parameters as before.
113113
for par in phase_ni.sgpars:

docs/examples/crystalpdfobjcryst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def makeRecipe(ciffile, datname):
6767

6868
# Make the FitRecipe and add the FitContribution.
6969
recipe = FitRecipe()
70-
recipe.addContribution(contribution)
70+
recipe.add_contribution(contribution)
7171

7272
# Configure the fit variables
7373

docs/examples/crystalpdftwodata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def makeRecipe(ciffile, xdatname, ndatname):
110110

111111
# Make the FitRecipe and add the FitContributions.
112112
recipe = FitRecipe()
113-
recipe.addContribution(xcontribution)
114-
recipe.addContribution(ncontribution)
113+
recipe.add_contribution(xcontribution)
114+
recipe.add_contribution(ncontribution)
115115

116116
# Now we vary and constrain Parameters as before.
117117
recipe.addVar(xgenerator.scale, 1, "xscale")

docs/examples/crystalpdftwophase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def makeRecipe(niciffile, siciffile, datname):
8484

8585
# Make the FitRecipe and add the FitContribution.
8686
recipe = FitRecipe()
87-
recipe.addContribution(contribution)
87+
recipe.add_contribution(contribution)
8888

8989
# Configure the fit variables
9090
# Start by configuring the scale factor and resolution factors.

docs/examples/debyemodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def makeRecipe():
134134
# to fit simultaneously, the contribution from each could be added to the
135135
# recipe.
136136
recipe = FitRecipe()
137-
recipe.addContribution(contribution)
137+
recipe.add_contribution(contribution)
138138

139139
# Specify which Parameters we want to refine.
140140

docs/examples/debyemodelII.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def makeRecipeII():
7171
# Now create a fresh FitRecipe to work with and add to it the two
7272
# FitContributions.
7373
recipe = FitRecipe()
74-
recipe.addContribution(lowT)
75-
recipe.addContribution(highT)
74+
recipe.add_contribution(lowT)
75+
recipe.add_contribution(highT)
7676

7777
# Change the fit ranges of the Profiles embedded within the
7878
# FitContributions. We want to fit one of the contributions at low

docs/examples/ellipsoidsas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def makeRecipe(datname):
6868

6969
# Make the FitRecipe and add the FitContribution.
7070
recipe = FitRecipe()
71-
recipe.addContribution(contribution)
71+
recipe.add_contribution(contribution)
7272

7373
# Configure the fit variables
7474
# The SASGenerator uses the parameters from the params and dispersion

docs/examples/gaussiangenerator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def makeRecipe():
150150
# The FitRecipe
151151
# Now we create the FitRecipe and add the FitContribution.
152152
recipe = FitRecipe()
153-
recipe.addContribution(contribution)
153+
recipe.add_contribution(contribution)
154154

155155
# Specify which Parameters we want to vary in the fit. This will add
156156
# Variables to the FitRecipe that directly modify the Parameters of the

0 commit comments

Comments
 (0)