Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • in the constructor and beginJob(...) method:
    • enters input parameters,
    • (re)set the initial mask of noisy pixels from file hot_pix_mask_file (if its name is specified in the configuration file),
    • do necessary initialization of work arrays.
  • in the event(...) method:
    • uses the "median algorithm" to evaluate the signal and noise for each pixel,
    • Wiki Markup
      fills \[4\]\[8\]\[185\]\[388\] per-pixel arrays:
      • m_stat - number of events with |S/N| > SoNThr,
      • m_signal - signal amplitude, or 0(zero) for masked pixels,
      • m_proc_status - sets 255 for S/N > SoNThr or 0(zero) for masked pixels.
    • use arrays m_proc_status and m_signal to find peaks:
      • Wiki Markup
        iterate over \[185\]\[388\] 2x1 pixels and find the connected regions (using recursive flood-filling algorithm)
      • create vector of peaks v_peaks of struct Peak, using peak_npix_min, peak_npix_max, and peak_amp_tot_thr parameters,
    • loop over v_peaks, count total amplitude and the number of peaks in the event.
    • decide if the event selected or not based on event_npeak_min, event_amp_tot_thr, and selection_mode parameters.

...

    • periodically dynamically re-generate the mask, based on m_stat array and frac_noisy_imgs parameter. When to start and for how many events to update the mask is defined by the nevents_mask_update and nevents_mask_accum parameters, respectively.

...

    • save m_signal in file for selected events, depending on out_file_bits parameter.
  • put the vector with peaks v_peaks in the evt with key=key_peaks_out.
  • in the endJob(...) method, depending on bit status in out_file_bits :
    • save current hot-pixel mask in the file hot_pix_mask_out_file
    • save current fraction of events with noisy/signal pixels in the file frac_noisy_evts_file


h3. Needs to be done:
* save v_peaks ,
* put the signal array m_signal in the evt,
* save v_peaks and m_signal in file for selected events, depending on save_in_file parameter.

Module configuration parameters:

on out_file_bits parameter.
* put the signal array m_signal in the evt,

Module configuration parameters:

  • source (default: "DetInfo(:Cspad)") – input source of data
  • key (default: "") – key for input data, for example, it might be "calibrated"
  • key_peaks_out (default: "peaks") – key for vector of found peaks in the selected event
  • hot_pix_mask_inp_file (default: "cspad-pix-mask-in.dat") – in read the pixel mask from file
  • hot_pix_mask_out_file (default: "cspad-pix-mask-out.dat") – out write current pixel mask in the file
  • frac_noisy_evts_file
  • source (default: "DetInfo(:Cspad)") – input source of data
  • key (default: "") – key for input data, for example, it might be "calibrated"
  • fracfile (default: "cspad-pix-frac-out.dat") – out file with per-pixel fraction of noisy imagesmaskfile
  • evt_file_out (default: "./cspad-pix-mask.datev-") – out file with pixel masksignal CSPad array. Time stamp is added.
  • rmin (default: 3) – radial parameter of the area for median algorithm
  • dr (default: 1) – radial band width of the area for median algorithm
  • SoNThr (default: 3) – S/N threshold for each pixel to be considered as noisy
  • frac_noisy_imgs (default: 0.1) – fraction of noisy images above which pixel will be masked
  • peak_npix_min (default: 4) – minimal number of connected pixels for the good peak
  • peak_npix_max (default: 25) – maximal number of connected pixels for the good peak
  • peak_amp_tot_thr (default: 100.) – threshold on total signal amplitude of the group of connected pixels
  • event_npeak_min (default: 10) – threshold on number of good peaks for the event selection
  • event_amp_tot_thr(default: 1000.) – threshold on total signal amplitude of all good peaks for the event selection
  • nevents_mask_update (default: 100) – number of skipped events before each mask re-evaluation cycle
  • nevents_mask_accum (default: 50) – number of events for the mask re-evaluation
  • selection_mode (default: SELECTION_ON) – selection mode, other allowed values are: SELECTION_OFF, or SELECTION_INVvalues are: SELECTION_OFF, or SELECTION_INV
  • out_file_bits (default: 0) – control on writting of files:
    • =0 - do not write files,
    • +1 - save the hot_pix_mask_out_file file with current mask array in the endJob(...) method.
    • +2 - save the frac_noisy_evts_file file with current fraction of noisy events array in the endJob(...) method.
    • +4 - save the CSPad signal array for selected events in the file with name like <evt_file_out>-<time stamp>.
    save_in_file (default: false) – save or not the image array and peak vector in file
  • print_bits (default: 0) – module verbosity:
    • =0 - print nothing,
    • +1 - input pars,
    • +2 - emptyinput mask statistics,
    • +4 - processed statistics for mask evaluation,
    • +8 - output in files,
    • +16 - emptystart/stop to collect data for mask re-evaluation,
    • +32 - event time stamp,
    • +64 - vector of indexes and map of indexes for the median algorithm,
    • +128- vector of found peaks.

...