Changeset 13190
- Timestamp:
- May 3, 2007, 10:04:01 AM (19 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 5 edited
-
pmFPAConstruct.c (modified) (1 diff)
-
pmFPAFlags.c (modified) (2 diffs)
-
pmFPAFlags.h (modified) (2 diffs)
-
pmFPAMosaic.c (modified) (1 diff)
-
pmFPARead.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAConstruct.c
r12838 r13190 12 12 #include "pmFPA.h" 13 13 #include "pmFPALevel.h" 14 #include "pmFPAview.h" 14 15 #include "pmFPAFlags.h" 15 16 #include "pmConcepts.h" 16 #include "pmFPAview.h"17 17 #include "pmFPAConstruct.h" 18 18 #include "pmFPAUtils.h" -
trunk/psModules/src/camera/pmFPAFlags.c
r12696 r13190 8 8 #include "pmHDU.h" 9 9 #include "pmFPA.h" 10 #include "pmFPALevel.h" 11 #include "pmFPAview.h" 10 12 #include "pmFPAFlags.h" 11 13 … … 128 130 } 129 131 132 // pmFPA does not have its own data_exists flag; check its children 133 bool pmFPACheckDataStatus (const pmFPA *fpa) { 134 135 PS_ASSERT_PTR_NON_NULL(fpa, false); 136 137 for (int i = 0; i < fpa->chips->n; i++) { 138 pmChip *chip = fpa->chips->data[i]; 139 if (chip == NULL) continue; 140 if (chip->data_exists) return true; 141 } 142 return false; 143 } 144 145 bool pmChipCheckDataStatus (const pmChip *chip) { 146 147 PS_ASSERT_PTR_NON_NULL(chip, false); 148 149 return (chip->data_exists); 150 } 151 152 bool pmCellCheckDataStatus (const pmCell *cell) { 153 154 PS_ASSERT_PTR_NON_NULL(cell, false); 155 156 return (cell->data_exists); 157 } 158 159 bool pmReadoutCheckDataStatus (const pmReadout *readout) { 160 161 PS_ASSERT_PTR_NON_NULL(readout, false); 162 163 return (readout->data_exists); 164 } 165 166 bool pmFPAviewCheckDataStatus (const pmFPA *fpa, const pmFPAview *view) { 167 168 PS_ASSERT_PTR_NON_NULL(fpa, false); 169 PS_ASSERT_PTR_NON_NULL(view, false); 170 171 if (view->chip == -1) { 172 bool exists = pmFPACheckDataStatus (fpa); 173 return exists; 174 } 175 176 if (view->chip >= fpa->chips->n) { 177 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n); 178 return false; 179 } 180 pmChip *chip = fpa->chips->data[view->chip]; 181 182 if (view->cell == -1) { 183 bool exists = pmChipCheckDataStatus (chip); 184 return exists; 185 } 186 187 if (view->cell >= chip->cells->n) { 188 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n); 189 return false; 190 } 191 pmCell *cell = chip->cells->data[view->cell]; 192 193 if (view->readout == -1) { 194 bool exists = pmCellCheckDataStatus (cell); 195 return exists; 196 } 197 198 if (view->readout >= cell->readouts->n) { 199 psError(PS_ERR_IO, true, "Requested readout == %d >= cell->readouds->n == %ld", view->readout, cell->readouts->n); 200 return false; 201 } 202 pmReadout *readout = cell->readouts->data[view->readout]; 203 204 bool exists = pmReadoutCheckDataStatus (readout); 205 return exists; 206 } 130 207 131 208 // Set cells within a chip to be processed or not -
trunk/psModules/src/camera/pmFPAFlags.h
r12696 r13190 6 6 * @author Eugene Magnier, IfA 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-0 3-30 21:12:56$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-05-03 20:04:01 $ 10 10 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 11 11 */ … … 65 65 ); 66 66 67 68 // Functions the check the data_exists flags 69 70 /// Check data_exists for the element of this fpa at this view 71 bool pmFPAviewCheckDataStatus (const pmFPA *fpa, ///< FPA to check 72 const pmFPAview *view ///< check for this view 73 ); 74 75 /// Check data_exists for this fpa 76 bool pmFPACheckDataStatus (const pmFPA *fpa ///< FPA to check 77 ); 78 79 /// Check data_exists for this chip 80 bool pmChipCheckDataStatus (const pmChip *chip ///< Chip to check 81 ); 82 83 /// Check data_exists for this cell 84 bool pmCellCheckDataStatus (const pmCell *cell ///< Cell to check 85 ); 86 87 /// Check data_exists for this readout 88 bool pmReadoutCheckDataStatus (const pmReadout *readout ///< Readout to check 89 ); 90 91 67 92 // Functions to set the process flags 68 93 -
trunk/psModules/src/camera/pmFPAMosaic.c
r13189 r13190 9 9 #include "pmHDU.h" 10 10 #include "pmFPA.h" 11 #include "pmFPALevel.h" 12 #include "pmFPAview.h" 11 13 #include "pmFPAFlags.h" 12 14 #include "pmConceptsAverage.h" -
trunk/psModules/src/camera/pmFPARead.c
r12696 r13190 12 12 #include "pmFPA.h" 13 13 #include "pmFPALevel.h" 14 #include "pmFPAview.h" 14 15 #include "pmFPAFlags.h" 15 16 #include "pmHDUUtils.h"
Note:
See TracChangeset
for help on using the changeset viewer.
