Skip to content

Commit 8db7cc6

Browse files
authored
Merge pull request #144 from cadenmyers13/dep-setprofile
deprecate: deprecate `setProfile`
2 parents 47d6dc6 + fe502e2 commit 8db7cc6

29 files changed

+92
-45
lines changed

docs/examples/coreshellnp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def makeRecipe(stru1, stru2, datname):
6868
contribution = FitContribution("cdszns")
6969
contribution.addProfileGenerator(generator_cds)
7070
contribution.addProfileGenerator(generator_zns)
71-
contribution.setProfile(profile, xname="r")
71+
contribution.set_profile(profile, xname="r")
7272

7373
# Set up the characteristic functions. We use a spherical CF for the core
7474
# and a spherical shell CF for the shell. Since this is set up as two

docs/examples/crystalpdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def makeRecipe(ciffile, datname):
7575
# before.
7676
contribution = FitContribution("nickel")
7777
contribution.addProfileGenerator(generator)
78-
contribution.setProfile(profile, xname="r")
78+
contribution.set_profile(profile, xname="r")
7979

8080
# Make the FitRecipe and add the FitContribution.
8181
recipe = FitRecipe()

docs/examples/crystalpdfall.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def makeContribution(name, generator, profile):
4848
"""Make a FitContribution and add a generator and profile."""
4949
contribution = FitContribution(name)
5050
contribution.addProfileGenerator(generator)
51-
contribution.setProfile(profile, xname="r")
51+
contribution.set_profile(profile, xname="r")
5252
return contribution
5353

5454

docs/examples/crystalpdfobjcryst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def makeRecipe(ciffile, datname):
6363
# The FitContribution
6464
contribution = FitContribution("nickel")
6565
contribution.addProfileGenerator(generator)
66-
contribution.setProfile(profile, xname="r")
66+
contribution.set_profile(profile, xname="r")
6767

6868
# Make the FitRecipe and add the FitContribution.
6969
recipe = FitRecipe()

docs/examples/crystalpdftwodata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ def makeRecipe(ciffile, xdatname, ndatname):
8585
# We associate the x-ray PDFGenerator and Profile in one FitContribution...
8686
xcontribution = FitContribution("xnickel")
8787
xcontribution.addProfileGenerator(xgenerator)
88-
xcontribution.setProfile(xprofile, xname="r")
88+
xcontribution.set_profile(xprofile, xname="r")
8989
# and the neutron objects in another.
9090
ncontribution = FitContribution("nnickel")
9191
ncontribution.addProfileGenerator(ngenerator)
92-
ncontribution.setProfile(nprofile, xname="r")
92+
ncontribution.set_profile(nprofile, xname="r")
9393

9494
# This example is different than the previous ones in that we are composing
9595
# a residual function from other residuals (one for the x-ray contribution

docs/examples/crystalpdftwophase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def makeRecipe(niciffile, siciffile, datname):
7474
contribution = FitContribution("nisi")
7575
contribution.addProfileGenerator(generator_ni)
7676
contribution.addProfileGenerator(generator_si)
77-
contribution.setProfile(profile, xname="r")
77+
contribution.set_profile(profile, xname="r")
7878

7979
# Write the fitting equation. We want to sum the PDFs from each phase and
8080
# multiply it by a scaling factor. We also want a certain phase scaling

docs/examples/debyemodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def makeRecipe():
102102
# independent variable (the temperature) from the data to calculate the
103103
# theoretical signal, so give it an informative name ('T') that we can use
104104
# later.
105-
contribution.setProfile(profile, xname="T")
105+
contribution.set_profile(profile, xname="T")
106106

107107
# We now need to create the fitting equation. We tell the FitContribution
108108
# to use the 'debye' function defined below. The 'registerFunction' method

docs/examples/ellipsoidsas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def makeRecipe(datname):
5858
# before.
5959
contribution = FitContribution("ellipsoid")
6060
contribution.addProfileGenerator(generator)
61-
contribution.setProfile(profile, xname="q")
61+
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
6464
# higher-Q information remains significant. There are no I(Q) uncertainty

docs/examples/gaussiangenerator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def makeRecipe():
145145
# set the fitting equation to "g", which calls the GaussianGenerator.
146146
contribution = FitContribution("g1")
147147
contribution.addProfileGenerator(generator)
148-
contribution.setProfile(profile)
148+
contribution.set_profile(profile)
149149

150150
# The FitRecipe
151151
# Now we create the FitRecipe and add the FitContribution.

docs/examples/gaussianrecipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def makeRecipe():
114114
# us access to the data held within the Profile. Here, we can tell it what
115115
# name we want to use for the independent variable. We tell it to use the
116116
# name "x".
117-
contribution.setProfile(profile, xname="x")
117+
contribution.set_profile(profile, xname="x")
118118

119119
# Now we need to create a fitting equation. We do that by writing out the
120120
# equation as a string. The FitContribution will turn this into a callable

0 commit comments

Comments
 (0)