Changeset 18163 for trunk/psModules/src/camera/pmFPAfileFitsIO.c
- Timestamp:
- Jun 17, 2008, 12:16:38 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileFitsIO.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileFitsIO.c
r18139 r18163 166 166 static bool fpaViewReadFitsImage(const pmFPAview *view, // FPA view, specifying the level of interest 167 167 pmFPAfile *file, // FPA file of interest 168 psDB *db, 169 bool (*fpaReadFunc)(pmFPA*, psFits*, p sDB*), // Function to read FPA170 bool (*chipReadFunc)(pmChip*, psFits*, p sDB*), // Function to read chip171 bool (*cellReadFunc)(pmCell*, psFits*, p sDB*) // Function to read cell168 pmConfig *config, // Configuration 169 bool (*fpaReadFunc)(pmFPA*, psFits*, pmConfig*), // Function to read FPA 170 bool (*chipReadFunc)(pmChip*, psFits*, pmConfig*), // Function to read chip 171 bool (*cellReadFunc)(pmCell*, psFits*, pmConfig*) // Function to read cell 172 172 ) 173 173 { … … 179 179 180 180 if (view->chip == -1) { 181 return fpaReadFunc(fpa, fits, db);181 return fpaReadFunc(fpa, fits, config); 182 182 } 183 183 … … 189 189 190 190 if (view->cell == -1) { 191 return chipReadFunc(chip, fits, db);191 return chipReadFunc(chip, fits, config); 192 192 } 193 193 … … 199 199 200 200 if (view->readout == -1) { 201 return cellReadFunc(cell, fits, db);201 return cellReadFunc(cell, fits, config); 202 202 } 203 203 psError(PS_ERR_UNKNOWN, true, "Bad view: %d,%d", view->chip, view->cell); … … 215 215 216 216 if (view->nRows == 0) { 217 pmReadoutRead (readout, fits, db);217 pmReadoutRead (readout, fits, config); 218 218 } else { 219 219 pmReadoutReadSegment (readout, fits, view->nRows, view->iRows, NULL, NULL); … … 228 228 PS_ASSERT_PTR_NON_NULL(view, false); 229 229 PS_ASSERT_PTR_NON_NULL(file, false); 230 return fpaViewReadFitsImage(view, file, config ->database, pmFPARead, pmChipRead, pmCellRead);230 return fpaViewReadFitsImage(view, file, config, pmFPARead, pmChipRead, pmCellRead); 231 231 } 232 232 … … 235 235 PS_ASSERT_PTR_NON_NULL(view, false); 236 236 PS_ASSERT_PTR_NON_NULL(file, false); 237 return fpaViewReadFitsImage(view, file, config ->database, pmFPAReadMask, pmChipReadMask, pmCellReadMask);237 return fpaViewReadFitsImage(view, file, config, pmFPAReadMask, pmChipReadMask, pmCellReadMask); 238 238 } 239 239 … … 242 242 PS_ASSERT_PTR_NON_NULL(view, false); 243 243 PS_ASSERT_PTR_NON_NULL(file, false); 244 return fpaViewReadFitsImage(view, file, config ->database, pmFPAReadWeight, pmChipReadWeight, pmCellReadWeight);244 return fpaViewReadFitsImage(view, file, config, pmFPAReadWeight, pmChipReadWeight, pmCellReadWeight); 245 245 } 246 246 … … 249 249 PS_ASSERT_PTR_NON_NULL(view, false); 250 250 PS_ASSERT_PTR_NON_NULL(file, false); 251 return fpaViewReadFitsImage(view, file, config ->database, pmFPAReadDark, pmChipReadDark, pmCellReadDark);251 return fpaViewReadFitsImage(view, file, config, pmFPAReadDark, pmChipReadDark, pmCellReadDark); 252 252 } 253 253 … … 256 256 PS_ASSERT_PTR_NON_NULL(view, false); 257 257 PS_ASSERT_PTR_NON_NULL(file, false); 258 return fpaViewReadFitsImage(view, file, config ->database, pmFPAReadHeaderSet, pmChipReadHeaderSet, pmCellReadHeaderSet);258 return fpaViewReadFitsImage(view, file, config, pmFPAReadHeaderSet, pmChipReadHeaderSet, pmCellReadHeaderSet); 259 259 } 260 260 … … 267 267 static bool fpaViewWriteFitsImage(const pmFPAview *view, // FPA view, specifying the level of interest 268 268 pmFPAfile *file, // FPA file of interest 269 constpmConfig *config, // Configuration270 bool (*fpaWriteFunc)(pmFPA*, psFits*, p sDB*, bool, bool), // Func forFPA271 bool (*chipWriteFunc)(pmChip*, psFits*, p sDB*, bool, bool), // Func forchip272 bool (*cellWriteFunc)(pmCell*, psFits*, p sDB*, bool) // Func forcell269 pmConfig *config, // Configuration 270 bool (*fpaWriteFunc)(pmFPA*, psFits*, pmConfig*, bool, bool), // Func FPA 271 bool (*chipWriteFunc)(pmChip*, psFits*, pmConfig*, bool, bool),// Func chip 272 bool (*cellWriteFunc)(pmCell*, psFits*, pmConfig*, bool) // Func cell 273 273 ) 274 274 { … … 283 283 switch (pmFPAviewLevel(view)) { 284 284 case PM_FPA_LEVEL_FPA: { 285 bool success = fpaWriteFunc(fpa, fits, NULL, false, true);285 bool success = fpaWriteFunc(fpa, fits, config, false, true); 286 286 psFree(fpa); 287 287 return success; … … 289 289 case PM_FPA_LEVEL_CHIP: { 290 290 pmChip *chip = pmFPAviewThisChip(view, fpa); // Chip of interest 291 bool success = chipWriteFunc(chip, fits, NULL, false, true);291 bool success = chipWriteFunc(chip, fits, config, false, true); 292 292 psFree(fpa); 293 293 return success; … … 295 295 case PM_FPA_LEVEL_CELL: { 296 296 pmCell *cell = pmFPAviewThisCell(view, fpa); // Cell of interest 297 bool success = cellWriteFunc(cell, fits, NULL, false);297 bool success = cellWriteFunc(cell, fits, config, false); 298 298 psFree(fpa); 299 299 return success; … … 327 327 } 328 328 329 bool pmFPAviewWriteFitsImage(const pmFPAview *view, pmFPAfile *file, constpmConfig *config)329 bool pmFPAviewWriteFitsImage(const pmFPAview *view, pmFPAfile *file, pmConfig *config) 330 330 { 331 331 PS_ASSERT_PTR_NON_NULL(view, false); … … 334 334 } 335 335 336 bool pmFPAviewWriteFitsMask(const pmFPAview *view, pmFPAfile *file, constpmConfig *config)336 bool pmFPAviewWriteFitsMask(const pmFPAview *view, pmFPAfile *file, pmConfig *config) 337 337 { 338 338 PS_ASSERT_PTR_NON_NULL(view, false); … … 341 341 } 342 342 343 bool pmFPAviewWriteFitsWeight(const pmFPAview *view, pmFPAfile *file, constpmConfig *config)343 bool pmFPAviewWriteFitsWeight(const pmFPAview *view, pmFPAfile *file, pmConfig *config) 344 344 { 345 345 PS_ASSERT_PTR_NON_NULL(view, false); … … 348 348 } 349 349 350 bool pmFPAviewWriteFitsDark(const pmFPAview *view, pmFPAfile *file, constpmConfig *config)350 bool pmFPAviewWriteFitsDark(const pmFPAview *view, pmFPAfile *file, pmConfig *config) 351 351 { 352 352 PS_ASSERT_PTR_NON_NULL(view, false);
Note:
See TracChangeset
for help on using the changeset viewer.
