'''[wiki:GraspSwControllerCmd celldes]''' [[TracNav(GraspContents)]] ||Command:||'''celldes'''|| ||Contexts:||Network socket, serial console. Applies only if the CCD is an "OTA" device.|| ||Function:||Designates the intended function for each of the 64 cells.|| ||Required Parameters:||'''cells'''=(64 S/V/D characters) (*)|| ||Optional Parameters:||'''dev'''='''all'''|'''0'''|'''1'''|| If '''cells=''' parameter is omitted, the celldes command can be used to display the current state of cell designations. The string of cell designators must be a sequence of '''exactly 64 characters''': ||'''S'''||Designates Science cells (to which OT and full readout commands apply)|| ||'''V'''||Designates Video readout during exposure(*)|| ||'''D'''||Designates a Dead cell which should be electrically floated|| Order of the cells is row-major listing of the Cartesian coordinate system of cell positions. === Two Meanings of Video === Note that '''video''' can be used in two ways. At the OTA hardware level, it can refer to the state of the cell being in a mode where real pixel values can be read from its video output. At a higher level, it is also used to refer to continuous "video" readout mode, differentiated from the science mode. The '''S''' and '''V''' in the cell designation mask refer to the latter. === When Cell Designations Take Effect === When the '''celldes''' command is issued, whether the cell pattern changes or not, all '''D'''ead cells are '''floated''' (disconnected) and all others are placed in '''standby''' (parallel phases connected to PSH/PSL voltages and outputs deselected.) This is the only command which affects all types of cells. Other commands assume the device is in the state returned by celldes and make incremental changes and restore standby before returning. Therefore, re-issuing celldes can be an effective way to restore sanity if OTA operations have been interrupted and cell selection state is unknown. Before each '''[wiki:GraspSwControllerCmdClean clean]''' iteration all of the '''S'''cience cells are made '''active''' (selected but without video outputs connected), one cleaning cycle occurs, and then the same set of cells is set to '''standby'''. This currently occurs 5 times if 5 cleaning iterations are requested. Note that '''clean''' does not presently affect any '''V'''ideo cells. During a '''[wiki:GraspSwControllerCmdReadcal readcal]''' operation, if the '''cellrow=''' parameter is set to anything other than '''none''' then all '''S'''cience cells are set to standby except for those in the row specified by cellrow. The selected row of cells are placed in '''video''' output mode so that readcal calibrates the actual device output, which can have very different voltage levels from a "floated" output. The selected cellrow is placed in '''standby''' after readcal completes (or also if it fails to find calibration.) During '''[wiki:GraspSwControllerCmdOt ot]''' commands (whether received via TCP or UDP), all '''S'''cience cells are made '''active''' before the ot shift and returned to '''standby''' immediately after. The number of cells actually affected by '''ot''' can be reduced by adding an ot_mask, but all cells affected must be in '''S'''cience mode. The interaction between cell designations and '''[wiki:GraspSwControllerCmdReadout readout]''' is the most complex. Readouts can be intended for "science" or "video". These names are somewhat arbitrary since useful science could be performed on "video" frames, etc. but for now the distinction remains, and "video" mode is used while the main camera shutter is open to do rapid readouts on guide stars, and "science" readout is performed at the end after the shutter closes of the other cells in the OTA. See '''[wiki:GraspSwControllerCmdReadout readout]''' documentation for more details on command line options. Briefly, if "readout vid_expose=" is used even with a 0 exposure time for an argument, or any subsequent readout repeated with the "readout next" shortcut is used then the readout is a '''video''' readout. In this mode, cells designated '''V'''ideo are placed in '''video''' output mode before each readout and the same set of '''V''' cells set back to '''standby''' immediately after each readout. One or more '''V'''ideo cells must be in the cell mask, and if multiple video cells are selected, they must currently be in the same cellrow. (The OTA devices have a restriction which requires there to be no more than 1 video cell per column, but currently the software option is more restrictive. This will be lifted by a future upgrade to the stage2 embedded software.) During any other readouts (where vid_expose and the other video parameters are not given), for each requested cellrow (usually, all 8 cellrows in sequence), the '''S'''cience cells in that row will get '''video''' outputs selected before the readout and those same cells will be set to '''standby''' immediately after. If the '''setup=''' argument to '''[wiki:GraspSwControllerCmdSettrig settrig]''' or '''[wiki:GraspSwControllerCmdReadout readout]''' is true, an additional cellrow selection to set all '''S'''cience cells to '''standby''' is made. This should in theory be redundant since all commands attempt to return the cells which they affected back to standby. Also note that nothing tries to address the '''D'''ead cells again, after '''celldes''' floats them. === Usage for the Cells === ||xy07||xy17||xy27||xy37||xy47||xy57||xy67||xy77|| ||xy06||xy16||xy26||xy36||xy46||xy56||xy66||xy76|| ||xy05||xy15||xy25||xy35||xy45||xy55||xy65||xy75|| ||xy04||xy14||xy24||xy34||xy44||xy54||xy64||xy74|| ||xy03||xy13||xy23||xy33||xy43||xy53||xy63||xy73|| ||xy02||xy12||xy22||xy32||xy42||xy52||xy62||xy72|| ||xy01||xy11||xy21||xy31||xy41||xy51||xy61||xy71|| ||xy00||xy10||xy20||xy30||xy40||xy50||xy60||xy70|| Is sent in the string in the following order: cells='''xy00 xy10 xy20 . . . xy67 xy77''' An actual command selecting all cells on "dev 1" but using xy11 for video would look like: {{{ celldes dev=1 cells="SSSSSSSSSVSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS" }}} (*) CCD readouts, video or science, are "destructive" so a even though a "V" cell still gets included in the final readout, there is no valid image data. === Notes: === If dev= is omitted, the last default dev applies (which can be either 0 or 1, but not "all"). The FITS header for each exposure contains a nice self-documenting map illustrating which cells where video or floated, in addition to the 64-character keyword value '''CELLDES'''. Various image displays may need to be rotated or flipped to match sky! STA OTA devices have cellrow 0 on top instead of on the bottom (when column 0 is shown on the left.)