Skip to content
Snippets Groups Projects

[REMI] Add compatibility with old DAQ files

Merged Philipp Schmidt requested to merge fix/remi-old-files into master
1 unresolved thread

Description

When building the output files, the current REMI reconstruction code assumes daqLibrary=1.0 fields to be present. SQS recently tried to reconstruct runs from 2019, which were still lacking this fields and thus causing the notebook to throw an exception. This MR preserves the output format, but catches old files by supplying default values.

Also fixes a bug in edge trigger code (only used for old data) and fixes a potential exception in plotting code when there's no signal in the data, which a corresponding MR in EXtra-remi: https://git.xfel.eu/dataAnalysis/EXtra-remi/-/merge_requests/1

How Has This Been Tested?

run = 100
in_folder = '/gpfs/exfel/exp/SQS/201802/p002159/raw'
calib_config_path = '/gpfs/exfel/exp/SQS/201802/p002159/usr/remi_proc_config.yaml'

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Reviewers

@ahmedk @kluyvert

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
484 484 " col = (signal_idx % 2) if signal_idx < 6 else np.s_[:]\n",
485 485 " ax = fig.add_subplot(grid[row, col])\n",
486 486 " \n",
487 " pulse_idx = np.where(np.isfinite(edges[:, signal_idx, 0]))[0][0]\n",
488 " train_idx = np.where(pulse_idx >= pulse_offsets)[0][-1]\n",
489 " trigger = triggers[pulse_idx]\n",
487 " try:\n",
488 " pulse_idx = np.where(np.isfinite(edges[:, signal_idx, 0]))[0][0]\n",
489 " train_idx = np.where(pulse_idx >= pulse_offsets)[0][-1]\n",
490 " trigger = triggers[pulse_idx]\n",
491 " except (ValueError, IndexError):\n",
  • Other than that, LGTM. The CI failure looks unrelated - a timeout talking to CalCat.

  • added 1 commit

    • a7d0b67c - Make plots in REMI reconstruct robust against bad data

    Compare with previous version

  • added 1 commit

    • db81d25f - Use ndarray.nonzero() rather than np.where() in REMI reconstruct

    Compare with previous version

  • Cyril Danilevski
  • Bonus LGTM :wink:

  • Thanks for review everyone

  • Philipp Schmidt mentioned in commit 8e18be82

    mentioned in commit 8e18be82

  • Please register or sign in to reply
    Loading