diff --git a/news/docstrings.rst b/news/docstrings.rst new file mode 100644 index 0000000..d8a0152 --- /dev/null +++ b/news/docstrings.rst @@ -0,0 +1,23 @@ +**Added:** + +* add docstrings to functions without docstrings + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index f0323f1..f331b7e 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -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 @@ -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: @@ -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 @@ -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 @@ -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(): @@ -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