Changeset 21085 for trunk/magic/remove/src/streaksio.c
- Timestamp:
- Jan 4, 2009, 12:32:32 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksio.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksio.c
r20845 r21085 5 5 static nebServer *ourNebServer = NULL; 6 6 7 // open the files required for streaks procesing. 8 // if remove is true the calling program is streaksremove and the recovery files are outputs 9 // if false the recovery files are inputs 7 10 streakFiles *openFiles(pmConfig *config, bool remove) 8 11 { … … 30 33 31 34 if (remove) { 35 // XXX: the recovery file should be required if stage is raw and the replace flag is set 36 // that is if the input raw image is to be destroyed 32 37 sf->recImage = sFileOpen(config, stage, "RECOVERY", inputBasename, false); 33 38 } else { … … 45 50 } 46 51 } 52 // If we're in streaksremove and operating on a chip stage image 53 // if we are passed a mask it is camera stage mask and we also 54 // need to destreak the chip level mask file as well 55 if (remove && sf->inMask && (stage == IPP_STAGE_CHIP)) { 56 sf->inChMask = sFileOpen(config, stage, "INPUT.CHMASK", NULL, true); 57 inputBasename = basename(sf->inChMask->name); 58 sf->outChMask = sFileOpen(config, stage, "OUTPUT", inputBasename, true); 59 sf->recChMask = sFileOpen(config, stage, "RECOVERY", inputBasename, false); 60 } 61 47 62 sf->inWeight = sFileOpen(config, stage, "INPUT.WEIGHT", NULL, false); 48 63 if (sf->inWeight) { … … 421 436 // XXX: This function assumes that it is only used for a single 422 437 // chip single cell FPA (i.e. a skycell) 438 assert(sf->inImage->pmfile->fpa->chips->n == 1); 439 423 440 pmFPAview *view = sf->view; 424 assert(view->chip == 0); 441 if (view) { 442 // The view was allocated and the chip set by setupAstrometry() 443 assert(view->chip == 0); 444 } else { 445 sf->view = pmFPAviewAlloc(0); 446 view = sf->view; 447 sf->chip = pmFPAviewNextChip(view, sf->inImage->pmfile->fpa, 1); 448 assert(sf->chip != NULL); 449 } 425 450 view->cell = 0; 426 451 sf->cell = pmFPAviewThisCell(view, sf->inImage->pmfile->fpa); … … 747 772 closeImage(sf->recMask); 748 773 } 774 if (sf->inChMask) { 775 closeImage(sf->inChMask); 776 closeImage(sf->outChMask); 777 closeImage(sf->recChMask); 778 } 749 779 if (sf->inWeight) { 750 780 closeImage(sf->inWeight);
Note:
See TracChangeset
for help on using the changeset viewer.
