Skip to content

Commit

Permalink
Merge pull request #205 from lsst/tickets/DM-38499
Browse files Browse the repository at this point in the history
DM-38499: Fix whitespace problems found by flake8 v6
  • Loading branch information
timj committed Jul 13, 2023
2 parents 9b697b7 + f417d32 commit 5b5c362
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/cp/pipe/makeBrighterFatterKernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def _tileArray(in_array):
output : `np.array`, (2*N + 1, 2*N + 1)
The full, tiled array
"""
assert(in_array.shape[0] == in_array.shape[1])
assert in_array.shape[0] == in_array.shape[1]
length = in_array.shape[0] - 1
output = np.zeros((2*length + 1, 2*length + 1))

Expand Down
4 changes: 2 additions & 2 deletions python/lsst/cp/pipe/ptc/cpSolvePtcTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def initialFitFullCovariance(self, mu, cov, sqrtW):
# model equation (Eq. 20) in Astier+19, with c=a*b=0:
a[i, j] += parsFit[0]
noise[i, j] += parsFit[2]
if(i + j == 0):
if i + j == 0:
gain = 1./(1/gain+parsFit[1])
weightedRes = (model - cov)*sqrtW
chi2 = (weightedRes.flatten()**2).sum()
Expand Down Expand Up @@ -801,7 +801,7 @@ def evalCovModel(self, mu, aMatrix, cMatrix, noiseMatrix, gain, setBtoZero=False
# EXPAPPROXIMATION and POLYNOMIAL fit methods
@staticmethod
def _initialParsForPolynomial(order):
assert(order >= 2)
assert order >= 2
pars = np.zeros(order, dtype=float)
pars[0] = 10
pars[1] = 1
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/cp/pipe/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,8 @@ class CovFastFourierTransform:
def __init__(self, diff, w, fftShape, maxRangeCov):
# check that the zero padding implied by "fft_shape"
# is large enough for the required correlation range
assert(fftShape[0] > diff.shape[0]+maxRangeCov+1)
assert(fftShape[1] > diff.shape[1]+maxRangeCov+1)
assert fftShape[0] > diff.shape[0]+maxRangeCov+1
assert fftShape[1] > diff.shape[1]+maxRangeCov+1
# for some reason related to numpy.fft.rfftn,
# the second dimension should be even, so
if fftShape[1]%2 == 1:
Expand Down

0 comments on commit 5b5c362

Please sign in to comment.