@@ -285,10 +285,10 @@ def initUI(self):
285
285
) # , height=HEIGHT//2, width=WIDTH//2)
286
286
287
287
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."""
292
292
293
293
filename = self .filename_entry .get ()
294
294
f = h5py .File (filename , "r" )
@@ -397,8 +397,8 @@ def colorrange_upd(self):
397
397
self .plot_plane ()
398
398
399
399
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."""
402
402
if self .axis .get () == 0 :
403
403
plane = self .cube [self .plane_num .get (), :, :]
404
404
elif self .axis .get () == 1 :
@@ -418,7 +418,8 @@ def intensity_upd_local(self):
418
418
self .localnanratio ["text" ] = f"{ round (nan_ratio , 2 )} "
419
419
420
420
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."""
422
423
self .intensity_upd_local ()
423
424
nan_ratio = np .count_nonzero (np .isnan (self .cube )) / self .cube .size
424
425
self .globalmax ["text" ] = (
@@ -433,8 +434,9 @@ def intensity_upd_global(self):
433
434
self .globalnanratio ["text" ] = "{}" .format (round (nan_ratio , 2 ))
434
435
435
436
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."""
438
440
439
441
def perform_fft (fftholder ):
440
442
fftholder = np .nan_to_num (fftholder )
@@ -487,9 +489,9 @@ def perform_fft(fftholder):
487
489
self .intensity_upd_global ()
488
490
489
491
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."""
493
495
if not self .cutoff .get ():
494
496
self .cube_real = self .cube
495
497
self .cube = self .cube_reci
@@ -562,8 +564,8 @@ def applycutoff(self):
562
564
self .intensity_upd_global ()
563
565
564
566
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)."""
567
569
if self .space .get (): # in real space
568
570
self .cube_realcut = self .cube
569
571
if not self .transformed :
@@ -588,8 +590,8 @@ def newcutoff(self):
588
590
self .applycutoff ()
589
591
590
592
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."""
593
595
n = self .plane_num .get ()
594
596
if n == len (self .cube [self .axis .get ()]) - 1 :
595
597
n = 0
@@ -616,7 +618,8 @@ def animation(self):
616
618
self .plot_next_plane ()
617
619
618
620
def multiple_funcs (* funcs ):
619
- """Executes multiple functions passed as arguments in sequence."""
621
+ """Executes multiple functions passed as arguments in
622
+ sequence."""
620
623
for func in funcs :
621
624
func
622
625
0 commit comments