Changeset 6568 for branches/rel10_ifa/psModules/src/astrom/pmFPAview.c
- Timestamp:
- Mar 9, 2006, 10:56:39 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPAview.c
r6559 r6568 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1.2. 2$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-03-09 03:24:49 $5 * @version $Revision: 1.1.2.3 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-03-09 20:56:39 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include "pmFPAWrite.h" 21 21 22 bool pmChipRead(pmChip *fpa, // FPA to read into23 psFits *fits, // FITS file from which to read24 psMetadata *phu, // Primary header25 psDB *db // Database handle, for concept ingest26 );27 28 bool pmCellRead(pmCell *fpa, // FPA to read into29 psFits *fits, // FITS file from which to read30 psMetadata *phu, // Primary header31 psDB *db // Database handle, for concept ingest32 );33 34 bool pmReadoutRead(pmReadout *fpa, // FPA to read into35 psFits *fits, // FITS file from which to read36 psMetadata *phu, // Primary header37 psDB *db // Database handle, for concept ingest38 );39 40 bool pmReadoutReadSegment(pmReadout *fpa, // FPA to read into41 psFits *fits, // FITS file from which to read42 int n, int i,43 psMetadata *phu, // Primary header44 psDB *db);45 46 22 static void pmFPAviewFree (pmFPAview *view) 47 23 { … … 308 284 309 285 if (view->chip == -1) { 310 pmFPARead (fpa, fits, NULL , NULL);286 pmFPARead (fpa, fits, NULL); 311 287 return true; 312 288 } … … 318 294 319 295 if (view->cell == -1) { 320 pmChipRead (chip, fits, NULL , NULL);296 pmChipRead (chip, fits, NULL); 321 297 return true; 322 298 } … … 328 304 329 305 if (view->readout == -1) { 330 pmCellRead (cell, fits, NULL, NULL); 331 return true; 332 } 333 334 if (view->readout >= cell->readouts->n) { 335 return false; 336 } 306 pmCellRead (cell, fits, NULL); 307 return true; 308 } 309 310 // XXX pmReadoutRead, pmReadoutReadSegement disabled for now 311 return false; 312 313 # if (0) 314 315 if (view->readout >= cell->readouts->n) { 316 return false; 317 } 337 318 pmReadout *readout = cell->readouts->data[view->readout]; 338 319 339 320 if (view->nRows == 0) { 340 pmReadoutRead (readout, fits, NULL , NULL);321 pmReadoutRead (readout, fits, NULL); 341 322 } else { 342 323 pmReadoutReadSegment (readout, fits, view->nRows, view->iRows, NULL, NULL); 343 324 } 344 325 return true; 345 } 326 # endif 327 } 328 329 // XXX image writes disabled for now 330 # if (0) 331 // given an already-opened fits file, write the components corresponding 332 // to the specified view 333 bool pmFPAviewWriteFitsImage (pmFPAview *view, psFits *fits) 334 { 335 336 pmFPA *fpa = view->fpa; 337 338 if (view->chip == -1) { 339 pmFPAWrite (fpa, fits, NULL, NULL); 340 return true; 341 } 342 343 if (view->chip >= fpa->chips->n) { 344 return false; 345 } 346 pmChip *chip = fpa->chips->data[view->chip]; 347 348 if (view->cell == -1) { 349 pmChipWrite (chip, fits, NULL, NULL); 350 return true; 351 } 352 353 if (view->cell >= chip->cells->n) { 354 return false; 355 } 356 pmCell *cell = chip->cells->data[view->cell]; 357 358 if (view->readout == -1) { 359 pmCellWrite (cell, fits, NULL, NULL); 360 return true; 361 } 362 363 if (view->readout >= cell->readouts->n) { 364 return false; 365 } 366 pmReadout *readout = cell->readouts->data[view->readout]; 367 368 if (view->nRows == 0) { 369 pmReadoutWrite (readout, fits, NULL, NULL); 370 } else { 371 pmReadoutWriteSegment (readout, fits, view->nRows, view->iRows, NULL, NULL); 372 } 373 return true; 374 } 375 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
