Changeset 23723
- Timestamp:
- Apr 7, 2009, 12:27:23 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 6 edited
-
ippScripts/scripts/diff_skycell.pl (modified) (8 diffs)
-
ippTools/src/difftool.c (modified) (1 diff)
-
ippTools/src/difftoolConfig.c (modified) (1 diff)
-
ippconfig/recipes/ppSub.config (modified) (2 diffs)
-
ppSub/src/ppSubArguments.c (modified) (1 diff)
-
ppSub/src/ppSubCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ippScripts/scripts/diff_skycell.pl
r23688 r23723 95 95 my $tess_id; # Tesselation identifier 96 96 my $camera; # Camera 97 my $magicked_0;98 my $ magicked_1;97 my ($inputMagic, $templateMagic); # Are the inputs been magicked? 98 my $inverse = 1; # Generate inverse subtraction if warp-warp 99 99 foreach my $file (@$files) { 100 100 if (defined $file->{template} and $file->{template}) { … … 106 106 $templateSources = "PSPHOT.OUT.CMF.MEF"; ## this must be consistent with the value in stack_skycell.pl:161 107 107 # template is a stack so it doesn't need to be magicked 108 $magicked_1 = 1; 108 $templateMagic = 1; 109 $inverse = 0; 109 110 ## use an explicit stack name for psphot output objects 110 111 } else { … … 112 113 $templateVariance = "PSWARP.OUTPUT.VARIANCE"; 113 114 $templateSources = "PSWARP.OUTPUT.SOURCES"; 114 $ magicked_1= $file->{magicked};115 $templateMagic = $file->{magicked}; 115 116 } 116 117 } else { 117 118 $input = $file->{uri}; 118 119 $inputPath = $file->{path_base}; 119 $ magicked_0= $file->{magicked}; # if input is a stack the output can't be "magicked"120 $inputMagic = $file->{magicked}; # if input is a stack the output can't be "magicked" 120 121 if ($file->{warp_id} == 0) { 121 122 $inputMask = "PPSTACK.OUTPUT.MASK"; 122 123 $inputVariance = "PPSTACK.OUTPUT.VARIANCE"; 123 124 $inputSources = "PSPHOT.OUT.CMF.MEF"; ## this must be consistent with the value in stack_skycell.pl:161 125 $inverse = 0; 124 126 } else { 125 127 $inputMask = "PSWARP.OUTPUT.MASK"; … … 145 147 $camera = $file->{camera}; 146 148 } 147 148 149 } 149 150 … … 158 159 # note that difftool -inputskyfile outputs the magicked boolean as an int not T or F 159 160 # because the output is constructed from a union of two selects 160 my $magicked = $ magicked_0 && $magicked_1;161 my $magicked = $inputMagic && $templateMagic; 161 162 162 163 # Recipes to use based on reduction class … … 207 208 my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outroot); 208 209 my $outputVariance = $ipprc->filename("PPSUB.OUTPUT.VARIANCE", $outroot); 210 my $outputSources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $outroot); 211 my $jpeg1Name = $ipprc->filename("PPSUB.JPEG1", $outroot); 212 my $jpeg2Name = $ipprc->filename("PPSUB.JPEG2", $outroot); 209 213 my $configuration = $ipprc->filename("PPSUB.CONFIG", $outroot); 210 my $outputSources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot);211 #my $bin1Name = $ipprc->filename("PPSUB.BIN1", $outroot);212 #my $bin2Name = $ipprc->filename("PPSUB.BIN2", $outroot);213 214 my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot); 214 215 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot); 216 217 my ($inverseName, $inverseMask, $inverseVariance, $inverseSources); 218 if ($inverse) { 219 $inverseName = $ipprc->filename("PPSUB.INVERSE", $outroot); 220 $inverseMask = $ipprc->filename("PPSUB.INVERSE.MASK", $outroot); 221 $inverseVariance = $ipprc->filename("PPSUB.INVERSE.VARIANCE", $outroot); 222 $inverseSources = $ipprc->filename("PPSUB.INVERSE.SOURCES", $outroot); 223 } 215 224 216 225 my $cmdflags; … … 236 245 $command .= " -F PSPHOT.BACKMDL PSPHOT.BACKMDL.MEF"; 237 246 $command .= " -photometry"; 247 $command .= " -inverse" if $inverse; 238 248 $command .= " -tracedest $traceDest -log $logDest"; 239 249 $command .= " -dumpconfig $configuration"; … … 271 281 &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 272 282 &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance); 273 # &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 274 # &my_die("Couldn't find expected output file: $bin1Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name); 275 # &my_die("Couldn't find expected output file: $bin2Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); 283 &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 284 &my_die("Couldn't find expected output file: $jpeg1Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg1Name); 285 &my_die("Couldn't find expected output file: $jpeg2Name", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg2Name); 286 if ($inverse) { 287 &my_die("Couldn't find expected output file: $inverseName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseName); 288 &my_die("Couldn't find expected output file: $inverseMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseMask); 289 &my_die("Couldn't find expected output file: $inverseVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseVariance); 290 &my_die("Couldn't find expected output file: $inverseSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseSources); 291 } 276 292 } 277 293 } -
branches/pap/ippTools/src/difftool.c
r23688 r23723 1275 1275 PXOPT_COPY_STR(config->args, selectWhere, "-input_label", "inputWarpRun.label", "=="); 1276 1276 PXOPT_COPY_STR(config->args, selectWhere, "-template_label", "templateWarpRun.label", "=="); 1277 PXOPT_COPY_F32(config->args, selectWhere, "-rotdiff", "ABS(inputRawExp.posang - templateRawExp.posang)", "<="); 1277 1278 PXOPT_COPY_F32(config->args, selectWhere, "-timediff", 1278 1279 "ABS(TIME_TO_SEC(TIMEDIFF(inputRawExp.dateobs, templateRawExp.dateobs)))", "<="); 1279 PXOPT_COPY_F32(config->args, selectWhere, "-rotdiff", "ABS(inputRawExp.posang - templateRawExp.posang)", "<="); 1280 1280 1281 // Haversine formula for great circle distance 1281 1282 PXOPT_COPY_F32(config->args, selectWhere, "-distance", 1282 1283 "DEGREES(2*ASIN(SQRT(POW(SIN(inputRawExp.decl - templateRawExp.decl),2) + COS(inputRawExp.decl)*COS(templateRawExp.decl)*POW(SIN(inputRawExp.ra - templateRawExp.ra),2))))", "<="); 1284 1285 PXOPT_LOOKUP_BOOL(backwards, config->args, "-backwards", false); 1286 1287 psMetadataAddF32(selectWhere, PS_LIST_TAIL, 1288 "TIME_TO_SEC(TIMEDIFF(inputRawExp.dateobs, templateRawExp.dateobs))", 1289 PS_META_DUPLICATE_OK, backwards ? "<" : ">", 0.0); 1283 1290 1284 1291 // Restrictions for inserting skycells -
branches/pap/ippTools/src/difftoolConfig.c
r23688 r23723 174 174 psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL); 175 175 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-timediff", 0, "limit time difference between input and template", NAN); 176 psMetadataAddBool(definewarpwarpArgs, PS_LIST_TAIL, "-backwards", 0, "Template comes after input?", false); 176 177 psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-rotdiff", 0, "limit rotator difference between input and template", NAN); 177 178 psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-input_label", 0, "search by warp label for input", NULL); -
branches/pap/ippconfig/recipes/ppSub.config
r23719 r23723 45 45 46 46 INVERSE BOOL FALSE # Generate inverse subtraction? 47 PHOTOMETRY BOOL FALSE # Perform photometry?47 PHOTOMETRY BOOL TRUE # Perform photometry? 48 48 49 49 … … 60 60 DIFF METADATA 61 61 END 62 63 # Difference of two warps 64 WARPWARP METADATA 65 INVERSE BOOL TRUE # Generate inverse subtraction? 66 END -
branches/pap/ppSub/src/ppSubArguments.c
r23719 r23723 75 75 psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads", 0); 76 76 psMetadataAddStr(arguments, PS_LIST_TAIL, "-dumpconfig", 0, "file to dump configuration to", NULL); 77 psMetadataAddBool(arguments, PS_LIST_TAIL, "-photometry", 0, "Perform photometry?", NULL); 78 psMetadataAddBool(arguments, PS_LIST_TAIL, "-inverse", 0, "Generate inverse subtractions?", NULL); 77 79 psMetadataAddBool(arguments, PS_LIST_TAIL, "-visual", 0, "Show diagnostic plots", NULL); 78 80 -
branches/pap/ppSub/src/ppSubCamera.c
r23719 r23723 202 202 return false; 203 203 } 204 if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) { 205 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 206 "Perform photometry?", true); 207 } 208 if (psMetadataLookupBool(NULL, config->arguments, "-inverse")) { 209 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "INVERSE", PS_META_REPLACE, 210 "Generate inverse subtractions?", true); 211 } 212 204 213 data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE"); 205 214 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY");
Note:
See TracChangeset
for help on using the changeset viewer.
