Changeset 34531
- Timestamp:
- Oct 12, 2012, 4:12:45 PM (14 years ago)
- Location:
- branches/czw_branch/20120906
- Files:
-
- 8 edited
-
ippScripts/scripts/stack_skycell.pl (modified) (2 diffs)
-
ippconfig/gpc1/pswarp.config (modified) (1 diff)
-
ippconfig/recipes/filerules-mef.mdc (modified) (2 diffs)
-
ippconfig/recipes/filerules-simple.mdc (modified) (2 diffs)
-
ippconfig/recipes/filerules-split.mdc (modified) (2 diffs)
-
ppStack/src/ppStackCombineFinal.c (modified) (3 diffs)
-
ppStack/src/ppStackCombinePrepare.c (modified) (2 diffs)
-
ppStack/src/ppStackFiles.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ippScripts/scripts/stack_skycell.pl
r32562 r34531 229 229 my $sources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $file->{path_base}); # Sources name 230 230 231 my $bkgmodel = $ipprc->filename("PSWARP.OUTPUT.BKGMODEL", $file->{path_base}); 232 231 233 &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image ); 232 234 &my_die("Mask $mask does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $mask ); … … 240 242 print $listFile "\tPSF\tSTR\t" . $psf . "\n" if $convolve; 241 243 print $listFile "\tSOURCES\tSTR\t" . $sources . "\n"; 244 print $listFile "\tBKGMODEL\tSTR\t" . $bkgmodel . "\n" if $ipprc->file_exists( $bkgmodel ); 242 245 243 246 print $listFile "END\n\n"; -
branches/czw_branch/20120906/ippconfig/gpc1/pswarp.config
r19094 r34531 1 1 ASTROM.SOURCE STR PSASTRO.OUTPUT # Source file rule for astrometry, or NULL 2 BACKGROUND.MODEL BOOL TRUE 3 BKG.XGRID S32 50 4 BKG.YGRID S32 50 -
branches/czw_branch/20120906/ippconfig/recipes/filerules-mef.mdc
r34412 r34531 125 125 PPSTACK.INPUT.PSF INPUT @FILES CHIP PSF 126 126 PPSTACK.INPUT.SOURCES INPUT @FILES FPA CMF 127 PPSTACK.INPUT.BKGMODEL INPUT @FILES FPA IMAGE 127 128 128 129 ## files used by ppstamp … … 311 312 PPSTACK.OUTPUT.JPEG1 OUTPUT {OUTPUT}.b1.jpg JPEG NONE FPA TRUE NONE 312 313 PPSTACK.OUTPUT.JPEG2 OUTPUT {OUTPUT}.b2.jpg JPEG NONE FPA TRUE NONE 314 PPSTACK.OUTPUT.BKGMODEL OUTPUT {OUTPUT}.mdl.fits IMAGE NONE FPA TRUE NONE 315 PPSTACK.OUTPUT.BKGREST OUTPUT {OUTPUT}.bkgrest.fits IMAGE NONE FPA TRUE NONE 313 316 PPSTACK.CONFIG OUTPUT {OUTPUT}.ppStack.mdc TEXT NONE FPA TRUE NONE 314 317 -
branches/czw_branch/20120906/ippconfig/recipes/filerules-simple.mdc
r34412 r34531 107 107 PPSTACK.INPUT.PSF INPUT @FILES CHIP PSF 108 108 PPSTACK.INPUT.SOURCES INPUT @FILES FPA CMF 109 PPSTACK.INPUT.BKGMODEL INPUT @FILES FPA IMAGE 109 110 110 111 ## files used by ppstamp … … 291 292 PPSTACK.OUTPUT.JPEG1 OUTPUT {OUTPUT}.b1.jpg JPEG NONE FPA TRUE NONE 292 293 PPSTACK.OUTPUT.JPEG2 OUTPUT {OUTPUT}.b2.jpg JPEG NONE FPA TRUE NONE 294 PPSTACK.OUTPUT.BKGMODEL OUTPUT {OUTPUT}.mdl.fits IMAGE NONE FPA TRUE NONE 295 PPSTACK.OUTPUT.BKGREST OUTPUT {OUTPUT}.bkgrest.fits IMAGE NONE FPA TRUE NONE 293 296 PPSTACK.CONFIG OUTPUT {OUTPUT}.ppStack.mdc TEXT NONE FPA TRUE NONE 294 297 -
branches/czw_branch/20120906/ippconfig/recipes/filerules-split.mdc
r34455 r34531 127 127 PPSTACK.INPUT.PSF INPUT @FILES CHIP PSF 128 128 PPSTACK.INPUT.SOURCES INPUT @FILES FPA CMF 129 PPSTACK.INPUT.BKGMODEL INPUT @FILES FPA IMAGE 129 130 130 131 ## files used by ppstamp … … 324 325 PPSTACK.OUTPUT.JPEG1 OUTPUT {OUTPUT}.b1.jpg JPEG NONE FPA TRUE NONE 325 326 PPSTACK.OUTPUT.JPEG2 OUTPUT {OUTPUT}.b2.jpg JPEG NONE FPA TRUE NONE 327 PPSTACK.OUTPUT.BKGMODEL OUTPUT {OUTPUT}.mdl.fits IMAGE NONE FPA TRUE NONE 328 PPSTACK.OUTPUT.BKGREST OUTPUT {OUTPUT}.bkgrest.fits IMAGE NONE FPA TRUE NONE 326 329 PPSTACK.CONFIG OUTPUT {OUTPUT}.ppStack.mdc TEXT NONE FPA TRUE NONE 327 330 -
branches/czw_branch/20120906/ppStack/src/ppStackCombineFinal.c
r34516 r34531 15 15 16 16 psArray *inputs = psArrayAlloc(options->num); 17 // const psArray *cells = options->cells;18 17 for (int i = 0; i < options->num; i++) { 19 18 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, true, i); … … 23 22 inputs->data[i] = ro; 24 23 pmFPAfileClose(file,view); 25 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, false, i);26 24 } 27 25 if (!pmStackSimpleMedianCombine(bkgRO,inputs)) { … … 29 27 return(false); 30 28 } 31 /* for (int i = 0; i < options->num; i++) { */ 32 /* // ppStackFilesIterateUp(config); */ 33 /* /\* pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); *\/ */ 34 /* /\* pmFPAview *view = ppStackFilesIterateDown(config); *\/ */ 35 /* pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); */ 36 37 /* ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, false, i); */ 38 /* } */ 29 if (!ppStackWriteImage("/tmp/test_forced.bkgmdl.fits", 30 bkgRO->parent->parent->parent->hdu->header, 31 bkgRO->image, 32 config)) { 33 fprintf(stderr,"Failed to write image because fail.\n"); 34 } 35 36 for (int i = 0; i < options->num; i++) { 37 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); 38 pmFPAview *view = ppStackFilesIterateDown(config); 39 bool success = pmFPAfileClose(file,view); 40 if (!success) { 41 psTrace("ppStack",5,"I failed at closing a file.\n"); 42 } 43 44 psFitsClose(file->fits); 45 file->fits = NULL; 46 file->header = NULL; 47 file->state = PM_FPA_STATE_CLOSED; 48 file->wrote_phu = false; 49 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, false, i); 50 } 39 51 psFree(inputs); 40 // psFree(stack->bkgFits);41 52 bkgRO->data_exists = true; 53 bkgRO->parent->data_exists = true; 54 bkgRO->parent->parent->data_exists = true; 42 55 return(true); 43 56 } -
branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c
r34516 r34531 31 31 32 32 pmCell *bkgCell; 33 int bkg_r0,bkg_c0; 34 int bkg_nC,bkg_nR; 33 35 if (bkgName) { 36 ppStackFileActivationSingle(config, PPSTACK_FILES_BKG, true, 0); 37 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", 0); 38 pmFPAview *view = ppStackFilesIterateDown(config); 39 pmReadout *ro = pmFPAviewThisReadout(view,file->fpa); 40 41 bkg_r0 = ro->image->row0; 42 bkg_c0 = ro->image->col0; 43 bkg_nC = ro->image->numCols; 44 bkg_nR = ro->image->numRows; 34 45 bkgCell = pmFPAfileThisCell(config->files, view, bkgName); // Bkg cell 46 35 47 options->bkgRO = pmReadoutAlloc(bkgCell); // BKG readout 48 // if (!pmHDUGenerateForFPA(options->bkgRO->parent->parent->parent)) { 49 options->bkgRO->parent->parent->parent->hdu = pmHDUAlloc(NULL); 50 if (!options->bkgRO->parent->parent->parent->hdu) { 51 fprintf(stderr,"failed to generate a HDU for this thing.\n"); 52 } 53 options->bkgRO->parent->parent->parent->hdu->header = psMetadataCopy(options->bkgRO->parent->parent->parent->hdu->header, 54 ro->parent->parent->parent->hdu->header); 55 56 options->bkgRO->parent->concepts = psMetadataCopy(options->bkgRO->parent->concepts, 57 ro->parent->concepts); 58 options->bkgRO->parent->parent->concepts = psMetadataCopy(options->bkgRO->parent->parent->concepts, 59 ro->parent->parent->concepts); 60 options->bkgRO->parent->parent->parent->concepts = psMetadataCopy(options->bkgRO->parent->parent->parent->concepts, 61 ro->parent->parent->parent->concepts); 36 62 } 37 63 … … 54 80 55 81 if (bkgName) { 56 if (!pmReadoutStackDefineOutput(options->bkgRO, col0, row0, numCols, numRows, false, false, 0)) {82 if (!pmReadoutStackDefineOutput(options->bkgRO, bkg_c0, bkg_r0, bkg_nC, bkg_nR, false, false, 0)) { 57 83 psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to prepare output."); 58 84 return false; -
branches/czw_branch/20120906/ppStack/src/ppStackFiles.c
r34516 r34531 92 92 for (int i = 0; files[i] != NULL; i++) { 93 93 pmFPAfileActivate(config->files, state, files[i]); 94 fprintf(stderr,"ACTIVE: %d %s %d\n",i,files[i],state);95 94 } 96 95 return;
Note:
See TracChangeset
for help on using the changeset viewer.
