toolbox_scs.detectors.gotthard2

Gotthard-II detector related sub-routines

Copyright (2024) SCS Team.

(contributions preferrably comply with pep8 code structure guidelines.)

Module Contents

Functions

extract_GH2(ds, run[, firstFrame, bunchPattern, gh2_dim])

Select and align the frames of the Gotthard-II that have been exposed

toolbox_scs.detectors.gotthard2.extract_GH2(ds, run, firstFrame=0, bunchPattern='scs_ppl', gh2_dim='gh2_pId')[source]

Select and align the frames of the Gotthard-II that have been exposed to light.

Parameters:
  • ds (xarray.Dataset) – The dataset containing GH2 data

  • run (extra_data.DataCollection) – The run containing the bunch pattern source

  • firstFrame (int) – The GH2 frame number corresponding to the first pulse of the train.

  • bunchPattern (str in ['scs_ppl', 'sase3']) – the bunch pattern used to align data. For ‘scs_ppl’, the gh2_pId dimension in renamed ‘ol_pId’, and for ‘sase3’ gh2_pId is renamed ‘sa3_pId’.

  • gh2_dim (str) – The name of the dimension that corresponds to the Gotthard-II frames.

Returns:

nds – The aligned and reduced dataset with only-data-containing GH2 variables.

Return type:

xarray Dataset