Changeset 9589 for trunk/psModules/src/camera/pmFPACopy.c
- Timestamp:
- Oct 16, 2006, 3:16:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPACopy.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPACopy.c
r8848 r9589 22 22 // Bin a region down by specified factors in x and y 23 23 static void binRegion(psRegion *region, // Region to be binned 24 int xBin, int yBin // Binning in x and y24 int xBin, int yBin // Binning in x and y 25 25 ) 26 26 { … … 38 38 39 39 // Find the blank (image-less) PHU, given a cell. 40 static pmHDU *findBlankPHU(const pmCell *cell // The cell for which to find the PHU40 static pmHDU *findBlankPHU(const pmCell *cell // The cell for which to find the PHU 41 41 ) 42 42 { … … 63 63 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 64 64 65 // Common engine for pmCellCopy and pmCellCopyStructure 66 // Does the actual splitting/splicing that's required to copy an FPA to a different representation. 65 67 static bool cellCopy(pmCell *target, // The target cell 66 pmCell *source,// The source cell, to be copied68 const pmCell *source, // The source cell, to be copied 67 69 bool pixels, // Copy the pixels? 68 70 int xBin, int yBin // (Relative) binning factors in x and y … … 249 251 psTrace("psModules.camera", 3, "CELL.X0: Before: %d After: %d\n", xZero, 250 252 xZero - (readout->image->numCols - 1) * xParity * xBin); 251 psTrace("psModules.camera", 9, "(xParity: %d xBin: %d numCols: %d)\n", xParity, xBin, readout->image->numCols); 253 psTrace("psModules.camera", 9, "(xParity: %d xBin: %d numCols: %d)\n", 254 xParity, xBin, readout->image->numCols); 252 255 xZero -= (readout->image->numCols - 1) * xParity * xBin; // Change the parity on the X0 position 253 256 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.X0"); // CELL.X0 from target … … 261 264 psTrace("psModules.camera", 3, "CELL.Y0: Before: %d After: %d\n", yZero, 262 265 yZero - (readout->image->numRows - 1) * yParity * yBin); 263 psTrace("psModules.camera", 9, "(yParity: %d yBin: %d numRows: %d)\n", yParity, yBin, readout->image->numRows); 266 psTrace("psModules.camera", 9, "(yParity: %d yBin: %d numRows: %d)\n", 267 yParity, yBin, readout->image->numRows); 264 268 yZero -= (readout->image->numRows - 1) * yParity * yBin; // Change the parity on the Y0 position 265 269 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.Y0"); // CELL.Y0 from target … … 294 298 } 295 299 300 // Common engine for pmChipCopy and pmChipCopyStructure 301 // Iterate on the components 296 302 static bool chipCopy(pmChip *target, // The target chip 297 pmChip *source,// The source chip, to be copied303 const pmChip *source, // The source chip, to be copied 298 304 bool pixels, // Copy the pixels? 299 305 int xBin, int yBin // (Relative) binning factors in x and y … … 308 314 psArray *sourceCells = source->cells; // The source cells 309 315 if (targetCells->n != sourceCells->n) { 310 psError(PS_ERR_IO, true, "Number of source cells (%ld) differs from the number of target cells (%ld)\n", 316 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 317 "Number of source cells (%ld) differs from the number of target cells (%ld)\n", 311 318 sourceCells->n, targetCells->n); 312 319 return false; … … 331 338 } 332 339 333 static bool fpaCopy(pmFPA *target, // The target FPA 334 pmFPA *source, // The source FPA, to be copied 335 bool pixels, // Copy the pixels? 336 int xBin, int yBin // (Relative) binning factors in x and y 340 // Common engine for pmFPACopy and pmFPACopyStructure. 341 // Iterate on the components 342 static bool fpaCopy(pmFPA *target, // The target FPA 343 const pmFPA *source, // The source FPA, to be copied 344 bool pixels, // Copy the pixels? 345 int xBin, int yBin // (Relative) binning factors in x and y 337 346 ) 338 347 { … … 345 354 psArray *sourceChips = source->chips; // The source chips 346 355 if (targetChips->n != sourceChips->n) { 347 psError(PS_ERR_IO, true, "Number of source chips (%ld) differs from the number of target chips (%ld)\n", 356 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 357 "Number of source chips (%ld) differs from the number of target chips (%ld)\n", 348 358 sourceChips->n, targetChips->n); 349 359 return false; … … 371 381 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 372 382 373 bool pmFPACopy(pmFPA *target, // The target FPA 374 pmFPA *source // The source FPA, to be copied 375 ) 383 bool pmFPACopy(pmFPA *target, const pmFPA *source) 376 384 { 377 385 PS_ASSERT_PTR_NON_NULL(target, false); … … 380 388 } 381 389 382 bool pmChipCopy(pmChip *target, // The target chip 383 pmChip *source // The source chip, to be copied 384 ) 390 bool pmChipCopy(pmChip *target, const pmChip *source) 385 391 { 386 392 PS_ASSERT_PTR_NON_NULL(target, false); … … 389 395 } 390 396 391 bool pmCellCopy(pmCell *target, // The target cell 392 pmCell *source // The source cell, to be copied 393 ) 397 bool pmCellCopy(pmCell *target, const pmCell *source) 394 398 { 395 399 PS_ASSERT_PTR_NON_NULL(target, false); … … 399 403 400 404 401 bool pmFPACopyStructure(pmFPA *target, // The target FPA 402 pmFPA *source, // The source FPA, to be copied 403 int xBin, int yBin // Binning factors in x and y 404 ) 405 bool pmFPACopyStructure(pmFPA *target, const pmFPA *source, int xBin, int yBin) 405 406 { 406 407 PS_ASSERT_PTR_NON_NULL(target, false); … … 411 412 } 412 413 413 bool pmChipCopyStructure(pmChip *target, // The target chip 414 pmChip *source, // The source chip, to be copied 415 int xBin, int yBin // Binning factors in x and y 416 ) 414 bool pmChipCopyStructure(pmChip *target, const pmChip *source, int xBin, int yBin) 417 415 { 418 416 PS_ASSERT_PTR_NON_NULL(target, false); … … 423 421 } 424 422 425 bool pmCellCopyStructure(pmCell *target, // The target cell 426 pmCell *source, // The source cell, to be copied 427 int xBin, int yBin // Binning factors in x and y 428 ) 423 bool pmCellCopyStructure(pmCell *target, const pmCell *source, int xBin, int yBin) 429 424 { 430 425 PS_ASSERT_PTR_NON_NULL(target, false);
Note:
See TracChangeset
for help on using the changeset viewer.
