Skip to content

Commit e70208e

Browse files
committed
MAINT: clean up issues reported by pyflakes.
Drop unused variables and unused imports. Clean up re-definitions of the same name.
1 parent 4a979de commit e70208e

15 files changed

+8
-50
lines changed

doc/examples/coreshellnp.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,7 @@ def plotResults(recipe):
131131
"""Plot the results contained within a refined FitRecipe."""
132132

133133
# All this should be pretty familiar by now.
134-
names = recipe.getNames()
135-
vals = recipe.getValues()
136-
137134
r = recipe.cdszns.profile.x
138-
139135
g = recipe.cdszns.profile.y
140136
gcalc = recipe.cdszns.profile.ycalc
141137
diffzero = -0.8 * max(g) * numpy.ones_like(g)

doc/examples/crystalpdf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@ def plotResults(recipe):
127127
"""Plot the results contained within a refined FitRecipe."""
128128

129129
# All this should be pretty familiar by now.
130-
names = recipe.getNames()
131-
vals = recipe.getValues()
132-
133130
r = recipe.nickel.profile.x
134-
135131
g = recipe.nickel.profile.y
136132
gcalc = recipe.nickel.profile.ycalc
137133
diffzero = -0.8 * max(g) * numpy.ones_like(g)

doc/examples/crystalpdfall.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ def plotResults(recipe):
141141
"""Plot the results contained within a refined FitRecipe."""
142142

143143
# All this should be pretty familiar by now.
144-
names = recipe.getNames()
145-
vals = recipe.getValues()
146-
147144
xnickel = recipe.xnickel
148145
xr_ni = xnickel.profile.x
149146
xg_ni = xnickel.profile.y

doc/examples/crystalpdftwodata.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from diffpy.srfit.fitbase import FitResults
3232

3333
from gaussianrecipe import scipyOptimize
34-
from crystalpdf import plotResults
3534

3635
####### Example Code
3736

@@ -137,9 +136,6 @@ def plotResults(recipe):
137136
"""Plot the results contained within a refined FitRecipe."""
138137

139138
# All this should be pretty familiar by now.
140-
names = recipe.getNames()
141-
vals = recipe.getValues()
142-
143139
xr = recipe.xnickel.profile.x
144140
xg = recipe.xnickel.profile.y
145141
xgcalc = recipe.xnickel.profile.ycalc

doc/examples/crystalpdftwophase.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,7 @@ def plotResults(recipe):
141141
"""Plot the results contained within a refined FitRecipe."""
142142

143143
# All this should be pretty familiar by now.
144-
names = recipe.getNames()
145-
vals = recipe.getValues()
146-
147144
r = recipe.nisi.profile.x
148-
149145
g = recipe.nisi.profile.y
150146
gcalc = recipe.nisi.profile.ycalc
151147
diffzero = -0.8 * max(g) * numpy.ones_like(g)

doc/examples/debyemodelII.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def makeRecipeII():
8585
recipe.addVar(recipe.highT.offset, name = "highToffset")
8686
# We create a new Variable and use the recipe's "constrain" method to
8787
# associate the Debye temperature parameters with that variable.
88-
par = recipe.newVar("thetaD", 100)
88+
recipe.newVar("thetaD", 100)
8989
recipe.constrain(recipe.lowT.thetaD, "thetaD")
9090
recipe.constrain(recipe.highT.thetaD, "thetaD")
9191
return recipe

doc/examples/ellipsoidsas.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ def plotResults(recipe):
8585
"""Plot the results contained within a refined FitRecipe."""
8686

8787
# All this should be pretty familiar by now.
88-
names = recipe.getNames()
89-
vals = recipe.getValues()
90-
9188
r = recipe.ellipsoid.profile.x
92-
9389
y = recipe.ellipsoid.profile.y
9490
ycalc = recipe.ellipsoid.profile.ycalc
9591
diff = y - ycalc + min(y)

doc/examples/gaussiangenerator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343

4444
from diffpy.srfit.fitbase import ProfileGenerator, Profile
4545
from diffpy.srfit.fitbase import FitContribution, FitRecipe
46-
from diffpy.srfit.fitbase import FitResults
4746

4847
####### Example Code
4948

doc/examples/npintensity.py

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

228228
# This creates a callable equation named "bkgd" within the FitContribution,
229229
# and turns the polynomial coefficients into Parameters.
230-
eq = contribution.registerStringFunction(bkgdstr, "bkgd")
230+
contribution.registerStringFunction(bkgdstr, "bkgd")
231231

232232
# We will create the broadening function that we need by creating a python
233233
# function and registering it with the FitContribution.

doc/examples/npintensityII.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
import numpy
3838

3939
from diffpy.srfit.fitbase import FitContribution, FitRecipe, Profile, FitResults
40-
from npintensity import IntensityGenerator, scipyOptimize
41-
from npintensity import iofq, makeData
40+
from npintensity import IntensityGenerator
41+
from npintensity import makeData
4242

4343
from gaussianrecipe import scipyOptimize
4444

0 commit comments

Comments
 (0)