Changeset 8669 for trunk/psModules/src/camera
- Timestamp:
- Aug 29, 2006, 11:39:44 AM (20 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 8 edited
-
pmFPA.c (modified) (9 diffs)
-
pmFPACopy.c (modified) (2 diffs)
-
pmFPAMosaic.c (modified) (2 diffs)
-
pmFPAfile.c (modified) (4 diffs)
-
pmFPAfileDefine.c (modified) (7 diffs)
-
pmFPAfileFitsIO.c (modified) (6 diffs)
-
pmHDUGenerate.c (modified) (2 diffs)
-
pmHDUUtils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPA.c
r8246 r8669 12 12 * XXX: Should we implement non-linear cell->chip transforms? 13 13 * 14 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08- 09 02:37:07$14 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-29 21:39:44 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 38 38 // if this readout has a parent, drop that instance 39 39 if (readout->parent) { 40 psTrace("psModules.camera", 9, "Removing readout % lx from cell %lx...\n", (size_t)readout, (size_t)readout->parent);40 psTrace("psModules.camera", 9, "Removing readout %zd from cell %zd...\n", (size_t)readout, (size_t)readout->parent); 41 41 psArray *readouts = readout->parent->readouts; 42 42 for (int i = 0; i < readouts->n; i++) { … … 46 46 } 47 47 } 48 psTrace("psModules.camera", 9, "Freeing readout % lx\n", (size_t) readout);48 psTrace("psModules.camera", 9, "Freeing readout %zd\n", (size_t) readout); 49 49 psFree(readout->image); 50 50 psFree(readout->mask); … … 59 59 // if this cell has a parent, drop that instance 60 60 if (cell->parent) { 61 psTrace("psModules.camera", 9, "Removing cell % lx from chip %lx...\n", (size_t)cell, (size_t)cell->parent);61 psTrace("psModules.camera", 9, "Removing cell %zd from chip %zd...\n", (size_t)cell, (size_t)cell->parent); 62 62 psArray *cells = cell->parent->cells; 63 63 for (int i = 0; i < cells->n; i++) { … … 67 67 } 68 68 } 69 psTrace("psModules.camera", 9, "Freeing cell % lx\n", (size_t)cell);69 psTrace("psModules.camera", 9, "Freeing cell %zd\n", (size_t)cell); 70 70 pmCellFreeReadouts(cell); 71 71 psFree(cell->readouts); … … 81 81 // if this chip has a parent, drop that instance 82 82 if (chip->parent) { 83 psTrace("psModules.camera", 9, "Removing chip % lx from fpa %lx...\n", (size_t)chip, (size_t)chip->parent);83 psTrace("psModules.camera", 9, "Removing chip %zd from fpa %zd...\n", (size_t)chip, (size_t)chip->parent); 84 84 psArray *chips = chip->parent->chips; 85 85 for (int i = 0; i < chips->n; i++) { … … 90 90 } 91 91 92 psTrace("psModules.camera", 9, "Freeing chip % lx\n", (size_t)chip);92 psTrace("psModules.camera", 9, "Freeing chip %zd\n", (size_t)chip); 93 93 pmChipFreeCells(chip); 94 94 psFree(chip->cells); … … 109 109 static void FPAFree(pmFPA *fpa) 110 110 { 111 psTrace("psModules.camera", 9, "Freeing fpa % lx\n", (size_t)fpa);111 psTrace("psModules.camera", 9, "Freeing fpa %zd\n", (size_t)fpa); 112 112 113 113 // NULL the parent pointers … … 149 149 } 150 150 tmpReadout->parent = NULL; 151 psTrace("psModules.camera", 9, "Will now free readout % lx...\n", (size_t)tmpReadout);151 psTrace("psModules.camera", 9, "Will now free readout %zd...\n", (size_t)tmpReadout); 152 152 } 153 153 cell->readouts = psArrayRealloc(cell->readouts, 0); -
trunk/psModules/src/camera/pmFPACopy.c
r8246 r8669 289 289 psArray *sourceCells = source->cells; // The source cells 290 290 if (targetCells->n != sourceCells->n) { 291 psError(PS_ERR_IO, true, "Number of source cells (% d) differs from the number of target cells (%d)\n",291 psError(PS_ERR_IO, true, "Number of source cells (%ld) differs from the number of target cells (%ld)\n", 292 292 sourceCells->n, targetCells->n); 293 293 return false; … … 326 326 psArray *sourceChips = source->chips; // The source chips 327 327 if (targetChips->n != sourceChips->n) { 328 psError(PS_ERR_IO, true, "Number of source chips (% d) differs from the number of target chips (%d)\n",328 psError(PS_ERR_IO, true, "Number of source chips (%ld) differs from the number of target chips (%ld)\n", 329 329 sourceChips->n, targetChips->n); 330 330 return false; -
trunk/psModules/src/camera/pmFPAMosaic.c
r8246 r8669 586 586 good = false; 587 587 } 588 psTrace("psModules.camera", 5, "Cell % d: x0=%d y0=%d\n", index, x0Cell, y0Cell);588 psTrace("psModules.camera", 5, "Cell %ld: x0=%d y0=%d\n", index, x0Cell, y0Cell); 589 589 590 590 // Offset of the chip on the FPA … … 682 682 masks->data[index] = psMemIncrRefCounter(readout->mask); 683 683 684 psTrace("psModules.camera", 9, "Added cell (% x) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index,684 psTrace("psModules.camera", 9, "Added cell (%p) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index, 685 685 x0->data.S32[index], y0->data.S32[index], xBin->data.S32[index], yBin->data.S32[index], 686 686 xFlip->data.U8[index], yFlip->data.U8[index]); -
trunk/psModules/src/camera/pmFPAfile.c
r7727 r8669 218 218 } 219 219 if (view->chip >= in->chips->n) { 220 psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == % d", view->chip, in->chips->n);220 psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %ld", view->chip, in->chips->n); 221 221 return false; 222 222 } … … 229 229 } 230 230 if (view->cell >= inChip->cells->n) { 231 psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == % d",231 psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %ld", 232 232 view->cell, inChip->cells->n); 233 233 return false; … … 261 261 } 262 262 if (view->chip >= in->chips->n) { 263 psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == % d", view->chip, in->chips->n);263 psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %ld", view->chip, in->chips->n); 264 264 return false; 265 265 } … … 272 272 } 273 273 if (view->cell >= inChip->cells->n) { 274 psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == % d",274 psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %ld", 275 275 view->cell, inChip->cells->n); 276 276 return false; -
trunk/psModules/src/camera/pmFPAfileDefine.c
r8246 r8669 243 243 file->camera = pmConfigCameraByName(config, words->data[0]); 244 244 if (!file->camera) { 245 psError(PS_ERR_IO, false, "camera %s not found\n", words->data[0]);245 psError(PS_ERR_IO, false, "camera %s not found\n", (char *)words->data[0]); 246 246 psFree(words); 247 247 return NULL; … … 305 305 } 306 306 if (infiles->n < 1) { 307 psError(PS_ERR_IO, false, "Found n == % d files in %s in arguments\n", infiles->n, argname);307 psError(PS_ERR_IO, false, "Found n == %ld files in %s in arguments\n", infiles->n, argname); 308 308 return NULL; 309 309 } … … 318 318 format = pmConfigCameraFormatFromHeader (config, phu); 319 319 if (!format) { 320 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", infiles->data[0]);320 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]); 321 321 psFree(phu); 322 322 return NULL; … … 326 326 fpa = pmFPAConstruct (config->camera); 327 327 if (!fpa) { 328 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", infiles->data[0]);328 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]); 329 329 return NULL; 330 330 } … … 433 433 } 434 434 if (infiles->n <= entry) { 435 psError(PS_ERR_IO, false, "only % d files in %s in argument, entry %d requested\n", infiles->n, argname, entry);435 psError(PS_ERR_IO, false, "only %ld files in %s in argument, entry %d requested\n", infiles->n, argname, entry); 436 436 return NULL; 437 437 } … … 448 448 format = pmConfigCameraFormatFromHeader (config, phu); 449 449 if (!format) { 450 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", infiles->data[0]);450 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]); 451 451 psFree(phu); 452 452 return NULL; … … 456 456 fpa = pmFPAConstruct (config->camera); 457 457 if (!fpa) { 458 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", infiles->data[0]);458 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]); 459 459 return NULL; 460 460 } -
trunk/psModules/src/camera/pmFPAfileFitsIO.c
r7726 r8669 30 30 31 31 if (view->chip >= fpa->chips->n) { 32 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == % d", view->chip, fpa->chips->n);32 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n); 33 33 return false; 34 34 } … … 41 41 42 42 if (view->cell >= chip->cells->n) { 43 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == % d", view->cell, chip->cells->n);43 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n); 44 44 return false; 45 45 } … … 93 93 94 94 if (view->chip >= fpa->chips->n) { 95 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == % d", view->chip, fpa->chips->n);95 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n); 96 96 return false; 97 97 } … … 104 104 105 105 if (view->cell >= chip->cells->n) { 106 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == % d", view->cell, chip->cells->n);106 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n); 107 107 return false; 108 108 } … … 178 178 179 179 if (view->chip >= fpa->chips->n) { 180 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == % d", view->chip, fpa->chips->n);180 psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n); 181 181 return false; 182 182 } … … 190 190 191 191 if (view->cell >= chip->cells->n) { 192 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == % d", view->cell, chip->cells->n);192 psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n); 193 193 return false; 194 194 } -
trunk/psModules/src/camera/pmHDUGenerate.c
r8582 r8669 252 252 numReadouts = readouts->n; 253 253 } else if (readouts->n != numReadouts) { 254 psError(PS_ERR_IO, true, "Number of readouts doesn't match: % d vs %d\n", readouts->n,254 psError(PS_ERR_IO, true, "Number of readouts doesn't match: %ld vs %d\n", readouts->n, 255 255 numReadouts); 256 256 return false; … … 336 336 337 337 if (biassecs->n != readout->bias->n) { 338 psLogMsg(__func__, PS_LOG_WARN, "Number of bias sections (% d) and number of biases (%d)"338 psLogMsg(__func__, PS_LOG_WARN, "Number of bias sections (%ld) and number of biases (%ld)" 339 339 " do not match.\n", biassecs->n, readout->bias->n); 340 340 } -
trunk/psModules/src/camera/pmHDUUtils.c
r8246 r8669 102 102 } 103 103 104 psTrace("psModules.camera", level + 1, "Format: % x\n", hdu->format);104 psTrace("psModules.camera", level + 1, "Format: %p\n", hdu->format); 105 105 if (header) { 106 106 if (hdu->header) {
Note:
See TracChangeset
for help on using the changeset viewer.
