Home

Documentation

Project Support

readcal

Command:readcal
Contexts:Network socket, serial console, stage2 only
Function:Calibrate signal chain to bring in range of the ADCs.
Required Parameters:None.
Optional Parameters:If adulevel omitted, readcal just measures pedestal.
adulevel=A number of counts, like 5000
channel=[r] Select between red green and blue ADC channel
cellrow=(Use otacal command instead of readcal for OTAs)
dev=[current] Select dev 0 or 1 (>= r5696 stage2 ONLY)

What Does "readcal" Do?

Each pixel value generated by the STARGRASP controller is the result of multiple individual digital samples of the channel's internal Analog to Digital Converter (ADC) 0 to 4V range, shown above. The process used is known as Digital Correlated Double Sampling (DCDS). Although multi-sampling readout parameters are configurable at runtime with the cestlavie program and the clvset command, most STARGRASP CCD readouts sample the reference pedestal level (ped) for each pixel four times, and the video signal level (sig) four times. All eight of these samples must be within the 0-4V limits of the 16-bit ADC (0..65535). The difference between the average (arithmetic mean) of the four reference pedestal values is subtracted from the average of the video to produce the pixel value.

All four of the reference pedestal samples must always be above the floor that the A/D can measure, and an internal offset voltage (per channel) must be used to "steer" the value to something above zero, but not too high. (The side effect of being too high would be reduced dynamic range.)

In order to converge more quickly, the starting point for the readcal algorithm is the last known calibration value. If it fails to converge, that offset voltage (and next starting point) is set to 0 uV. For this reason, sometimes readcal must be run twice to succeed, especially if incorrect values (from a different boardset or preamp, for example) were used as the starting point.

If readcal is taking a long time to complete, or of it is failing to converge, it is often because a new starting point should be recorded. The other common cause of failure can be super-saturation of the CCD. The CCD should always be dark (shutter closed, no major light leaks) and be cleaned multiple times before attempting readcal.

Attachments