Skip to content
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
23 changes: 23 additions & 0 deletions news/docstrings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* add docstrings to functions without docstrings

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
15 changes: 14 additions & 1 deletion src/diffpy/fourigui/fourigui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(self):
self.initUI()

def initUI(self):
"""Initialize the GUI for fourigui"""

self.loaded = False # denotes whether a dataset is loaded
self.transformed = False # denotes whether dataset is Fourier transformed
Expand Down Expand Up @@ -501,6 +502,9 @@ def applycutoff(self):
self.intensity_upd_global()

def redocutuff(self):
"""
Redo the cutoff operation depending on the current space (real or reciprocal).
"""
if self.space.get(): # in real space
self.cube_realcut = self.cube
if not self.transformed:
Expand All @@ -513,6 +517,9 @@ def redocutuff(self):
self.intensity_upd_global()

def newcutoff(self):
"""
Apply a new cutoff based on the current space and cutoff settings.
"""
if self.cutoff.get():
if self.space.get() and self.transformed:
self.cube = self.cube_real
Expand All @@ -523,6 +530,9 @@ def newcutoff(self):
self.applycutoff()

def plot_next_plane(self):
"""
Plot the next plane in the dataset, looping back to the first if at the end.
"""
n = self.plane_num.get()
if n == len(self.cube[self.axis.get()]) - 1:
n = 0
Expand All @@ -533,7 +543,7 @@ def plot_next_plane(self):

def animation(self):
"""
slices through the 3D array along the selcted axis
slices through the 3D array along the selected axis
"""
try:
if not self.anientry.get():
Expand All @@ -548,6 +558,9 @@ def animation(self):
self.plot_next_plane()

def multiple_funcs(*funcs):
"""
Executes multiple functions passed as arguments in sequence.
"""
for func in funcs:
func

Expand Down