Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-38499: Fix whitespace problems found by flake8 v6 #205

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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