Standard Definitions for Sequencer Code
User Interface, PAN Code and Sequencer Handling for Regions of Interest (ROI) readout
Reading out Regions of Interest (ROI) for CCD focal planes can be extremely complex. The inter-connection between number of outputs per detector, number and orientation of detectors and pixel binning can result in scenarios that are too complex for the simple sequencer processing available in MONSOON/Torrent systems.
Four user attributes are used to describe a region of interest. These attributes are all described by pixel positions or counts given assuming no binning is being done. The values loaded down to the sequencer are modified to take into account any requested binning values.
- roiRow - This attribute gives the starting row of the ROI in unbinned rows
- roiCol - This attribute gives the starting column of the ROI in unbinned pixels
- roiRSize - this is the size of the requested ROI in unbinned rows
- roiCsize - this is the size of the requested ROI in unbinned columns.
The following explains the restrictions on ROI definitions made to simplify ROI handling to prevent some of this complication.
- Only ONE ROI may defined for any single integration. - This results from a basic assumption made by the System that ROI readout is done for the purpose of reducing the time required to readout the focal plane, either to capture transient events or to reduce the signal level on bright objects.
- The data provided during ROI readout will be symmetric WRT the CCD output configuration. - This means that for a CCD with more than one output the amount of data may be more than requested and may include extra or ghost ROIs for other parts of the CCD.
- In a multi-detector focal plane, the ROI will be described by coordinates on a single CCD. - The data provided will include that ROI from all detectors in the Focal plane.
- In the case where a requested ROI extends past a CCD output boundary the ROI will be redefined to be symmetrical about the output boundary. - e.g. a single 2048 Column by 4096 Row detector is being read out from two outputs in the AB configuration (outputs in the lower left and lower right corners). A ROI definition of
- roiRow=300, roiCol=300, roiRsize=500, roiCsize=1000; will result in the ROI extending past the 1024 output boundary. The ROI will be redefined to:
- roiRow=300, roiCol=300, roiRsize=500, roiCsize=724; which will result in the user getting the requested data but also getting 448 columns from the B output that were not requested.
- The PAN saver software will send the DHS only the data provided by the DHE. In addition the standard position size description for the data will contain the finished position and size of the ROI. IT is the responsibility of the user interface software to inform the DHS of the requested position ans size of the ROI.
- I'm sure there should be more but I won't know till the code is done WATCH THIS SPACE.
uCode Standard Loop Register Usage Guidelines
There are sixteen 16-bit loop registers for available in the Sequencer to enable code flow control. The table below shows their current default usage. While these registers are general purpose loop registers using them for other than their reserved purpose will require the writing of a custom Detector library routine (detCalcPixels) to load the registers with correct values before taking an image.
The generic_CCD and basciCCD detector libraries use these assignments, but load the seqColBin register with one less than the requested number of pixels to be binned and sets the user Bit serBinEnbl to 1 if serial binning is active. The chileCCD detector library uses these assignments, and loads the seqColBin register with the requested number of pixels to be binned and does not use serBinEnbl user bit.
|Register number||FPGA Register name||CCD User Register name||CCD Sequencer Usage||IR User Register name||IR Sequencer Usage||Comments|
|0||SeqLoopReg||seqRowCount||#NROW||seqRowCount||#ROW_CNT||Number of rows to readout i.e. for CCDs the number of parallel or slow shifts|
|1||SeqLoopReg||seqColCount||#NCOL||seqColCount||#COL_CNT||Number of columns to readout i.e. for CCDs the number of serial or fast shifts|
|2||SeqLoopReg||seqRowBin||#NPBINS||seqFSamples||#FSAMPLES||Number of rows to bin during CCD readout or number of Fowler samples in IR Readout|
|3||SeqLoopReg||seqColBin||#NSBINS||seqDigAvg||#DIG_AVG||Number of columns to bin during CCD readout or number of Digital Average samples in IR Readout|
|4||SeqLoopReg||seqRoiRow||#ROIROW||seqCoAdds||#COADDS||Number of rows to skip during CCD ROI readout or number of Co-Adds in IR Readout|
|5||SeqLoopReg||seqRoiCol||#ROICOL||seqLoopDly||#LOOP_DLY||Number of columns to skip during CCD ROI readout or read loop delay factor in Fowler IR Readout|
|6||SeqLoopReg||seqRoiRskip||#RROWSKP||seqSweeps||#SWEEPS||Number of rows to skip after ROI readout is Complete or number of reset cycles before integration in IR mode|
|7||SeqLoopReg||seqRoiCskip||#RCOLSKP||seqSyncResets||#SYNC_RESETS||Number of columns to skip on each row after the ROI columns are read out or number of resets to do when syncing two DHE's|
|8||SeqLoopReg||seqFocusShft||#FOCUS_SHFT||seqRstTime||#RST_TIME||number of rows to shift image between focus exposures|
|9||SeqLoopReg||seqPreScan||#XPRE||Not Assigned||Not Assigned||number of prescan pixels to read (Usually not converted or transferred to the PAN|
|10||SeqLoopReg||seqShtrDly||#SHUTDLY||Not Assigned||Not Assigned||The time in ms to delay while the shutter opens or closes if these times are different use an unassigned register for the closing time.|
|11||SeqLoopReg||OvrScanRowCnt||#OSROWCNT||Not Assigned||Not Assigned||Number of binned rows to convert after reading ROI rows and skipping unread active rows|
|12||SeqLoopReg||OvrScanColCnt||#OSCOLCNT||Not Assigned||Not Assigned||Number of binned pixels to convert after reading ROI pixels skipping unread active pixels|
|13||SeqLoopReg||Not Assigned||Not Assigned||Not Assigned|
|14||SeqLoopReg||Not Assigned||Not Assigned||Not Assigned|
|15||SeqLoopReg||Not Assigned||Not Assigned||Not Assigned|
uCode Standard User Bit Usage Guidelines
The MONSOON/Torrent systems have in the sequencer Control register four user settable bits that can be used with The conditional jump instruction to steer the ucode execution. The following are the current default usage for these bits.
|User bit number||FPGA Attribute name||CCD User Attribute name||CCD Sequencer Usage||IR User Attribute name||IR Sequencer Usage||Comments|
|0||SeqUserBit0||seqContRun||#CONT_RUN||seqContRun||#CONT_RUN||Debug function - run process indefinitely after start exposure received|
|1||SeqUserBit1||serBinEnbl||#SBIN_ENB||Not Assigned||#IDLERST_ENBL||Enable serial binning in CCD readout or enable array resets during idle time for IR apps.|
|2||SeqUserBit2||rdRoiEnbl||#RDROI_ENB||digAvgEnb||#DIGAVG_ENBL||Tells the sequencer a ROI readout is in progress for CCDs or enable digital averaging in IR apps.|
|3||SeqUserBit3||Not Assigned||Not Assigned||Not Assigned||#ROWRST_ENBL||Enable Row Reset mode in IR apps.|