Changeset 34623
- Timestamp:
- Oct 29, 2012, 2:26:09 PM (14 years ago)
- Location:
- branches/czw_branch/20120906
- Files:
-
- 11 edited
-
ppSkycell/src/ppSkycellCamera.c (modified) (1 diff)
-
ppSkycell/src/ppSkycellLoop.c (modified) (4 diffs)
-
ppStack/src/ppStackCamera.c (modified) (1 diff)
-
ppStack/src/ppStackCleanup.c (modified) (1 diff)
-
ppStack/src/ppStackCombineFinal.c (modified) (3 diffs)
-
ppStack/src/ppStackCombinePrepare.c (modified) (2 diffs)
-
ppStack/src/ppStackFiles.c (modified) (1 diff)
-
ppStack/src/ppStackLoop.c (modified) (1 diff)
-
ppStack/src/ppStackThread.c (modified) (3 diffs)
-
ppStack/src/ppStackUpdateHeader.c (modified) (2 diffs)
-
psModules/src/camera/pmFPAfileIO.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ppSkycell/src/ppSkycellCamera.c
r28375 r34623 103 103 return false; 104 104 } 105 if (!pmFPAfileDefineOutput(data->config, NULL, "PPSKYCELL.BIN1")) { 105 pmFPAfile *bin1 = pmFPAfileDefineOutput(data->config, NULL, "PPSKYCELL.BIN1"); 106 if (!bin1) { 106 107 psError(psErrorCodeLast(), false, "Unable to define output."); 107 108 return false; 108 109 } 109 if (!pmFPAfileDefineOutput(data->config, NULL, "PPSKYCELL.BIN2")) { 110 pmFPAfile *bin2 = pmFPAfileDefineOutput(data->config, NULL, "PPSKYCELL.BIN2"); 111 if (!bin2) { 112 psError(psErrorCodeLast(), false, "Unable to define output."); 113 return false; 114 } 115 if (!pmFPAfileDefineOutput(data->config, bin1->fpa , "PPSKYCELL.BIN1.MASK")) { 116 psError(psErrorCodeLast(), false, "Unable to define output."); 117 return false; 118 } 119 if (!pmFPAfileDefineOutput(data->config, bin2->fpa, "PPSKYCELL.BIN2.MASK")) { 110 120 psError(psErrorCodeLast(), false, "Unable to define output."); 111 121 return false; -
branches/czw_branch/20120906/ppSkycell/src/ppSkycellLoop.c
r34458 r34623 249 249 psFree(view); 250 250 251 // data->maskVal = 1; 251 252 pmReadout *bin1RO = pmReadoutAlloc(NULL), *bin2RO = pmReadoutAlloc(NULL); // Binned readouts 252 253 if (!pmReadoutRebin(bin1RO, inRO, data->maskVal, data->bin1, data->bin1)) { … … 293 294 pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN1"); 294 295 pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN2"); 296 /* if (data->masksName) { */ 297 /* pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN1.MASK"); */ 298 /* pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN2.MASK"); */ 299 /* } */ 295 300 } 296 301 … … 400 405 fits1->fileIndex = i; 401 406 407 // Do the mask if we need to 408 /* if (data->masksName) { */ 409 /* pmFPAfile *Mask1 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.BIN1.MASK", 0); */ 410 /* Mask1->fpa->hdu = pmHDUAlloc(NULL); */ 411 /* Mask1->fpa->hdu->header = psMetadataAlloc(); */ 412 /* psMetadataCopy(Mask1->fpa->hdu->header,fits1->fpa->hdu->header); */ 413 /* pmChip *Mchip1 = pmFPAfileThisChip(data->config->files, view, "PPSKYCELL.BIN1.MASK"); */ 414 /* psMetadataAddS32(Mchip1->concepts,PS_LIST_TAIL,"CHIP.XPARITY", PS_META_REPLACE,"",1); */ 415 /* psMetadataAddS32(Mchip1->concepts,PS_LIST_TAIL,"CHIP.YPARITY", PS_META_REPLACE,"",1); */ 416 417 /* pmCell *Mcell1 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.BIN1.MASK"); // Rebinned cell 1 */ 418 /* /\* // This is a hack to get a functioning header created so the fits images can be written out. *\/ */ 419 /* psMetadataAddS32(Mcell1->concepts,PS_LIST_TAIL,"CELL.XPARITY", PS_META_REPLACE,"",1); */ 420 /* psMetadataAddS32(Mcell1->concepts,PS_LIST_TAIL,"CELL.YPARITY", PS_META_REPLACE,"",1); */ 421 /* psMetadataAddS32(Mcell1->concepts,PS_LIST_TAIL,"CELL.READDIR", PS_META_REPLACE,"",1); */ 422 423 /* pmReadout *Mro1 = pmReadoutAlloc(Mcell1); */ 424 /* Mro1->image = image1; */ 425 /* Mro1->mask = mask1; */ 426 /* Mro1->data_exists = Mcell1->data_exists = Mcell1->parent->data_exists = true; */ 427 428 /* Mask1->save = true; */ 429 /* Mask1->fileIndex = i; */ 430 /* } */ 431 432 433 402 434 // Repeat with second binned image 403 435 pmFPAfile *fits2 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.BIN2", 0); … … 447 479 fits2->save = true; 448 480 fits2->fileIndex = i; 481 482 449 483 } 450 484 -
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 } -
branches/czw_branch/20120906/psModules/src/camera/pmFPAfileIO.c
r34403 r34623 76 76 while ((item = psMetadataGetAndIncrement (iter)) != NULL) { 77 77 pmFPAfile *file = item->data.V; 78 79 78 switch (place) { 80 79 case PM_FPA_BEFORE:
Note:
See TracChangeset
for help on using the changeset viewer.
