Skip to content

Commit f5817b0

Browse files
committed
docs: add docstrings to methods
1 parent bdc7f23 commit f5817b0

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

src/ess/reflectometry/gui.py

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,36 +196,27 @@ def on_tree_select(self, event):
196196

197197

198198
class ReflectometryBatchReductionGUI:
199-
"""GUI for batch reduction of reflectometry data.
200-
201-
Known limitations:
202-
1. Remove plot button behavior is inconsistent:
203-
- Removes the target plot with its controls
204-
- Previous plots disappear but their control buttons remain
205-
- Previous plots maintain interactivity despite attempted conversion to static
206-
2. Dataset toggle does not affect error bars as they are separate matplotlib artists
207-
3. Remove row button removes last row instead of selected row
208-
4. LogY toggle doesn't work due to workarounds for plopp's axis behavior:
209-
- Plopp's autoscale was flipping the y-axis orientation
210-
- We override multiple plopp/matplotlib methods to maintain correct orientation
211-
- This prevents the LogY toggle from working as it would interfere with our fixes
212-
213-
These limitations are documented with FIXME comments in the relevant code sections.
214-
"""
199+
"""GUI for batch reduction of reflectometry data."""
215200

216201
def read_meta_data(self, path):
202+
'Reads metadata from the hdf5 file at ``path``'
217203
raise NotImplementedError()
218204

219205
def sync_runs_table(self, db):
206+
'Returns the updated runs table based after metadata has been updated'
220207
raise NotImplementedError()
221208

222209
def sync_reduction_table(self, db):
210+
'Returns the updated reduction table based after runs table has been updated'
223211
raise NotImplementedError()
224212

225213
def sync_reference_table(self, db):
214+
'Returns the updated reference table based after runs table has been updated'
226215
raise NotImplementedError()
227216

228217
def sync_custom_reduction_table(self):
218+
'''Returns the updated custom reduction table after
219+
the custom reduction table has been updated'''
229220
raise NotImplementedError()
230221

231222
def display_results(self):
@@ -235,12 +226,8 @@ def run_workflow(self):
235226
raise NotImplementedError()
236227

237228
def get_row_key(self, row):
238-
reference_metadata = (
239-
tuple(self.reference_table.data.iloc[0])
240-
if len(self.reference_table.data) > 0
241-
else (None,)
242-
)
243-
return (tuple(row), tuple(reference_metadata))
229+
'Key determines if a result needs to be recomputed or not'
230+
raise NotImplementedError()
244231

245232
def sync_table_colors(self, table):
246233
template = 'row == {i} ? {reduced_color} : '
@@ -766,6 +753,14 @@ def toggle_line(name, value, figure):
766753
def get_filepath_from_run(self, run):
767754
return os.path.join(self.path, f'amor2024n{run:0>6}.hdf')
768755

756+
def get_row_key(self, row):
757+
reference_metadata = (
758+
tuple(self.reference_table.data.iloc[0])
759+
if len(self.reference_table.data) > 0
760+
else (None,)
761+
)
762+
return (tuple(row), tuple(reference_metadata))
763+
769764
def get_selected_rows(self):
770765
chunks = [
771766
table.data.iloc[s['r1'] : s['r2'] + 1]

0 commit comments

Comments
 (0)