Changeset 34623 for branches/czw_branch/20120906/ppStack/src
- Timestamp:
- Oct 29, 2012, 2:26:09 PM (14 years ago)
- Location:
- branches/czw_branch/20120906/ppStack/src
- Files:
-
- 8 edited
-
ppStackCamera.c (modified) (1 diff)
-
ppStackCleanup.c (modified) (1 diff)
-
ppStackCombineFinal.c (modified) (3 diffs)
-
ppStackCombinePrepare.c (modified) (2 diffs)
-
ppStackFiles.c (modified) (1 diff)
-
ppStackLoop.c (modified) (1 diff)
-
ppStackThread.c (modified) (3 diffs)
-
ppStackUpdateHeader.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ppStack/src/ppStackCamera.c
r34516 r34623 223 223 pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel, 224 224 PM_FPA_FILE_IMAGE); 225 fprintf(stderr,"ppSC: %s\n",bkgmodel);226 225 if (!inputBKG) { 227 226 psError(psErrorCodeLast(), false, -
branches/czw_branch/20120906/ppStack/src/ppStackCleanup.c
r34516 r34623 28 28 options->expRO = NULL; 29 29 30 options->bkgRO->data_exists = false; 31 options->bkgRO->parent->data_exists = false; 32 options->bkgRO->parent->parent->data_exists = false; 33 psFree(options->bkgRO); 34 options->bkgRO = NULL; 30 if (options->bkgRO) { 31 options->bkgRO->data_exists = false; 32 options->bkgRO->parent->data_exists = false; 33 options->bkgRO->parent->parent->data_exists = false; 34 psFree(options->bkgRO); 35 options->bkgRO = NULL; 36 } 35 37 36 38 for (int i = 0; i < options->num; i++) { -
branches/czw_branch/20120906/ppStack/src/ppStackCombineFinal.c
r34531 r34623 27 27 return(false); 28 28 } 29 #if 0 29 30 if (!ppStackWriteImage("/tmp/test_forced.bkgmdl.fits", 30 31 bkgRO->parent->parent->parent->hdu->header, … … 33 34 fprintf(stderr,"Failed to write image because fail.\n"); 34 35 } 35 36 #endif 36 37 for (int i = 0; i < options->num; i++) { 37 38 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); … … 53 54 bkgRO->parent->data_exists = true; 54 55 bkgRO->parent->parent->data_exists = true; 56 55 57 return(true); 56 58 } -
branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c
r34531 r34623 60 60 options->bkgRO->parent->parent->parent->concepts = psMetadataCopy(options->bkgRO->parent->parent->parent->concepts, 61 61 ro->parent->parent->parent->concepts); 62 62 63 } 63 64 … … 84 85 return false; 85 86 } 87 88 89 86 90 } 87 91 -
branches/czw_branch/20120906/ppStack/src/ppStackFiles.c
r34531 r34623 27 27 static char *filesUnconv[] = { "PPSTACK.UNCONV", "PPSTACK.UNCONV.MASK", "PPSTACK.UNCONV.VARIANCE", 28 28 "PPSTACK.UNCONV.EXP", "PPSTACK.UNCONV.EXPNUM", "PPSTACK.UNCONV.EXPWT", 29 "PPSTACK.OUTPUT.BKGMODEL",30 29 NULL }; 31 30 -
branches/czw_branch/20120906/ppStack/src/ppStackLoop.c
r34516 r34623 193 193 194 194 // Prepare for combination 195 if (!ppStackCombinePrepare("PPSTACK.UNCONV", "PPSTACK.UNCONV.EXP", "PPSTACK.OUTPUT.BKGMODEL", PPSTACK_FILES_UNCONV,195 if (!ppStackCombinePrepare("PPSTACK.UNCONV", "PPSTACK.UNCONV.EXP", NULL, PPSTACK_FILES_UNCONV, 196 196 stack, options, config)) { 197 197 psError(psErrorCodeLast(), false, "Unable to prepare for combination."); -
branches/czw_branch/20120906/ppStack/src/ppStackThread.c
r34516 r34623 35 35 psFitsClose(stack->varianceFits->data[i]); 36 36 } 37 /* if (stack->bkgFits->data[i]) { */38 /* psFitsClose(stack->bkgFits->data[i]); */39 /* } */40 37 stack->imageFits->data[i] = stack->maskFits->data[i] = stack->varianceFits->data[i] = NULL; 41 38 } … … 57 54 const psArray *varianceNames = conv ? options->convVariances : options->origVariances; // Variance names 58 55 const psArray *covariances = conv ? options->convCovars : options->origCovars; // Covariance matrices 59 const psArray *bkgNames = options->bkgImages; 56 60 57 PS_ASSERT_ARRAY_NON_NULL(cells, NULL); 61 58 if (imageNames) { … … 100 97 psFree(resolved); \ 101 98 } 102 fprintf(stderr,"%d %s\n",i,(char*) bkgNames->data[i]);103 99 IMAGE_OPEN(imageNames, stack->imageFits, i); 104 100 IMAGE_OPEN(maskNames, stack->maskFits, i); 105 101 IMAGE_OPEN(varianceNames, stack->varianceFits, i); 106 // IMAGE_OPEN(bkgNames, stack->bkgFits, i);107 102 } 108 103 -
branches/czw_branch/20120906/ppStack/src/ppStackUpdateHeader.c
r31158 r34623 6 6 7 7 pmReadout *outRO = options->outRO; // Output readout 8 pmReadout *expRO = options->expRO; 8 9 9 10 // Propagate WCS … … 123 124 snprintf (field, 64, "AIR_%04d", i); 124 125 psMetadataAddF32(hdu->header, PS_LIST_TAIL, field, PS_META_REPLACE, "input image airmass", value); 125 } 126 } 127 128 // Copy information into expRO, because it should be there too. 129 pmHDU *expROhdu = pmHDUFromCell(expRO->parent); 130 if (!expROhdu->header) { 131 expROhdu->header = psMetadataAlloc(); 132 } 133 expRO->parent->parent->parent->hdu->header = psMetadataCopy(expRO->parent->parent->parent->hdu->header, 134 outRO->parent->parent->parent->hdu->header); 135 136 expRO->parent->concepts = psMetadataCopy(expRO->parent->concepts, 137 outRO->parent->concepts); 138 expRO->parent->parent->concepts = psMetadataCopy(expRO->parent->parent->concepts, 139 outRO->parent->concepts); 140 expRO->parent->parent->parent->concepts = psMetadataCopy(expRO->parent->parent->parent->concepts, 141 outRO->parent->parent->parent->concepts); 142 143 126 144 return true; 127 145 }
Note:
See TracChangeset
for help on using the changeset viewer.
