Skip to content

Commit 966bb4b

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent e67ca0b commit 966bb4b

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

src/diffpy/fourigui/fourigui.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ def initUI(self):
285285
) # , height=HEIGHT//2, width=WIDTH//2)
286286

287287
def load_cube(self):
288-
"""Loads 3D array in h5py file format from the filename input panel 3D
289-
array is expected to be a reconstructed reciprocal scattering volume
290-
when executed, one slide perpendicular to the selected axis will be
291-
plotted in the plot panel."""
288+
"""Loads 3D array in h5py file format from the filename input
289+
panel 3D array is expected to be a reconstructed reciprocal
290+
scattering volume when executed, one slide perpendicular to the
291+
selected axis will be plotted in the plot panel."""
292292

293293
filename = self.filename_entry.get()
294294
f = h5py.File(filename, "r")
@@ -397,8 +397,8 @@ def colorrange_upd(self):
397397
self.plot_plane()
398398

399399
def intensity_upd_local(self):
400-
"""Show local intensity minimum, maximum and sum of current plotted
401-
plane."""
400+
"""Show local intensity minimum, maximum and sum of current
401+
plotted plane."""
402402
if self.axis.get() == 0:
403403
plane = self.cube[self.plane_num.get(), :, :]
404404
elif self.axis.get() == 1:
@@ -418,7 +418,8 @@ def intensity_upd_local(self):
418418
self.localnanratio["text"] = f"{round(nan_ratio, 2)}"
419419

420420
def intensity_upd_global(self):
421-
"""Load global intensity minimum, maximum and sum of 3D array."""
421+
"""Load global intensity minimum, maximum and sum of 3D
422+
array."""
422423
self.intensity_upd_local()
423424
nan_ratio = np.count_nonzero(np.isnan(self.cube)) / self.cube.size
424425
self.globalmax["text"] = (
@@ -433,8 +434,9 @@ def intensity_upd_global(self):
433434
self.globalnanratio["text"] = "{}".format(round(nan_ratio, 2))
434435

435436
def fft(self):
436-
"""Fourier transform 3D array from reciprocal to real space the origin
437-
of reciprocal and real space is expected to be the central voxel."""
437+
"""Fourier transform 3D array from reciprocal to real space the
438+
origin of reciprocal and real space is expected to be the
439+
central voxel."""
438440

439441
def perform_fft(fftholder):
440442
fftholder = np.nan_to_num(fftholder)
@@ -487,9 +489,9 @@ def perform_fft(fftholder):
487489
self.intensity_upd_global()
488490

489491
def ifft(self):
490-
"""Inverse Fourier transform 3D array from real to reciprocal space the
491-
origin of real and reciprocal space is expected to be the central
492-
voxel."""
492+
"""Inverse Fourier transform 3D array from real to reciprocal
493+
space the origin of real and reciprocal space is expected to be
494+
the central voxel."""
493495
if not self.cutoff.get():
494496
self.cube_real = self.cube
495497
self.cube = self.cube_reci
@@ -562,8 +564,8 @@ def applycutoff(self):
562564
self.intensity_upd_global()
563565

564566
def redocutuff(self):
565-
"""Redo the cutoff operation depending on the current space (real or
566-
reciprocal)."""
567+
"""Redo the cutoff operation depending on the current space
568+
(real or reciprocal)."""
567569
if self.space.get(): # in real space
568570
self.cube_realcut = self.cube
569571
if not self.transformed:
@@ -588,8 +590,8 @@ def newcutoff(self):
588590
self.applycutoff()
589591

590592
def plot_next_plane(self):
591-
"""Plot the next plane in the dataset, looping back to the first if at
592-
the end."""
593+
"""Plot the next plane in the dataset, looping back to the first
594+
if at the end."""
593595
n = self.plane_num.get()
594596
if n == len(self.cube[self.axis.get()]) - 1:
595597
n = 0
@@ -616,7 +618,8 @@ def animation(self):
616618
self.plot_next_plane()
617619

618620
def multiple_funcs(*funcs):
619-
"""Executes multiple functions passed as arguments in sequence."""
621+
"""Executes multiple functions passed as arguments in
622+
sequence."""
620623
for func in funcs:
621624
func
622625

0 commit comments

Comments
 (0)