Changeset 6552 for branches/rel10_ifa/psModules/src/astrom/pmFPARead.c
- Timestamp:
- Mar 8, 2006, 5:08:08 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPARead.c
r6520 r6552 12 12 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 13 13 14 14 #if 0 15 15 // Read a FITS extension into a chip 16 16 static bool readExtension(p_pmHDU *hdu, // Pixel data into which to read … … 135 135 return true; 136 136 } 137 138 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 139 // Public functions 140 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 141 142 143 bool pmReadoutRead(pmReadout *readout, // Readout to read into 144 psFits *fits // FITS file from which to read 145 ) 146 { 147 // 148 149 } 137 #endif 138 150 139 151 140 // Carve a readout from the image pixels … … 162 151 163 152 // Get the list of overscans 164 psListIterator *iter = psListIteratorAlloc( biassecs, PS_LIST_HEAD, false); // Iterator153 psListIterator *iter = psListIteratorAlloc((psList*)biassecs, PS_LIST_HEAD, false); // Iterator 165 154 psRegion *biassec = NULL; // A BIASSEC region from the list 166 155 while ((biassec = psListGetAndIncrement(iter))) { … … 174 163 } 175 164 176 165 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 166 // Public functions 167 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 168 169 170 #if 0 171 bool pmReadoutRead(pmReadout *readout, // Readout to read into 172 psFits *fits // FITS file from which to read 173 ) 174 { 175 // This is very very different 176 } 177 #endif 178 179 // Read in the cell, and allocate the readouts 177 180 bool pmCellRead(pmCell *cell, // Cell to read into 178 181 psFits *fits, // FITS file from which to read … … 185 188 return false; 186 189 } 187 188 // Read the "concepts"189 pmConceptsReadCell(cell, db);190 190 191 191 // Having read the cell, we now have to cut it up … … 205 205 } 206 206 207 207 // Read in the component cells 208 208 bool pmChipRead(pmChip *chip, // Chip to read into 209 209 psFits *fits, // FITS file from which to read … … 223 223 } 224 224 225 // Read in the component chips 225 226 bool pmFPARead(pmFPA *fpa, // FPA to read into 226 227 psFits *fits, // FITS file from which to read … … 228 229 ) 229 230 { 230 psArray *chips = fpa->c ells; // Array of cells231 psArray *chips = fpa->chips; // Array of chips 231 232 for (int i = 0; i < chips->n; i++) { 232 pmC ell*chip = chips->data[i]; // The cell of interest233 pmChip *chip = chips->data[i]; // The cell of interest 233 234 if (!pmChipRead(chip, fits, db)) { 234 235 psError(PS_ERR_IO, false, "Unable to read chip %d.\n", i); … … 239 240 return true; 240 241 } 242 243 // Read the PHU into the nominated HDU 244 static bool readPHU(pmHDU *hdu, // HDU to read into 245 psFits *fits // FITS file from which to read 246 ) 247 { 248 if (! hdu || ! hdu->phu) { 249 return false; // Nothing to see here, move along 250 } 251 if (hdu->header) { 252 return true; // Already something to see here, no need to gawk at it... (; 253 } 254 // Read the PHU 255 psFitsMoveExtNum(fits, 0, false); 256 hdu->header = psFitsReadHeader(hdu->header, fits); 257 return true; 258 } 259 260 // Read the PHU into a cell 261 bool pmCellReadPHU(pmCell *cell, // Cell to read into 262 psFits *fits // FITS file from which to read 263 ) 264 { 265 return readPHU(cell->hdu, fits) || readPHU(cell->parent->hdu, fits) || 266 readPHU(cell->parent->parent->hdu, fits); 267 268 } 269 270 // Read the PHU into a chip 271 bool pmChipReadPHU(pmChip *chip, // Chip to read into 272 psFits *fits // FITS file from which to read 273 ) 274 { 275 return readPHU(chip->hdu, fits) || readPHU(chip->parent->hdu, fits); 276 } 277 278 // Read the PHU into an FPA 279 bool pmFPAReadPHU(pmFPA *fpa, // FPA to read into 280 psFits *fits // FITS file from which to read 281 ) 282 { 283 return readPHU(fpa->hdu, fits); 284 } 285 286 287 241 288 242 289 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.
