Skip to content

Draft: analysis development branch (do not merge)

Egor Sobolev requested to merge autocorrelation into master

This implements computation of an auto correlation function. This analysis is requested by Kartik to compute beam properties from short pulses of fluorescence scattering on the cooper disk.

The design:

  • correction addon computes per frame auto-correlation functions and stores them in shared memory buffer (the same size as image data)
  • the arbiter identifies frames with scattering from cooper disk but nor from stiffening ribs and generates the selection
  • the group matchers computes the sum of images and auto-correlation functions according the selection from arbiter
  • the group matchers sends downstream sums but do not send per frame auto-correlation functions

Interventions to the pipeline:

  1. ShmemTrainMatcher computes reduction operation on per-frame data according to instruction in the reduce.classes and reduce.op keys from the arbiter source:
  • reduce.classes - is an boolean array[nclasses, nframes], where each row is a selection mask
  • reduce.op - is a list of strings, each element has format: <reduction operation>:<data key>:<index in classes array>:<result key>. Result key is appended with aggtregate. prefix
  1. ShmemTrainMatcher deletes the keys from output hash which is listen in the deleteThese key (vector of strings) from the same sources (correction devices source, each correction device contains its own deleteThese key)

  2. AgipdCorrection accumulates the calngShmemPaths and deteleThese list from addons. It appends the image.data paths to the calngShmemPaths list instead to redefine it.

  3. The method _initialization(self) is added to the BaseCorrectionAddon. It's called by the host BaseCorrection after it sets the _device property of the addon class instance. This needed to have an access to the host device properties during the addon initialization.

  4. Refactor FrameSelectionArbiter to

  • run multiple kernels and get partial selection
  • calculate frame selection with expression using partial selections
  • configure reduction operations and build reduction masks

@hammerd

Edited by Egor Sobolev

Merge request reports