Skip to content

Commit 958e382

Browse files
committed
Merge branch 'v3.3.0' of github.com:diffpy/diffpy.srfit into setequation-dep
2 parents f18871b + a1f1f49 commit 958e382

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+474
-267
lines changed

.github/workflows/matrix-and-codecov-on-merge-to-main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
74
release:
85
types:
96
- prereleased

docs/examples/coreshellnp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def makeRecipe(stru1, stru2, datname):
6666
# The FitContribution
6767
# Add both generators and the profile to the FitContribution.
6868
contribution = FitContribution("cdszns")
69-
contribution.addProfileGenerator(generator_cds)
70-
contribution.addProfileGenerator(generator_zns)
69+
contribution.add_profile_generator(generator_cds)
70+
contribution.add_profile_generator(generator_zns)
7171
contribution.set_profile(profile, xname="r")
7272

7373
# Set up the characteristic functions. We use a spherical CF for the core
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def makeRecipe(ciffile, datname):
7474
# Here we associate the Profile and ProfileGenerator, as has been done
7575
# before.
7676
contribution = FitContribution("nickel")
77-
contribution.addProfileGenerator(generator)
77+
contribution.add_profile_generator(generator)
7878
contribution.set_profile(profile, xname="r")
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def makeProfile(datafile):
4747
def makeContribution(name, generator, profile):
4848
"""Make a FitContribution and add a generator and profile."""
4949
contribution = FitContribution(name)
50-
contribution.addProfileGenerator(generator)
50+
contribution.add_profile_generator(generator)
5151
contribution.set_profile(profile, xname="r")
5252
return contribution
5353

@@ -93,7 +93,7 @@ def makeRecipe(
9393
xcontribution_sini = makeContribution(
9494
"xsini", xgenerator_sini_ni, xprofile_sini
9595
)
96-
xcontribution_sini.addProfileGenerator(xgenerator_sini_si)
96+
xcontribution_sini.add_profile_generator(xgenerator_sini_si)
9797
xcontribution_sini.set_equation("scale * (xG_sini_ni + xG_sini_si)")
9898

9999
# As explained in another example, we want to minimize using Rw^2.
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ def makeRecipe(ciffile, datname):
6262

6363
# The FitContribution
6464
contribution = FitContribution("nickel")
65-
contribution.addProfileGenerator(generator)
65+
contribution.add_profile_generator(generator)
6666
contribution.set_profile(profile, xname="r")
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def makeRecipe(ciffile, xdatname, ndatname):
8484
# The FitContributions
8585
# We associate the x-ray PDFGenerator and Profile in one FitContribution...
8686
xcontribution = FitContribution("xnickel")
87-
xcontribution.addProfileGenerator(xgenerator)
87+
xcontribution.add_profile_generator(xgenerator)
8888
xcontribution.set_profile(xprofile, xname="r")
8989
# and the neutron objects in another.
9090
ncontribution = FitContribution("nnickel")
91-
ncontribution.addProfileGenerator(ngenerator)
91+
ncontribution.add_profile_generator(ngenerator)
9292
ncontribution.set_profile(nprofile, xname="r")
9393

9494
# This example is different than the previous ones in that we are composing
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def makeRecipe(niciffile, siciffile, datname):
7272
# Add both generators to the FitContribution. Add the Profile. This will
7373
# send the metadata to the generators.
7474
contribution = FitContribution("nisi")
75-
contribution.addProfileGenerator(generator_ni)
76-
contribution.addProfileGenerator(generator_si)
75+
contribution.add_profile_generator(generator_ni)
76+
contribution.add_profile_generator(generator_si)
7777
contribution.set_profile(profile, xname="r")
7878

7979
# Write the fitting equation. We want to sum the PDFs from each phase and
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def makeRecipe(datname):
5757
# Here we associate the Profile and ProfileGenerator, as has been done
5858
# before.
5959
contribution = FitContribution("ellipsoid")
60-
contribution.addProfileGenerator(generator)
60+
contribution.add_profile_generator(generator)
6161
contribution.set_profile(profile, xname="q")
6262

6363
# We want to fit the log of the signal to the log of the data so that the
@@ -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

0 commit comments

Comments
 (0)