Skip to content
Snippets Groups Projects

Simplify digitizer functions and pulse ID coordinates assignment for XGM, digitizers

Merged Laurent Mercadier requested to merge digitizers_LM into master

Involved: @lleguy @gortr @mercurio

The aim is to clarify/simplify the code for data extraction of point detectors (pulse-resolved data that produces one value per pulse, such as digitizer peaks, XGM, BAM values). The detectors should each have a simple function get_xgm(), get_bam(), get_tim_peaks(), etc, that extracts the relevant values and aligns the pulse ID according to the bunch pattern table. Eventually, these functions should be run in the load function.

The new features are:

  • A new file digitizers.py, with one general function get_digitizers_peaks that can take any FastADC or ADQ412 data. For convenience, get_tim_peaks() and get_laser_peaks() are special calls to get_digitizers_peaks, tailored for SCS data. The peaks are loaded from peak-integrated values by the digitizer or automatically detected from raw traces and the bunchpattern is used to assign pulse ID.
  • Possibility to get / visually inspect the peak-integration parameters of the digitizer parameters or the peak finding algorithm results with check_peaks_params
  • The xgm.py functions are simplified to 3 functions: get_xgm(), align_xgm_array() and calibrate_xgm().
  • A new file bam_detectors.py that extracts and aligns any BAM data.
  • useage of the bunch_pattern_external module, with addition of function is_pulse_at()
  • The load function is modified and returns both the extra_data DataCollection and the processed xarray Dataset.
  • Documentation on the new features is started, some of it via a Jupyter notebook.

The consequences are:

  • The sase1, sase3, npulses_sase1, npulses_sase3 arrays in the load function are not required and not loaded anymore.
  • Instead, the bunchPatternTable is loaded by default, to speed up each of these new functions (currently they each load the bunch pattern table).
  • The function extractBunchPattern, and, in general, the file bunch_pattern.py is not useful and could be removed.
  • The functions that load TIM and XGM data in DSSC were adapted accordingly
Edited by Laurent Mercadier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 2 commits

    • 1bed17b0 - Knife edge notebook clarification
    • ac7bfd66 - Merge branch 'knife-edge-mod' into 'digitizers_LM'

    Compare with previous version

  • added 1 commit

    • a5f89b09 - Fix in doc for load, removed load_run, updated load test and DSSCBinner init accordingly

    Compare with previous version

  • added 1 commit

    • 4117ce65 - Boundary values for find_integ_params, account for corrupted xgm data, check if apd array is valid

    Compare with previous version

  • added 1 commit

    • daa183af - Improved logging messages, harmonized detector functions, added function to...

    Compare with previous version

  • added 2 commits

    • ccde3059 - Add possibility of str as fields argument in load, include is_pulse_at in misc __init__.py
    • d4a23064 - Updated doc on bunch pattern, started doc on point detectors

    Compare with previous version

  • added 1 commit

    • f118869c - Small fixes in get_bam and get_xgm

    Compare with previous version

  • added 3 commits

    • e90a0253 - removed get_all_detectors(), added its content in load() with 4...
    • 61b6fc27 - Add example in docstring of load()
    • 2637942c - Documentation on load using ipynb

    Compare with previous version

  • Laurent Mercadier unmarked as a Work In Progress

    unmarked as a Work In Progress

  • assigned to @lleguy

  • Laurent Mercadier marked as a Work In Progress

    marked as a Work In Progress

  • Laurent Mercadier changed the description

    changed the description

  • added 1 commit

    • ec1d87ca - Add bunch pattern arguments for tim and laser in load, update notebook examples

    Compare with previous version

  • I started a documentation on the load function with a Jupyter notebook (thanks @carinanc), please have a look by building the doc. I will continue with improving the documentation but this can also be continued after the merge.

  • Laurent Mercadier unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Loïc Le Guyader
  • mentioned in issue #23 (closed)

  • added 1 commit

    • 66f31f1a - Fix notebook link extension from source link

    Compare with previous version

  • Loïc Le Guyader
    • If possible it would be good to clean up the text of the merge request. I think few points have changed since the initial write up.

      Then I will merge.

      Do I understand right that we might want to move in the future the notebook examples to the documentation directly ? I like the result.

    • I cleaned up the description of the merge request.

      I think that we could still keep the notebook examples, maybe having them focused on data analysis with less descriptive text than in a documentation notebook. We can decide as we progress with documentation.

    • Please register or sign in to reply
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading