Changeset 6720
- Timestamp:
- Mar 28, 2006, 2:57:23 PM (20 years ago)
- Location:
- branches/rel10_ifa/psModules/src/astrom
- Files:
-
- 1 added
- 3 edited
-
Makefile.am (modified) (2 diffs)
-
pmFPACopy.c (modified) (12 diffs)
-
pmFPACopy.h (added)
-
pmFPARead.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/Makefile.am
r6713 r6720 6 6 pmFPA.c \ 7 7 pmFPAConstruct.c \ 8 pmFPACopy.c \ 8 9 pmFPAMaskWeight.c \ 9 10 pmFPARead.c \ … … 28 29 pmFPA.h \ 29 30 pmFPAConstruct.h \ 31 pmFPACopy.h \ 30 32 pmFPAMaskWeight.h \ 31 33 pmFPARead.h \ -
branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c
r6682 r6720 3 3 4 4 #include "pslib.h" 5 #include "psImageFlip.h" 6 #include "psRegionIsBad.h" 7 5 8 #include "pmFPA.h" 6 9 #include "pmFPAUtils.h" 7 10 #include "pmHDU.h" 11 #include "pmHDUUtils.h" 12 #include "pmFPACopy.h" 8 13 9 14 #define MAX(x,y) ((x) > (y) ? (x) : (y)) … … 53 58 static bool cellList(psList *targets, // The list of target cells 54 59 psList *sources, // The list of source cells 55 constpmCell *targetCell, // The target cell56 constpmCell *sourceCell // The source cell60 pmCell *targetCell, // The target cell 61 pmCell *sourceCell // The source cell 57 62 ) 58 63 { … … 94 99 } 95 100 96 return list;101 return true; 97 102 } 98 103 … … 226 231 psRegion *trimsec = psMetadataLookupPtr(&mdok, target->concepts, "CELL.TRIMSEC"); // Trim section 227 232 if (!mdok || !trimsec) { 228 psLogMsg(PS_ERR_IO, true, "CELL.TRIMSEC has not been initialised in target cell --- ignored.\n"); 233 psLogMsg(__func__, PS_LOG_WARN, "CELL.TRIMSEC has not been initialised in target cell --- " 234 "ignored.\n"); 229 235 continue; 230 236 } … … 239 245 pmReadout *readout = source->readouts->data[0]; // The first source readout, as representative 240 246 psImage *image = readout->image;// The proper image 241 *trimsec = sectionForImage( position, bias, readdir);247 *trimsec = sectionForImage(&position, image, readdir); 242 248 } 243 249 … … 258 264 259 265 // Generate an HDU with the pixels 260 static bool generateHDU(pmCell *target // The target cell261 constpmCell *source // The source cell266 static bool generateHDU(pmCell *target, // The target cell 267 pmCell *source // The source cell 262 268 ) 263 269 { … … 266 272 psList *targetCells = psListAlloc(NULL); // List of target cells below the target HDU 267 273 psList *sourceCells = psListAlloc(NULL); // List of source cells below the target HDU 268 if (! cellList(targetCells, source s, target, source)) {274 if (! cellList(targetCells, sourceCells, target, source)) { 269 275 psError(PS_ERR_IO, true, "Unable to find cells to generate HDU!\n"); 270 276 return false; … … 288 294 289 295 } 290 psFree( cellsIter);296 psFree(iter); 291 297 } 292 298 … … 327 333 UPDATE_CASE(PS_TYPE_F32, F32); 328 334 UPDATE_CASE(PS_TYPE_F64, F64); 329 UPDATE_CASE(PS_DATA_STR , V);335 UPDATE_CASE(PS_DATA_STRING, V); 330 336 default: 331 337 psLogMsg(__func__, PS_LOG_WARN, "Unsupported type (%x) for concept %s --- ignored.\n", … … 416 422 pmCell *targetCell = targetCells->data[i]; // The target cell 417 423 const char *cellName = psMetadataLookupStr(NULL, targetCell->concepts, "CELL.NAME"); // Name of cell 418 int cellNum = pm FPAFindCell(source, cellName); // Number of cell with that name424 int cellNum = pmChipFindCell(source, cellName); // Number of cell with that name 419 425 if (cellNum >= 0) { 420 426 pmCell *sourceCell = sourceCells->data[cellNum]; // The source cell … … 447 453 pmHDU *hdu = pmHDUFromCell(target); // The target HDU; we need to fix this up 448 454 if (! hdu->images) { 449 generateHDU( cell);455 generateHDU(target, source); 450 456 } 451 457 … … 496 502 while ((biassec = psListGetAndIncrement(biassecsIter))) { 497 503 if (psRegionIsBad(*biassec)) { 498 psString *biassecString = psRegionToString(biassec); // String for bias section504 psString biassecString = psRegionToString(*biassec); // String for bias section 499 505 psLogMsg(__func__, PS_LOG_WARN, "Bias section (%s) isn't set --- ignored.\n", biassecString); 500 506 psFree(biassecString); -
branches/rel10_ifa/psModules/src/astrom/pmFPARead.c
r6713 r6720 6 6 #include "pmFPA.h" 7 7 #include "pmFPARead.h" 8 #include "pmHDU.h" 9 #include "pmHDUUtils.h" 8 10 #include "pmConcepts.h" 9 11 #include "psRegionIsBad.h"
Note:
See TracChangeset
for help on using the changeset viewer.
