@@ -21,6 +21,7 @@ def __init__(self):
2121 self .initUI ()
2222
2323 def initUI (self ):
24+ """Initialize the GUI for fourigui"""
2425
2526 self .loaded = False # denotes whether a dataset is loaded
2627 self .transformed = False # denotes whether dataset is Fourier transformed
@@ -501,6 +502,9 @@ def applycutoff(self):
501502 self .intensity_upd_global ()
502503
503504 def redocutuff (self ):
505+ """
506+ Redo the cutoff operation depending on the current space (real or reciprocal).
507+ """
504508 if self .space .get (): # in real space
505509 self .cube_realcut = self .cube
506510 if not self .transformed :
@@ -513,6 +517,9 @@ def redocutuff(self):
513517 self .intensity_upd_global ()
514518
515519 def newcutoff (self ):
520+ """
521+ Apply a new cutoff based on the current space and cutoff settings.
522+ """
516523 if self .cutoff .get ():
517524 if self .space .get () and self .transformed :
518525 self .cube = self .cube_real
@@ -523,6 +530,9 @@ def newcutoff(self):
523530 self .applycutoff ()
524531
525532 def plot_next_plane (self ):
533+ """
534+ Plot the next plane in the dataset, looping back to the first if at the end.
535+ """
526536 n = self .plane_num .get ()
527537 if n == len (self .cube [self .axis .get ()]) - 1 :
528538 n = 0
@@ -533,7 +543,7 @@ def plot_next_plane(self):
533543
534544 def animation (self ):
535545 """
536- slices through the 3D array along the selcted axis
546+ slices through the 3D array along the selected axis
537547 """
538548 try :
539549 if not self .anientry .get ():
@@ -548,6 +558,9 @@ def animation(self):
548558 self .plot_next_plane ()
549559
550560 def multiple_funcs (* funcs ):
561+ """
562+ Executes multiple functions passed as arguments in sequence.
563+ """
551564 for func in funcs :
552565 func
553566
0 commit comments