Changeset 9712 for trunk/doc/modules/CameraImages.tex
- Timestamp:
- Oct 20, 2006, 6:26:36 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/doc/modules/CameraImages.tex (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/modules/CameraImages.tex
r7783 r9712 52 52 The top level of our image container hierarchy is a complete focal 53 53 plane array (\code{pmFPA}). This structure represents the collection 54 of chips in the camera, all of which are read out in a given 55 exposure. 54 of chips in the camera, all of which are read out in a given exposure. 56 55 57 56 For example, take a mosaic camera consisting of eight $2k\times 4k$ … … 85 84 those metadata containers. 86 85 87 While the \code{psMetadata} pointers provide a mechanism to carry 88 generic information about the image, the hierarchy of data structures 89 also provides an explicit set of information defining the geometrical 90 relationships between the levels of the hierarchy. Two types of 91 information are provided. In the first case, basic offsets (and in 92 the case of the readouts, binning and flips) are defined to specify 93 the location of a given \code{pmCell} with respect to its containing 94 \code{pmChip} in the assumption that the pixels in the entire focal 95 plane array are laid out on a uniform grid. This is a crude 96 approximation, and cannot be assumed for careful astrometric analysis, 97 but it can be used as a starting point or to place the the pixels in a 98 test image. For higher precision, detailed astrometric 99 transformations between one frame and the next are also provided. 100 101 \tbd{In the future, it may be worthwhile to migrate all of these 102 additional pieces to the psMetadata since there is no pressing need to 103 have them visible in the data structures} 104 105 \subsection{Image Data Container Hierarchy} 86 \subsection{Focal Plane Hierarchy} 106 87 107 88 Here we specify the contents of the focal plane hierarchy: 108 \code{pmReadout}, \code{pmCell}, \code{pmChip} and \code{pmFPA}. Many 109 of the components of these are similar. All but the \code{pmFPA} 110 contain offsets from the level above (\code{col0,row0}), and a link to 111 the parent. All but the \code{pmReadout} contain a private pointer to 112 FITS data and more detailed astrometric transforms. Each contains an 113 \code{analysis} metadata container which is intended to store results 114 of analyses (e.g., the r.m.s. of the overscan fit). 115 116 \tbd{At what stage are the offsets ({\tt col0,row0}) set, and how are 117 they known?} 89 \code{pmReadout}, \code{pmCell}, \code{pmChip} and \code{pmFPA}. 118 90 119 91 \subsubsection{A Readout} 120 92 121 A readout is the result of a single read of a cell (or a portion 122 thereof). It contains the offset from the lower-left corner of the 123 chip, in the case that the CCD was windowed, as well as the binning 124 factors and parity (if the binning value is negative, then the parity 125 is reversed). It also contains the pixel data (with corresponding 126 mask and weight), metadata container for the analysis, and a link to 127 the parent. 93 A readout corresponds to an individual read of a cell (e.g., a single 94 image as part of a video sequence, or one of multiple coadds). It 95 contains the actual pixels used in analysis (along with mask and 96 weight maps). When reading from a FITS file, the images are subimages 97 (from CELL.TRIMSEC) of the pixels read from the appropriate HDU (at 98 the FPA, chip or cell level). The readout also contains a list of 99 bias sections (prescans or overscans, or otherwise), a summary of 100 analysis tasks that have been performed, status flags, and the offsets 101 used for reading a FITS file incrementally. 128 102 129 103 \begin{verbatim} 130 104 typedef struct { 131 // Information 132 psMetadata *analysis; // Readout-level analysis metadata 133 pmCell *parent; // Parent cell 134 // Data 135 psImage *image; // Imaging area of readout 136 psImage *mask; // Mask for image 137 psImage *weight; // Weight for image 138 psList *bias; // List of bias section (sub-)images 105 int col0; ///< Column offset; non-zero if reading in columns incrementally 106 int row0; ///< Row offset; non-zero if reading in rows incrementally 107 psImage *image; ///< Imaging area of readout (corresponds to CELL.TRIMSEC region) 108 psImage *mask; ///< Mask of input image (corresponds to CELL.TRIMSEC region) 109 psImage *weight; ///< Weight of input image (corresponds to CELL.TRIMSEC region) 110 psList *bias; ///< List of bias (prescan/overscan) images 111 psMetadata *analysis; ///< Readout-level analysis metadata 112 pmCell *parent; ///< Parent cell 113 bool process; ///< Do we bother about reading and working with this readout? 114 bool file_exists; ///< Does the file for this readout exist (read case only)? 115 bool data_exists; ///< Does the data for this readout exist (read case only)? 139 116 } pmReadout; 140 117 \end{verbatim} 141 118 142 The constructor for \code{pmReadout} shall be: 143 \begin{verbatim} 144 pmReadout *pmReadoutAlloc(void); 119 The constructor for \code{pmReadout} is: 120 \begin{verbatim} 121 pmReadout *pmReadoutAlloc(pmCell *cell ///< Parent cell, or NULL 122 ); 145 123 \end{verbatim} 146 124 The constructor shall make an empty \code{pmReadout}. The metadata 147 125 container and the \code{bias} list shall be allocated. All other 148 126 pointers in the structure shall be initialized to \code{NULL}. 127 Processing is on by default; the existence flags are initially set to 128 \code{false}. 129 130 All data within a \code{pmReadout} may be freed: 131 \begin{prototype} 132 void pmReadoutFreeData(pmReadout *readout ///< Readout for which to free data 133 ); 134 \end{prototype} 149 135 150 136 \subsubsection{A Cell} 151 137 152 A cell consists of one or more readouts (usually only one except in 153 the case that the cell has been used for fast guiding, or similar 154 situations). It has values which specifies the position of the cell 155 on the chip for rough positioning, along with more precise coordinate 156 transforms from the cell to the chip and, as a convenience, from the 157 cell directly to the focal plane. It is expected that these 158 transforms will consist of two first-order 2D polynomials, simply 159 specifying a translation, rotation and magnification; hence they are 160 easily inverted, and there is no need to add reverse transformations. 161 We also add an additional transformation, which is intended to provide 162 a ``quick and dirty'' transform from the cell coordinates to the sky; 163 this transformation not guaranteed to be as precise as the 164 ``standard'' transformation of Cell $\rightarrow$ Chip $\rightarrow$ 165 Focal Plane $\rightarrow$ Tangent Plane $\rightarrow$ Sky, but will be 166 faster. The cell also contains metadata containers for the concepts 167 and analysis, a link to the parent, and a container for the FITS data, 168 if that corresponds to this level. A boolean indicates whether the 169 cell is of interest, allowing it to be excluded from analysis. 138 A cell is the lowest-level camera structure, being part of a chip 139 (e.g., an amplifier). It may consist of one or more readouts, which 140 are individual reads of the cell. It also contains the concepts 141 metadata appropriate to this level, the cell configuration information 142 (for convenience) from the camera configuration, a summary of analysis 143 tasks that have been performed, status flags, and any HDU that 144 corresponds to this level for the file of interest 145 146 \begin{verbatim} 147 typedef struct { 148 psMetadata *concepts; ///< Cell-level concepts 149 unsigned int conceptsRead; ///< Which concepts have been read; see pmConceptsSource 150 psMetadata *config; ///< Cell configuration information (from CELLS in the camera config) 151 psMetadata *analysis; ///< Cell-level analysis metadata 152 psArray *readouts; ///< The component readouts 153 pmChip *parent; ///< Parent chip 154 bool process; ///< Do we bother about reading and working with this cell? 155 bool file_exists; ///< Does the file for this cell exist (read case only)? 156 bool data_exists; ///< Does the data for this cell exist (read case only)? 157 pmHDU *hdu; ///< FITS header data unit of interest 158 } pmCell; 159 \end{verbatim} 160 161 The constructor for \code{pmCell} shall be: 162 \begin{verbatim} 163 pmCell *pmCellAlloc(pmChip *chip, ///< Parent chip, or NULL 164 const char *name ///< Name of cell, for CELL.NAME 165 ); 166 \end{verbatim} 167 The constructor shall make an empty \code{pmCell}. The 168 \code{readouts} array shall be allocated with a zero size, and the 169 metadata containers constructed. Processing is on by default; the 170 existence flags are initially set to \code{false}. The \code{name} is 171 used to set \code{CELL.NAME} in the \code{concepts}. All other 172 pointers in the structure are initialized to \code{NULL}. 173 174 All readouts, or all data (readouts and metadata) within a cell may be 175 freed: 176 \begin{prototype} 177 void pmCellFreeReadouts(pmCell *cell ///< Cell for which to free readouts 178 ); 179 void pmCellFreeData(pmCell *cell ///< Cell for which to free data 180 ); 181 \end{prototype} 182 183 \subsubsection{A Chip} 184 185 The chip is the mid-level camera structure, being part of an FPA, and 186 consisting of one or more cells (e.g., a CCD). It also contains the 187 concepts metadata appropriate to this level, a summary of analysis 188 tasks that have been performed, status flags, any HDU that corresponds 189 to this level for the file of interest, and astrometric 190 transformations. The astrometric transformations provide transforms 191 between the chip and FPA coordinates and back. 192 193 \tbd{The astrometric transformations will likely disappear into the 194 analysis metadata in the future.} 170 195 171 196 \begin{verbatim} 172 197 typedef struct { 173 198 // Astrometric transformations 174 psPlaneTransform* toChip; // Transformations from cell to chip coordinates 175 psPlaneTransform* toFPA; // Transformations from cell to FPA coordinates 176 psPlaneTransform* toSky; // Transformations from cell to sky coordinates 199 psPlaneTransform *toFPA; ///< Transformation from chip to FPA coordinates, or NULL 200 psPlaneTransform *fromFPA; ///< Transformation from FPA to chip coordinates, or NULL 177 201 // Information 178 psMetadata *concepts; // Cache for PS concepts 179 psMetadata *camera; // Camera information 180 psMetadata *analysis; // Cell-level analysis metadata 181 bool process; // Do we want to process? 182 bool exists; // Does the data exist? 183 // Levels 184 psArray *readouts; // The readouts (referred to by number) 185 pmChip *parent; // Parent chip 186 // Sources 187 pmFile *imageSource; // Image file on disk 188 pmFile *maskSource; // Mask file on disk 189 pmFile *weightSource; // Weight file on disk 190 } pmCell; 191 \end{verbatim} 192 193 The constructor for \code{pmCell} shall be: 194 \begin{verbatim} 195 pmCell *pmCellAlloc(psMetadata *cameraData, psString name); 196 \end{verbatim} 197 The constructor shall make an empty \code{pmCell}. The 198 \code{readouts} array shall be allocated with a zero size, and the 199 metadata containers constructed. The cell's \code{camera} pointer 200 shall be set to the provided \code{cameraData}, the \code{exists} 201 boolean shall be set to \code{false}, the \code{process} boolean shall 202 be set to \code{true}, and the \code{name} shall be used to set 203 \code{CELL.NAME} in the \code{concepts}. All other pointers in the 202 psMetadata *concepts; ///< Chip-level concepts 203 unsigned int conceptsRead; ///< Which concepts have been read; see pmConceptsSource 204 psMetadata *analysis; ///< Chip-level analysis metadata 205 psArray *cells; ///< The component cells 206 pmFPA *parent; ///< Parent FPA 207 bool process; ///< Do we bother about reading and working with this chip? 208 bool file_exists; ///< Does the file for this chip exist (read case only)? 209 bool data_exists; ///< Does the data for this chip exist (read case only)? 210 pmHDU *hdu; ///< FITS header data unit of interest, 211 } pmChip; 212 \end{verbatim} 213 214 The constructor for \code{pmChip} shall be: 215 \begin{verbatim} 216 pmChip *pmChipAlloc(pmFPA *fpa, ///< Parent FPA, or NULL 217 const char *name ///< Name of cell, for CELL.NAME 218 ); 219 \end{verbatim} 220 The constructor shall make an empty \code{pmChip}. The \code{cells} 221 array shall be allocated with a zero size and the metadata containers 222 constructed. Processing is on by default; the existence flags are 223 initially set to \code{false}. The \code{name} shall be used to set 224 \code{CHIP.NAME} in the \code{concepts}. All other pointers in the 204 225 structure shall be initialized to \code{NULL}. 226 227 All cells, or all data (cells and metadata) within a chip may be 228 freed: 229 \begin{prototype} 230 void pmChipFreeCells(pmChip *chip ///< Chip for which to free cells 231 ); 232 void pmChipFreeData(pmChip *chip ///< Chip for which to free data 233 ); 234 \end{prototype} 235 236 \subsubsection{A Focal Plane} 237 238 The FPA is the top-level camera structure, and consists of one or more 239 chips. It also contains the concepts metadata appropriate to this 240 level, a summary of analysis tasks that have been performed, the 241 camera configuration information, any HDU that corresponds to this 242 level for the file of interest, and astrometric transformations. The 243 astrometric transformations encode how to transform from the tangent 244 plane to the sky, and back. 245 246 It is expected that the astrometric transformation will consist of two 247 4D polynomials (i.e.\ a function of two coordinates in position, the 248 magnitude of the object, and the color of the object) in order to 249 correct for optical distortions and the effects of the atmosphere; 250 hence we think that it is prudent to include a reverse transformation 251 which will be derived from numerically inverting the forward 252 transformation. 205 253 206 254 \tbd{The astrometric transformations will likely disappear into the 207 255 analysis metadata in the future.} 208 256 209 \subsubsection{A Chip}210 211 A chip consists of one or more cells (according to the number of212 amplifiers on the device). The chip contains metadata containers for213 the concepts and analysis, a link to the parent, and pointers to the214 pointers to the various FITS data, if that corresponds to this level.215 For astrometry, in addition to the rough positioning information, it216 contains a coordinate transform from the chip to the focal plane. It217 is expected that this transform will consist of two second-order 2D218 polynomials; hence we think that it is prudent to include a reverse219 transformation which will be derived from numerically inverting the220 forward transformation. A boolean indicates whether the chip is of221 interest, allowing it to be excluded from analysis.222 223 257 \begin{verbatim} 224 258 typedef struct { 225 259 // Astrometric transformations 226 psPlaneTransform* toFPA; // Transformation from chip to FPA coordinates 227 psPlaneTransform* fromFPA; // Transformation from FPA to chip coordinates 260 psPlaneDistort *fromTangentPlane; ///< Transformation from tangent plane to focal plane, or NULL 261 psPlaneDistort *toTangentPlane; ///< Transformation from focal plane to tangent plane, or NULL 262 psProjection *projection; ///< Projection from tangent plane to sky, or NULL 228 263 // Information 229 psMetadata *concepts; // Cache for PS concepts 230 psMetadata *analysis; // Chip-level analysis metadata 231 bool process; // Do we want to process? 232 bool exists; // Does the data exist? 233 // Levels 234 psArray *cells; // The cells (referred to by name) 235 pmFPA *parent; // Parent FPA 236 // Sources 237 pmFile *imageSource; // Image file on disk 238 pmFile *maskSource; // Mask file on disk 239 pmFile *weightSource; // Weight file on disk 240 } pmChip; 241 \end{verbatim} 242 243 The constructor for \code{pmChip} shall be: 244 \begin{verbatim} 245 pmChip *pmChipAlloc(psString name); 246 \end{verbatim} 247 The constructor shall make an empty \code{pmChip}. The \code{cells} 248 array shall be allocated with a zero size, the metadata containers 249 constructed, the \code{exists} boolean shall be set to \code{false}, 250 the \code{process} boolean shall be set to \code{true}, andhe 251 \code{name} shall be used to set \code{CHIP.NAME} in the 252 \code{concepts}. All other pointers in the structure shall be 253 initialized to \code{NULL}. 254 255 \tbd{The astrometric transformations will likely disappear into the 256 analysis metadata in the future.} 257 258 \subsubsection{A Focal Plane} 259 260 A focal plane consists of one or more chips (according to the number 261 of pieces of contiguous silicon). It contains metadata containers for 262 the concepts and analysis, a link to the parent, and pointers to the 263 FITS header, if that corresponds to this level (the FPA may be the 264 PHU, but will not ever contain pixels). For astrometry, it contains a 265 transformation from the focal plane to the tangent plane and the fixed 266 pattern residuals. It is expected that the transformation will 267 consist of two 4D polynomials (i.e.\ a function of two coordinates in 268 position, the magnitude of the object, and the color of the object) in 269 order to correct for optical distortions and the effects of the 270 atmosphere; hence we think that it is prudent to include a reverse 271 transformation which will be derived from numerically inverting the 272 forward transformation. 273 274 \begin{verbatim} 275 typedef struct { 276 // Astrometric transformations 277 psPlaneDistort* fromTangentPlane; // Transformation from tangent plane to focal plane 278 psPlaneDistort* toTangentPlane; // Transformation from focal plane to tangent plane 279 psProjection *projection; // Projection from tangent plane to sky 280 // Information 281 psMetadata *concepts; // Cache for PS concepts 282 psMetadata *analysis; // FPA-level analysis metadata 283 const psMetadata *camera; // Camera configuration 284 // Levels 285 psArray *chips; // The chips 286 // Sources 287 pmFile *imageSource; // Image file on disk 288 pmFile *maskSource; // Mask file on disk 289 pmFile *weightSource; // Weight file on disk 264 psMetadata *concepts; ///< FPA-level concepts 265 unsigned int conceptsRead; ///< Which concepts have been read; see pmConceptsSource 266 psMetadata *analysis; ///< FPA-level analysis metadata 267 const psMetadata *camera; ///< Camera configuration 268 psArray *chips; ///< The component chips 269 pmHDU *hdu; ///< FITS header data unit of interest, or NULL 290 270 } pmFPA; 291 271 \end{verbatim} … … 293 273 The constructor for \code{pmFPA} shall be: 294 274 \begin{verbatim} 295 pmFPA *pmFPAAlloc(const psMetadata *camera); 275 pmFPA *pmFPAAlloc(const psMetadata *camera ///< Camera configuration (to store in FPA) 276 ); 296 277 \end{verbatim} 297 278 The constructor shall make an empty \code{pmFPA}. The \code{chips} 298 279 array shall be allocated with a zero size, the \code{camera} pointer 299 280 set to the value provided, and the \code{concepts} metadata 300 constructed. All other pointers in the structure shall be initialized281 constructed. All other pointers in the structure shall be initialized 301 282 to \code{NULL}. 302 283 303 \tbd{The astrometric transformations will likely disappear into the 304 analysis metadata in the future.} 305 306 \subsubsection{Disk files} 307 308 Each of the levels in the hierarchy have a place to hold a 309 \code{pmFile}, which is the representation of a FITS file and ``header 310 data unit'': 311 \begin{datatype} 312 typedef struct { 313 const char *filename; // Name of file 314 psFits *fits; // FITS file 315 psMetadata *phu; // Primary extension 316 const char *extname; // Extension name, or NULL 317 psMetadata *header; // The FITS header, or NULL if primary 318 psArray *images; // The pixel data 319 psDB *database; // Database handle for concepts 320 } pmFile; 321 \end{datatype} 322 284 All data (chips and metadata) within an FPA may be freed: 285 \begin{prototype} 286 void pmFPAFreeData(pmFPA *fpa ///< FPA for which to free data 287 ); 288 \end{prototype} 323 289 324 290 \subsubsection{Links between levels} 325 326 We provide functions to attach readouts, cells and chips with their327 parents:328 \begin{prototype}329 bool pmReadoutParent(pmReadout *readout, pmCell *cell);330 bool pmCellParent(pmCell *cell, pmChip *chip);331 bool pmChipParent(pmChip *chip, pmFPA *fpa);332 \end{prototype}333 In the case of \code{pmReadoutParent}, the function shall set the334 \code{parent} pointer for the \code{readout} to \code{cell}, and add335 the \code{readout} to the array of \code{readouts} in the \code{cell}.336 The other cases are similar. \textit{Note that, in order to avoid337 infinite loops when freeing, the reference counter should \textbf{not}338 be incremented when attaching to the \code{parent} pointer, and the339 deallocators should \textbf{not} free the parent.}340 341 The following functions remove all levels below that specified:342 \begin{prototype}343 void pmCellFreeReadouts(pmCell *cell);344 void pmChipFreeCells(pmChip *chip);345 void pmFPAFreeChips(pmFPA *fpa);346 \end{prototype}347 291 348 292 The inclusion of hierarchical links pointing both down (via the … … 351 295 collection of upward-pointing links: 352 296 \begin{prototype} 353 bool pmFPACheck Links(pmFPA *fpa);297 bool pmFPACheckParents(pmFPA *fpa); 354 298 \end{prototype} 355 299 This function checks the validity of the \code{parent} links in the … … 358 302 shall return \code{false}. If all the \code{parent} pointers were 359 303 correct, the function shall return \code{true}. 304 305 306 \subsection{Header Data Units} 307 308 Each of the levels in the hierarchy have a place to hold a 309 \code{pmHDU}, which is the representation of a FITS ``header data 310 unit'': 311 \begin{datatype} 312 typedef struct { 313 psString extname; ///< The extension name 314 bool blankPHU; ///< Is this a blank FITS Primary Header Unit, i.e., no data? 315 psMetadata *format; ///< The camera format 316 psMetadata *header; ///< The FITS header, or NULL if primary for FITS; or section info 317 psArray *images; ///< The pixel data 318 psArray *weights; ///< The pixel data 319 psArray *masks; ///< The pixel data 320 } pmHDU; 321 \end{datatype} 322 323 The \code{pmHDU} simplifies the input/output from/to FITS files, since 324 it is, for the most part, a representation of the HDU on disk. Of 325 course, it is not an exact replica of a FITS HDU --- they have no mask 326 and weight data, but these are stored here for convenience --- it 327 keeps all the relevant data about the image in one place. 328 329 The allocator is: 330 \begin{prototype} 331 pmHDU *pmHDUAlloc(const char *extname ///< Extension name, or NULL for PHU 332 ); 333 \end{prototype} 334 335 336 \subsubsection{HDU I/O} 337 338 The following function moves to the appropriate extension and reads 339 the FITS header into the \code{pmHDU.header} member: 340 \begin{prototype} 341 bool pmHDUReadHeader(pmHDU *hdu, ///< HDU for which to read header 342 psFits *fits ///< FITS file from which to read 343 ); 344 \end{prototype} 345 346 The following function moves to the appropriate extension and reads 347 the FITS header and pixels into the \code{pmHDU}: 348 \begin{prototype} 349 bool pmHDURead(pmHDU *hdu, ///< HDU to read 350 psFits *fits ///< FITS file to read from 351 ); 352 \end{prototype} 353 354 The following function writes the HDU header and pixels to the end of 355 the FITS file: 356 \begin{prototype} 357 bool pmHDUWrite(pmHDU *hdu, ///< HDU to write 358 psFits *fits ///< FITS file to write to 359 ); 360 \end{prototype} 361 362 363 \subsubsection{HDU Utilities} 364 365 The following functions return the appropriate HDU, given a member of 366 the focal plane hierarchy. If no HDU is present at the particular 367 level, it searches the next highest level. If no HDU can be found, 368 the function returns \code{NULL}. 369 370 \begin{prototype} 371 pmHDU *pmHDUFromFPA(const pmFPA *fpa ///< FPA for which to find HDU 372 ); 373 pmHDU *pmHDUFromChip(const pmChip *chip ///< Chip for which to find HDU 374 ); 375 pmHDU *pmHDUFromCell(const pmCell *cell ///< Cell for which to find HDU 376 ); 377 pmHDU *pmHDUFromReadout(const pmReadout *readout ///< Readout for which to find HDU 378 ); 379 \end{prototype} 380 381 The following functions take multiple components of a focal plane 382 hierarchy, and return the HDU at the lowest/highest level of the 383 components passed to the function. If components at all levels are 384 supplied, the lowest HDU in the hierarchy is the one with the actual 385 pixels, while the highest HDU is the PHU. 386 \begin{prototype} 387 pmHDU *pmHDUGetLowest(const pmFPA *fpa, ///< The FPA 388 const pmChip *chip, ///< The chip, or NULL 389 const pmCell *cell ///< The cell, or NULL 390 ); 391 pmHDU *pmHDUGetHighest(const pmFPA *fpa, ///< The FPA 392 const pmChip *chip, ///< The chip, or NULL 393 const pmCell *cell ///< The cell, or NULL 394 ); 395 \end{prototype} 396 397 The following function prints details about an HDU: the extension 398 name, headers (if requested), and image sizes. This function is 399 intended for testing or development use. 400 401 \begin{prototype} 402 void pmHDUPrint(FILE *fd, ///< File descriptor to which to print 403 const pmHDU *hdu, ///< HDU to print 404 int level, ///< Level at which to print 405 bool header ///< Print header? 406 ); 407 \end{prototype} 408 409 410 \subsection{FPA View} 411 412 The following structure allows the identification of a single 413 component of the focal plane hierarchy (or multiple, if we consider 414 selecting all those components below the selected component). 415 Components are identified on the basis of their chip, cell, readout 416 index. An index of -1 means all components at that level. 417 Additionally, since readouts may be read piecemeal, there are 418 additional indices for these. 419 \begin{datatype} 420 typedef struct { 421 int chip; // Number of the chip, or -1 for all 422 int cell; // Number of the cell, or -1 for all 423 int readout; // Number of the readout, or -1 for all 424 int nRows; // Maximum number of rows per readout segment read, or 0 for all 425 int iRows; // Starting point for this read 426 } pmFPAview; 427 \end{datatype} 428 429 The allocator is: 430 \begin{prototype} 431 pmFPAview *pmFPAviewAlloc(int nRows ///< Maximum number of rows per readout segment read, or 0 for all 432 ); 433 \end{prototype} 434 435 \subsubsection{Utilities} 436 437 A view may have all components reset (select the entire FPA): 438 \begin{prototype} 439 bool pmFPAviewReset(pmFPAview *view ///< View to reset 440 ); 441 \end{prototype} 442 443 The view level is the highest index that isn't set to -1. 444 \begin{prototype} 445 pmFPALevel pmFPAviewLevel(const pmFPAview *view ///< View to examine 446 ); 447 \end{prototype} 448 449 \subsubsection{Lookups} 450 451 The following functions return the appropriate currently selected 452 hierarchy component. The functions return \code{NULL} if the selection 453 is not specific or invalid for the appropriate level. 454 455 \begin{prototype} 456 pmChip *pmFPAviewThisChip(const pmFPAview *view, ///< Current view 457 const pmFPA *fpa ///< FPA containing chip 458 ); 459 pmCell *pmFPAviewThisCell(const pmFPAview *view, ///< Current view 460 const pmFPA *fpa ///< FPA containing cell 461 ); 462 pmReadout *pmFPAviewThisReadout(const pmFPAview *view, ///< Current view 463 const pmFPA *fpa ///< FPA containing readout 464 ); 465 \end{prototype} 466 467 \subsubsection{Incrementors} 468 469 The following functions return the next hierarchy component, according 470 to the current selection in the \code{view}. The functions return 471 \code{NULL} if there is no next. 472 473 \begin{prototype} 474 pmChip *pmFPAviewNextChip(pmFPAview *view, ///< Current view 475 const pmFPA *fpa, ///< FPA containing chips 476 int nStep ///< Number of chips to increment 477 ); 478 pmCell *pmFPAviewNextCell(pmFPAview *view, ///< Current view 479 const pmFPA *fpa, ///< FPA containing cells 480 int nStep ///< Number of cells to increment 481 ); 482 pmReadout *pmFPAviewNextReadout(pmFPAview *view, ///< Current view 483 const pmFPA *fpa, ///< FPA containing readouts 484 int nStep ///< Number of readouts to increment 485 ); 486 \end{prototype} 487 488 \subsubsection{HDUs} 489 490 The following function returns the HDU corresponding to the current view, 491 using the \code{pmHDUFrom...} functions, combined with the \code{view}. 492 \begin{prototype} 493 pmHDU *pmFPAviewThisHDU(const pmFPAview *view, ///< Current view 494 const pmFPA *fpa ///< FPA for view 495 ); 496 \end{prototype} 497 498 This function returns the blank Primary HDU corresponding to the 499 current view, if one exists. The operation is similar to 500 pmFPAviewThisHDU, except it returns \code{NULL} if no HDU is found, or 501 the HDU is not a blank Primary HDU. 502 \begin{prototype} 503 pmHDU *pmFPAviewThisPHU(const pmFPAview *view, ///< Current view 504 const pmFPA *fpa ///< FPA for view 505 ); 506 \end{prototype} 507 508 509 510 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 511 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 513 514 515 516 360 517 361 518
Note:
See TracChangeset
for help on using the changeset viewer.
