Changeset 13192
- Timestamp:
- May 3, 2007, 10:04:31 AM (19 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 2 edited
-
pmSourceIO.c (modified) (2 diffs)
-
pmSourceIO.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO.c
r13136 r13192 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.3 8$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-05-03 00:12:03$5 * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-05-03 20:04:31 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 662 662 } 663 663 664 664 bool pmFPAviewCheckDataStatusForSources (const pmFPAview *view, const pmFPAfile *file) 665 { 666 pmFPA *fpa = file->fpa; 667 668 if (view->chip == -1) { 669 bool exists = pmFPACheckDataStatusForSources (fpa); 670 return exists; 671 } 672 if (view->chip >= fpa->chips->n) { 673 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n); 674 return false; 675 } 676 pmChip *chip = fpa->chips->data[view->chip]; 677 678 if (view->cell == -1) { 679 bool exists = pmChipCheckDataStatusForSources (chip); 680 return exists; 681 } 682 if (view->cell >= chip->cells->n) { 683 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n); 684 return false; 685 } 686 pmCell *cell = chip->cells->data[view->cell]; 687 688 if (view->readout == -1) { 689 bool exists = pmCellCheckDataStatusForSources (cell); 690 return exists; 691 } 692 693 if (view->readout >= cell->readouts->n) { 694 psError(PS_ERR_IO, true, "Requested readout == %d >= cell->readouds->n == %ld", view->readout, cell->readouts->n); 695 return false; 696 } 697 pmReadout *readout = cell->readouts->data[view->readout]; 698 699 bool exists = pmReadoutCheckDataStatusForSources (readout); 700 return exists; 701 } 702 703 bool pmFPACheckDataStatusForSources (const pmFPA *fpa) { 704 705 for (int i = 0; i < fpa->chips->n; i++) { 706 pmChip *chip = fpa->chips->data[i]; 707 if (!chip) continue; 708 if (pmChipCheckDataStatusForSources (chip)) return true; 709 } 710 return false; 711 } 712 713 bool pmChipCheckDataStatusForSources (const pmChip *chip) { 714 715 for (int i = 0; i < chip->cells->n; i++) { 716 pmCell *cell = chip->cells->data[i]; 717 if (!cell) continue; 718 if (pmCellCheckDataStatusForSources (cell)) return true; 719 } 720 return false; 721 } 722 723 bool pmCellCheckDataStatusForSources (const pmCell *cell) { 724 725 for (int i = 0; i < cell->readouts->n; i++) { 726 pmReadout *readout = cell->readouts->data[i]; 727 if (!readout) continue; 728 if (pmReadoutCheckDataStatusForSources (readout)) return true; 729 } 730 return false; 731 } 732 733 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout) { 734 735 bool status; 736 737 // select the psf of interest 738 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES"); 739 if (!psf) return false; 740 return true; 741 } 742 -
trunk/psModules/src/objects/pmSourceIO.h
r13137 r13192 4 4 * @author EAM, IfA; GLG, MHPCC 5 5 * 6 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-05-03 00:13:03$6 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-05-03 20:04:31 $ 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 9 9 * … … 50 50 bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, const pmConfig *config); 51 51 52 bool pmFPAviewCheckDataStatusForSources (const pmFPAview *view, const pmFPAfile *file); 53 bool pmFPACheckDataStatusForSources (const pmFPA *fpa); 54 bool pmChipCheckDataStatusForSources (const pmChip *chip); 55 bool pmCellCheckDataStatusForSources (const pmCell *cell); 56 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout); 57 52 58 /// @} 53 59 # endif /* PM_SOURCE_IO_H */
Note:
See TracChangeset
for help on using the changeset viewer.
