Skip to content

Commit 978dca1

Browse files
fix formatting issue and typo in copyright (#35)
1 parent 81b261b commit 978dca1

15 files changed

+25
-28
lines changed

Diff for: diffpy/srmise/basefunction.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
7-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
87
# All rights reserved.
98
#
109
# File coded by: Luke Granlund

Diff for: diffpy/srmise/baselines/arbitrary.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund
@@ -89,11 +89,12 @@ def __init__(self, npars, valuef, jacobianf=None, estimatef=None, Cache=None):
8989

9090
# TODO: figure out how the metadict can be used to save the functions
9191
# and use them again when a file is loaded...
92-
metadict = {}
93-
metadict["npars"] = (npars, repr)
94-
metadict["valuef"] = (valuef, repr)
95-
metadict["jacobianf"] = (jacobianf, repr)
96-
metadict["estimatef"] = (estimatef, repr)
92+
metadict = {
93+
"npars": (npars, repr),
94+
"valuef": (valuef, repr),
95+
"jacobianf": (jacobianf, repr),
96+
"estimatef": (estimatef, repr),
97+
}
9798
BaselineFunction.__init__(self, parameterdict, formats, default_formats, metadict, None, Cache)
9899

99100
# Methods required by BaselineFunction ####
@@ -182,7 +183,6 @@ def _transform_parametersraw(self, pars, in_format, out_format):
182183
def _valueraw(self, pars, r):
183184
"""Return value of polynomial for the given parameters and r values.
184185
185-
Parameters
186186
Parameters
187187
pars: Sequence of parameters
188188
pars[0] = a_0

Diff for: diffpy/srmise/baselines/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/baselines/fromsequence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/baselines/nanospherical.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund
@@ -35,7 +35,7 @@ class NanoSpherical(BaselineFunction):
3535
scale factor is 4*pi*rho_0, where rho_r is the nanoparticle density.
3636
3737
gamma_0(r) Reference:
38-
Guinier et. al. (1955). Small-angle Scattering from X-rays. New York: John Wiley & Sons, Inc.
38+
Guinier et al. (1955). Small-angle Scattering from X-rays. New York: John Wiley & Sons, Inc.
3939
"""
4040

4141
def __init__(self, Cache=None):

Diff for: diffpy/srmise/baselines/polynomial.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund
@@ -49,8 +49,7 @@ def __init__(self, degree, Cache=None):
4949
parameterdict["a_" + str(d)] = self.degree - d
5050
formats = ["internal"]
5151
default_formats = {"default_input": "internal", "default_output": "internal"}
52-
metadict = {}
53-
metadict["degree"] = (degree, repr)
52+
metadict = {"degree": (degree, repr)}
5453
BaselineFunction.__init__(self, parameterdict, formats, default_formats, metadict, None, Cache)
5554

5655
# Methods required by BaselineFunction ####
@@ -95,12 +94,11 @@ def estimate_parameters(self, r, y):
9594

9695
import numpy.linalg as la
9796

98-
A = np.array([r[cut_idx]]).T
99-
slope = la.lstsq(A, y[cut_idx])[0][0]
97+
a = np.array([r[cut_idx]]).T
98+
slope = la.lstsq(a, y[cut_idx])[0][0]
10099
return np.array([slope, 0.0])
101100
except Exception as e:
102101
emsg = "Error during estimation -- " + str(e)
103-
raise
104102
raise SrMiseEstimationError(emsg)
105103

106104
def _jacobianraw(self, pars, r, free):

Diff for: diffpy/srmise/dataclusters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/modelcluster.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/modelevaluators/aic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/modelevaluators/aicc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/modelevaluators/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/peaks/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/peaks/gaussian.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/peaks/gaussianoverr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

Diff for: diffpy/srmise/peaks/terminationripples.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SrMise by Luke Granlund
55
# (c) 2014 trustees of the Michigan State University
6-
# (c) 2024 trustees of Columia University in the City of New York
6+
# (c) 2024 trustees of Columbia University in the City of New York
77
# All rights reserved.
88
#
99
# File coded by: Luke Granlund

0 commit comments

Comments
 (0)