You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Basic CSPad analysis code

An example of how to do a simple CSPad analysis on xtc data can be found in myana_cspad.cc in the example directory of myana.  To help users setting up analyses or optimizing the online display, we provide a class, CspadCorrector, that applies user-selected corrections to the data.  An example of its use can be found in myana_cspad.cc. The corrector class is in the same place for users who wish to use extract the algorithms for use outside the myana framework.

CSPad data corrections

The corrector class can read three files to correct or allow better use of the data: pedestals, gains, and exceptional pixel maps.  Theinformation is written by offline scripts in a simple ascii format reflecting the readout scheme, by quadrant, two-by-one, column, and row. 

Pedestals

The pedestal file can be made by the user by running cspadPedestalCalculator from the myana example directory and putting the file in the location (to be) specified by the DAQ group.  It is believed that the pedestals are stable at the few-hour timescale at least; in future this will be monitored by the online task if practical.  The pedestal varies by several photons from pixel to pixel so this is an important correction for low-occupancy running.  Note that pedestals for high-gain and low-gain running differ.

Gains

Currently under study.

Bad pixels

For each pixel the file will indicate the OR of states like dead, hot, noisy, low-gain.  Under development.

Common-mode noise

There is per-frame correction provided to take out coherent shifts in the pedestal of each two-by-one.  This can be several photons.  There are two algorithms available.  The default bins all pixels in the two-by-one and finds the first peak on the left over a threshold then corrects that value to zero.  Another looks at the truncated distribution of values in a small region and corrects that to zero if the rms of the values is small, indicating no hits, otherwise it keeps looking for a low-rms region.  Both methods fail in the limit where there is high occupancy; the default is more robust against this, and the user can of course adjust the threshold to be more sensitive to the pedestal peak.

  • No labels