From 3444ea9132d0d358eb70734721c3f149fa997776 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 23 Oct 2024 14:24:08 -0400 Subject: [PATCH 1/3] docstring for initUI --- src/diffpy/fourigui/fourigui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index f0323f1..ed1b5ad 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 @@ -533,7 +534,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(): From b3c7face3f210a1f75190b089df1c20fae8adc25 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 23 Oct 2024 14:38:12 -0400 Subject: [PATCH 2/3] docstrings --- src/diffpy/fourigui/fourigui.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index ed1b5ad..f331b7e 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -502,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: @@ -514,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 @@ -524,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 @@ -549,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 From 3840a40cc43fc3996b2ff42d1aa4f48e56dc7b3a Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 23 Oct 2024 14:41:14 -0400 Subject: [PATCH 3/3] news --- news/docstrings.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/docstrings.rst 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:** + +*