Skip to content

Commit 0566b9e

Browse files
authored
Merge pull request #399 from European-XFEL/docs-fixes
Minor docs fixes
2 parents 69b0d54 + 3039bae commit 0566b9e

6 files changed

Lines changed: 17 additions & 14 deletions

File tree

docs/changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Added:
2525
supports `DataCollection` objects to reference a point in time
2626
- Pre-built packages will be available on PyPI for Python 3.10 - 3.13 from the
2727
next release, rather than only Python 3.10 (!377).
28-
- [Scan.group_data] method to make an xarray or pandas GroupBy object based on
29-
scan steps (!379).
28+
- [Scan.group_data()][extra.components.Scan.group_data] method to make an xarray
29+
or pandas GroupBy object based on scan steps (!379).
3030
- [fit_gaussian()][extra.utils.fit_gaussian] has a new `nans_on_failure`
3131
argument to allow returning NaN arrays when fitting fails (!385).
3232
- [fit_gaussian()][extra.utils.fit_gaussian] now supports

src/extra/components/scan.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,15 @@ def split_by_steps(self, data):
343343
def group_data(self, data):
344344
"""Group data labelled with train IDs by scan step.
345345
346-
data can be an xarray object with trainId coordinates, or a pandas
346+
`data` can be an xarray object with trainId coordinates, or a pandas
347347
object with train IDs in the index. The train IDs can be one level in a
348348
MultiIndex, so long as the level is named trainId.
349349
350-
Returns a GroupBy object from the relevant library.
350+
Returns a GroupBy object from the relevant library (e.g. a
351+
[DataArrayGroupedBy][xarray.core.groupby.DataArrayGroupBy] for a
352+
[DataArray][xarray.DataArray] input, or a
353+
[`DataFrameGroupBy`/`SeriesGroupBy`](https://pandas.pydata.org/docs/reference/groupby.html)
354+
for a [DataFrame][pandas.DataFrame] or [Series][pandas.Series] input).
351355
"""
352356
train_ix = np.concatenate(self.positions_train_ids)
353357
scan_pos = np.concatenate([np.full(tids.shape, p) for (p, tids) in self.steps])

src/extra/gui/jupyter/spectrometer_calibration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class SpectrometerCalibration:
189189
widget.close_all()
190190
```
191191
192-
# Widget interraction
192+
# Widget interaction
193193
## Tab 1: ROI selection
194194
195195
- Click and drag vertically on the image to define rectangular ROIs.

src/extra/gui/widgets/peak_selection.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,13 @@ def get_selected_peaks(self):
639639
Returns the selected peak positions for all ROIs.
640640
641641
Returns:
642-
list: A list of dictionaries, one for each ROI processed. Each dict contains:
643-
- 'roi_def': The original ROI definition dictionary.
644-
- 'roi_index': The original index of the ROI in the input list.
645-
- 'peaks': A list of selected peak pixel positions for this ROI,
646-
sorted by pixel value. Returns an empty list if no peaks
647-
were selected for that ROI.
642+
(list): A list of dictionaries, one for each ROI processed. Each dict contains:
643+
644+
- 'roi_def': The original ROI definition dictionary.
645+
- 'roi_index': The original index of the ROI in the input list.
646+
- 'peaks': A list of selected peak pixel positions for this ROI,
647+
sorted by pixel value. Returns an empty list if no peaks
648+
were selected for that ROI.
648649
"""
649650
results = []
650651
for roi_data in self.rois_data:

src/extra/recipes/cookiebox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ def load_data(self, run: DataCollection, **extra_kwargs_adq: Dict[str, Any]) ->
10691069
10701070
Args:
10711071
run: The run to calibrate.
1072-
kwargs_adq: Keyword arguments for the `AdqRawChannel` object if one wishes to override settings.
1072+
extra_kwargs_adq: Keyword arguments for the `AdqRawChannel` object if one wishes to override settings.
10731073
10741074
Returns: An xarray DataArray with the traces containing axes ('trainId', 'pulseIndex', 'sample', 'tof').
10751075
"""

src/extra/recipes/grating.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ def setup(self,
8888
Setup calibration.
8989
9090
Args:
91-
bkg_run: The background run.
92-
run: The calibration run.
9391
grating_signal: Where to read the grating data from.
9492
Example: `signal_run["SQS_EXP_GH2-2/CORR/RECEIVER:daqOutput", "data.adc"]`
9593
scan: Scan object identfying where to read the undulator energy from.

0 commit comments

Comments
 (0)