- Timestamp:
- Jun 19, 2013, 10:21:44 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 10 edited
-
ippScripts/scripts/chip_imfile.pl (modified) (3 diffs)
-
ippconfig/gpc1/ppImage.config (modified) (10 diffs)
-
ippconfig/recipes/ppImage.config (modified) (3 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 diff)
-
ppImage/src/Makefile.am (modified) (1 diff)
-
ppImage/src/burnparams.h (added)
-
ppImage/src/burntool.h (added)
-
ppImage/src/ppImage.h (modified) (2 diffs)
-
ppImage/src/ppImageArguments.c (modified) (1 diff)
-
ppImage/src/ppImageBurntoolApply.c (added)
-
ppImage/src/ppImageDetrendReadout.c (modified) (2 diffs)
-
ppImage/src/ppImageOptions.c (modified) (2 diffs)
-
ppImage/src/ppImageParseCamera.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r35668 r35685 228 228 ## XXX make the feature more general? 229 229 my $useDeburnedImage = metadataLookupBool($recipeData, 'USE.DEBURNED.IMAGE'); 230 my $ppImageApplyBurntool = metadataLookupBool($recipeData, 'APPLY.BURNTOOL'); 231 my $burntoolArgument; 230 232 231 233 if ($useDeburnedImage) { … … 328 330 } 329 331 330 ## We now know that we have an image that has been burntooled. 331 my ($tempFile, $tempName) = tempfile( "/tmp/chip.$exp_id.$class_id.deburned.XXXX", 332 # if recipe option to have ppImage apply burntool is set and the burntool information is store in 333 # an external table, check the existence of that table file and set $burntoolArgument. 334 # If burntool state does not match fall through to the code that uses the burntool program 335 if ($ppImageApplyBurntool && ($burntoolState == -1 * $burntoolStateGood)) { 336 my $burntoolTable_uri = $uri; 337 $burntoolTable_uri =~ s/fits$/burn.tbl/; 338 my $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 339 if ((!$burntoolTable_uriReal)||(!($ipprc->file_exists($burntoolTable_uri)))) { 340 my $repair_cmd = "$nebrepair $burntoolTable_uri"; 341 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 342 unless ($repair_success) { 343 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 344 } 345 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 346 } 347 unless ($ipprc->file_exists($burntoolTable_uri)) { 348 # Catch errors here 349 &my_die("Couldn't find burntool table: $burntoolTable_uri",$exp_id,$chip_id,$class_id, $PS_EXIT_SYS_ERROR); 350 } 351 $burntoolArgument = " -burntool $burntoolTable_uri"; 352 } else { 353 354 ## We now know that we have an image that has been burntooled. 355 my ($tempFile, $tempName) = tempfile( "/tmp/chip.$exp_id.$class_id.deburned.XXXX", 332 356 UNLINK => !$save_temps, SUFFIX => '.fits' ); 333 357 334 # get the UNIX version of the (possible) neb: or path: filename 335 my $uriReal = $ipprc->file_resolve( $uri ); 336 # Catch errors here 337 if (!$uriReal) { 338 my $repair_cmd = "$nebrepair $uri"; 339 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 340 unless ($repair_success) { 341 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 342 } 343 $uriReal = $ipprc->file_resolve( $uri ); 344 } 345 346 &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal; 347 348 # funpack into the temp file. 349 my $funpack_cmd = "$funpack -S $uriReal > $tempName"; 350 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 351 unless ($success) { 352 # Catch errors here 353 my $repair_cmd = "$nebrepair $uri"; 354 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 355 unless ($repair_success) { 356 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 357 } 358 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 359 } 360 unless ($success) { 361 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 362 &my_die("Unable to perform funpack: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 363 } 364 365 ## Construct commands to apply the pre-calculated burntool trailfits to the pixel data. 366 my ($burntoolTable_uri, $burntoolTable_uriReal); 367 my $burntool_cmd = "$burntool "; 368 369 if ($burntoolState == -1 * $burntoolStateGood) { # Burntool information stored in an external table. 370 $burntoolTable_uri = $uri; 371 $burntoolTable_uri =~ s/fits$/burn.tbl/; 372 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 373 if ((!$burntoolTable_uriReal)||(!($ipprc->file_exists($burntoolTable_uri)))) { 374 my $repair_cmd = "$nebrepair $burntoolTable_uri"; 375 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 376 unless ($repair_success) { 377 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 378 } 379 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 380 } 381 unless ($ipprc->file_exists($burntoolTable_uri)) { 382 # Catch errors here 383 &my_die("Couldn't find burntool table: $burntoolTable_uri",$exp_id,$chip_id,$class_id, $PS_EXIT_SYS_ERROR); 384 } 385 386 $burntool_cmd .= "$tempName in=${burntoolTable_uriReal} persist=t apply=t"; 387 } 388 elsif ($burntoolState == $burntoolStateGood) { # Burntool information stored in a header table. 389 $burntool_cmd .= "$tempName persist=t apply=t"; 390 } 391 else { 392 &my_die("Image data not properly burntooled, impossible state", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 393 } 394 395 ## Run burntool to change the pixels of tempfile, and repoint $uri to that file. 396 ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = 397 run(command => $burntool_cmd, verbose => $verbose); 398 unless ($success) { 399 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 400 &my_die("Unable to perform burntool: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 401 } 402 403 $uri = $tempName; 404 unless ($ipprc->file_exists($uri)) { 405 &my_die("Couldn't find deburned input file: $uri\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 406 } 407 408 # print STDERR "$uri $uriReal $tempName $burntoolTable_uri $burntoolTable_uriReal $burntool_cmd $save_temps\n"; 409 # exit(100); 358 # get the UNIX version of the (possible) neb: or path: filename 359 my $uriReal = $ipprc->file_resolve( $uri ); 360 # Catch errors here 361 if (!$uriReal) { 362 my $repair_cmd = "$nebrepair $uri"; 363 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 364 unless ($repair_success) { 365 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 366 } 367 $uriReal = $ipprc->file_resolve( $uri ); 368 } 369 370 &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal; 371 372 # funpack into the temp file. 373 my $funpack_cmd = "$funpack -S $uriReal > $tempName"; 374 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 375 unless ($success) { 376 # Catch errors here 377 my $repair_cmd = "$nebrepair $uri"; 378 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 379 unless ($repair_success) { 380 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 381 } 382 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $funpack_cmd, verbose => $verbose); 383 } 384 unless ($success) { 385 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 386 &my_die("Unable to perform funpack: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 387 } 388 389 ## Construct commands to apply the pre-calculated burntool trailfits to the pixel data. 390 my ($burntoolTable_uri, $burntoolTable_uriReal); 391 my $burntool_cmd = "$burntool "; 392 393 if ($burntoolState == -1 * $burntoolStateGood) { # Burntool information stored in an external table. 394 $burntoolTable_uri = $uri; 395 $burntoolTable_uri =~ s/fits$/burn.tbl/; 396 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 397 if ((!$burntoolTable_uriReal)||(!($ipprc->file_exists($burntoolTable_uri)))) { 398 my $repair_cmd = "$nebrepair $burntoolTable_uri"; 399 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose); 400 unless ($repair_success) { 401 &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR); 402 } 403 $burntoolTable_uriReal = $ipprc->file_resolve( $burntoolTable_uri ); 404 } 405 unless ($ipprc->file_exists($burntoolTable_uri)) { 406 # Catch errors here 407 &my_die("Couldn't find burntool table: $burntoolTable_uri",$exp_id,$chip_id,$class_id, $PS_EXIT_SYS_ERROR); 408 } 409 410 $burntool_cmd .= "$tempName in=${burntoolTable_uriReal} persist=t apply=t"; 411 } 412 elsif ($burntoolState == $burntoolStateGood) { # Burntool information stored in a header table. 413 $burntool_cmd .= "$tempName persist=t apply=t"; 414 } 415 else { 416 &my_die("Image data not properly burntooled, impossible state", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 417 } 418 419 ## Run burntool to change the pixels of tempfile, and repoint $uri to that file. 420 ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = 421 run(command => $burntool_cmd, verbose => $verbose); 422 unless ($success) { 423 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 424 &my_die("Unable to perform burntool: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 425 } 426 427 $uri = $tempName; 428 unless ($ipprc->file_exists($uri)) { 429 &my_die("Couldn't find deburned input file: $uri\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR); 430 } 431 432 # print STDERR "$uri $uriReal $tempName $burntoolTable_uri $burntoolTable_uriReal $burntool_cmd $save_temps\n"; 433 # exit(100); 434 } 410 435 } 411 436 … … 483 508 $command .= " -R PPIMAGE.CHIP FITS.TYPE NONE"; 484 509 } 510 $command .= $burntoolArgument if $burntoolArgument; 485 511 $command .= " -threads $threads" if defined $threads; 486 512 $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id; -
trunk/ippconfig/gpc1/ppImage.config
r35531 r35685 21 21 USE.DEBURNED.IMAGE BOOL TRUE # use burntool-repaired image? 22 22 USE.BEST.BURNTOOL BOOL TRUE # require the best burntooled data 23 MASK.BURNTOOL BOOL FALSE # Mask potential burntool trails23 MASK.BURNTOOL BOOL FALSE # Mask potential burntool trails 24 24 TILTYSTREAK.APPLY BOOL FALSE # apply the 'tiltystreak' tool 25 25 NOISEMAP BOOL FALSE # Apply read noise map 26 27 APPLY.BURNTOOL BOOL TRUE # apply burntool correction in ppImage 26 28 27 29 # Final detrending options … … 30 32 USE.VIDEO.MASK BOOL TRUE # Use a video mask if we have video data? 31 33 32 # aditional auxil lary mask applied to corners of all chips in video cells.34 # aditional auxiliary mask applied to corners of all chips in video cells. 33 35 # Is only applied if MASK.AUXMASK and USE.VIDEO.MASK are both true 34 36 AUX.VIDEO.MASK STR neb://any/gpc1/auxmask/mpg.20130506/mask_video_cell_corners.fits … … 153 155 FRINGE.FILTERS STR y.00000 154 156 155 # Standard chip processing (NOTE: when changing this be sure to check whether changes should be applied toCHIP_BGPRESEVE and/or CHIP_AUXMASK 157 # Standard chip processing (NOTE: when changing this be sure to check whether changes should be applied to 158 # CHIP_PRESERVE_BG CHIP_AUXMASK or CHIP_PRESERVE_BG_AUXMASK 156 159 CHIP METADATA 157 160 BASE.FITS BOOL FALSE # Save base detrended image? … … 172 175 MASK.BUILD BOOL TRUE # Build internal mask? 173 176 MASK.BURNTOOL BOOL TRUE # Mask potential burntool trails 174 MASK.AUXMASK BOOL FALSE # augment with more restrictive auxillary mask177 MASK.AUXMASK BOOL FALSE # augment mask with more restrictive auxiliary mask 175 178 PATTERN.ROW BOOL TRUE # Row pattern correction 176 179 PATTERN.CELL BOOL FALSE # Cell pattern correction … … 1224 1227 END 1225 1228 1226 # Standard chip processing + auxil lary mask1229 # Standard chip processing + auxiliary mask 1227 1230 CHIP_AUXMASK METADATA 1228 1231 BASE.FITS BOOL FALSE # Save base detrended image? … … 1243 1246 MASK.BUILD BOOL TRUE # Build internal mask? 1244 1247 MASK.BURNTOOL BOOL TRUE # Mask potential burntool trails 1245 MASK.AUXMASK BOOL TRUE # augment with more restrictive auxillary mask1248 MASK.AUXMASK BOOL TRUE # augment mask with more restrictive auxiliary mask 1246 1249 PATTERN.ROW BOOL TRUE # Row pattern correction 1247 1250 PATTERN.CELL BOOL FALSE # Cell pattern correction … … 1255 1258 BACKGROUND BOOL TRUE # Subtract background? 1256 1259 CROSSTALK.MEASURE BOOL TRUE # Subtract model background? 1257 END 1258 1259 # Standard chip processing without any background removal 1260 NO.COMPRESS BOOL TRUE # turn off image compression 1261 END 1262 1263 # Standard chip processing without background subtraction or pattern correction 1260 1264 CHIP_PRESERVE_BG METADATA 1261 1265 BASE.FITS BOOL FALSE # Save base detrended image? … … 1269 1273 BIAS BOOL FALSE # Bias subtraction 1270 1274 DARK BOOL TRUE # Dark subtraction 1271 NOISEMAP BOOL FALSE1275 NOISEMAP BOOL TRUE 1272 1276 REMNANCE BOOL FALSE # Remnance masking 1273 1277 SHUTTER BOOL FALSE # Shutter correction … … 1276 1280 MASK.BUILD BOOL TRUE # Build internal mask? 1277 1281 MASK.BURNTOOL BOOL TRUE # Mask potential burntool trails 1278 MASK.AUXMASK BOOL TRUE # augment with more restrictive auxillary mask1282 MASK.AUXMASK BOOL FALSE # augment mask with more restrictive auxiliary mask 1279 1283 PATTERN.ROW BOOL FALSE # Row pattern correction 1280 1284 PATTERN.CELL BOOL FALSE # Cell pattern correction 1285 PATTERN.CONTINUITY BOOL FALSE # Cell pattern coorection using edge continuity 1281 1286 FRINGE BOOL TRUE # Fringe subtraction 1282 1287 BIN1.FITS BOOL TRUE # Save 1st binned chip image? … … 1287 1292 BACKGROUND BOOL FALSE # Subtract background? 1288 1293 CROSSTALK.MEASURE BOOL TRUE # Subtract model background? 1294 END 1295 1296 # Standard chip processing without background subtraction, pattern correction, or photometry bug applying auxiliary mask 1297 CHIP_PRESERVE_BG_AUXMASK METADATA 1298 BASE.FITS BOOL FALSE # Save base detrended image? 1299 BASE.MASK.FITS BOOL FALSE # Save base detrended image? 1300 BASE.VARIANCE.FITS BOOL FALSE # Save base detrended image? 1301 CHIP.FITS BOOL TRUE # Save chip-mosaic-ed image? 1302 CHIP.MASK.FITS BOOL TRUE # Save chip-mosaic-ed image? 1303 CHIP.VARIANCE.FITS BOOL TRUE # Save chip-mosaic-ed image? 1304 OVERSCAN BOOL TRUE # Overscan subtraction 1305 NONLIN BOOL TRUE # apply non-linearity correction 1306 BIAS BOOL FALSE # Bias subtraction 1307 DARK BOOL TRUE # Dark subtraction 1308 NOISEMAP BOOL TRUE 1309 REMNANCE BOOL FALSE # Remnance masking 1310 SHUTTER BOOL FALSE # Shutter correction 1311 FLAT BOOL TRUE # Flat-field normalisation 1312 MASK BOOL TRUE # Mask bad pixels 1313 MASK.BUILD BOOL TRUE # Build internal mask? 1314 MASK.BURNTOOL BOOL TRUE # Mask potential burntool trails 1315 MASK.AUXMASK BOOL TRUE # augment mask with more restrictive auxiliary mask 1316 PATTERN.ROW BOOL FALSE # Row pattern correction 1317 PATTERN.CELL BOOL FALSE # Cell pattern correction 1318 PATTERN.CONTINUITY BOOL TRUE # Cell pattern coorection using edge continuity 1319 FRINGE BOOL TRUE # Fringe subtraction 1320 BIN1.FITS BOOL TRUE # Save 1st binned chip image? 1321 BIN2.FITS BOOL TRUE # Save 2nd binned chip image? 1322 PHOTOM BOOL FALSE # Source identification and photometry 1323 ASTROM.CHIP BOOL FALSE # Astrometry per chip? 1324 ASTROM.MOSAIC BOOL FALSE # Astrometry for mosaic? 1325 BACKGROUND BOOL FALSE # Subtract background? 1326 CROSSTALK.MEASURE BOOL TRUE # Subtract model background? 1327 NO.COMPRESS BOOL TRUE # turn off image compression 1289 1328 END 1290 1329 -
trunk/ippconfig/recipes/ppImage.config
r35531 r35685 18 18 MASK.BURNTOOL BOOL FALSE # Mask potential burntool trails 19 19 MASK.AUXMASK BOOL FALSE # augment mask with auxillary mask 20 AUX.VIDEO.MASK STR NULL 20 AUX.VIDEO.MASK STR NULL # name of aditional masking for video cells 21 APPLY.BURNTOOL BOOL FALSE # apply burntool coorection 21 22 VARIANCE.BUILD BOOL FALSE # Build internal variance image 22 23 ADDNOISE BOOL FALSE # Add noise to degrade an MD image to a 3pi image? … … 47 48 TILTYSTREAK.BY.CLASS METADATA # apply the 'tiltystreak' tool 48 49 END 50 NO.COMPRESS BOOL FALSE 49 51 50 52 # output data formats to save … … 2139 2141 MASK BOOL TRUE # Mask bad pixels 2140 2142 MASK.BUILD BOOL TRUE # Build internal mask? 2143 PATTERN.ROW BOOL FALSE # Subtract pattern noise 2144 PATTERN.CELL BOOL FALSE # Subtract pattern noise 2145 FRINGE BOOL TRUE # Fringe subtraction 2146 BIN1.FITS BOOL TRUE # Save 1st binned chip image? 2147 BIN2.FITS BOOL TRUE # Save 2nd binned chip image? 2148 PHOTOM BOOL TRUE # Source identification and photometry 2149 ASTROM.CHIP BOOL FALSE # Astrometry per chip? 2150 ASTROM.MOSAIC BOOL FALSE # Astrometry for mosaic? 2151 BACKGROUND BOOL FALSE # Subtract background? 2152 MASK.STATS BOOL TRUE # Calculate Mask statistics 2153 END 2154 2155 # Standard chip processing with auxiliary mask but without any background removal or pattern correction 2156 CHIP_PRESERVE_BG_AUXMASK METADATA 2157 BASE.FITS BOOL FALSE # Save base detrended image? 2158 BASE.MASK.FITS BOOL FALSE # Save base detrended image? 2159 BASE.VARIANCE.FITS BOOL FALSE # Save base detrended image? 2160 CHIP.FITS BOOL TRUE # Save chip-mosaic-ed image? 2161 CHIP.MASK.FITS BOOL TRUE # Save chip-mosaic-ed image? 2162 CHIP.VARIANCE.FITS BOOL TRUE # Save chip-mosaic-ed image? 2163 OVERSCAN BOOL TRUE # Overscan subtraction 2164 NONLIN BOOL FALSE # Overscan subtraction 2165 BIAS BOOL TRUE # Bias subtraction 2166 DARK BOOL TRUE # Dark subtraction 2167 SHUTTER BOOL FALSE # Shutter correction 2168 FLAT BOOL TRUE # Flat-field normalisation 2169 MASK BOOL TRUE # Mask bad pixels 2170 MASK.BUILD BOOL TRUE # Build internal mask? 2171 MASK.AUXMASK BOOL TRUE # augment mask with more restrictive auxiliary mask 2141 2172 PATTERN.ROW BOOL FALSE # Subtract pattern noise 2142 2173 PATTERN.CELL BOOL FALSE # Subtract pattern noise -
trunk/ippconfig/recipes/reductionClasses.mdc
r35581 r35685 1047 1047 END 1048 1048 1049 M31_ DATASET METADATA1049 M31_BG_SUBTRACT METADATA 1050 1050 CHIP_PPIMAGE STR CHIP_AUXMASK 1051 1051 CHIP_PSPHOT STR CHIP 1052 WARP_PSWARP STR WARP 1052 WARP_PSWARP STR WARP_NOCOMPRESS 1053 STACK_PPSTACK STR STACK 1054 STACK_PPSUB STR STACK 1055 STACK_PSPHOT STR STACK 1056 DIFF_PPSUB STR DIFF 1057 DIFF_PSPHOT STR DIFF 1058 JPEG_BIN1 STR PPIMAGE_J1 1059 JPEG_BIN2 STR PPIMAGE_J2 1060 FAKEPHOT STR FAKEPHOT 1061 ADDSTAR STR ADDSTAR 1062 PSASTRO STR DEFAULT_RECIPE 1063 STACKPHOT_PSPHOT STR STACKPHOT 1064 STACKPHOT_PPSUB STR STACKPHOT 1065 STACKPHOT_PPSTACK STR STACKPHOT 1066 STACKPHOT_SINGLE_PSPHOT STR STACKPHOT_SINGLE 1067 BACKGROUND_PPBACKGROUND STR BACKGROUND 1068 BACKGROUND_PSWARP STR BACKGROUND 1069 PSVIDEOPHOT STR PSVIDEOPHOT 1070 STATICSKY_CALIBRATION STR STATICSKY_CAL 1071 END 1072 1073 M31_BG_PRESERVE METADATA 1074 CHIP_PPIMAGE STR CHIP_PRESERVE_BG_AUXMASK 1075 CHIP_PSPHOT STR CHIP 1076 WARP_PSWARP STR WARP_NOCOMPRESS 1053 1077 STACK_PPSTACK STR STACK 1054 1078 STACK_PPSUB STR STACK -
trunk/ppImage/src/Makefile.am
r35531 r35685 66 66 ppImageAddNoise.c \ 67 67 ppImageRandomGaussian.c \ 68 ppImageAuxiliaryMask.c 68 ppImageAuxiliaryMask.c \ 69 ppImageBurntoolApply.c 69 70 70 71 CLEANFILES = *~ -
trunk/ppImage/src/ppImage.h
r35533 r35685 26 26 bool doMaskBuild; // Build internal mask 27 27 bool doVarianceBuild; // Build internal variance map 28 bool doApplyBurntool; // apply burntool correction 28 29 bool doMaskBurntool; // mask potential burntool trails 29 30 bool doMaskSat; // mask saturated pixels … … 182 183 bool ppImageCheckNoise(pmConfig *config, ppImageOptions *options, pmFPAview *view); 183 184 184 bool ppImageBurntoolMask(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *mask); 185 bool ppImageBurntoolMask(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *readout); 186 bool ppImageBurntoolMaskFromTable(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *readout); 187 188 bool ppImageBurntoolApply(pmConfig *config, ppImageOptions *options, pmFPAview *view, pmReadout *readout); 185 189 186 190 bool ppImageDetrendPatternApply(pmConfig *config, pmChip *chip, const pmFPAview *inputView, const ppImageOptions *options); -
trunk/ppImage/src/ppImageArguments.c
r31155 r35685 117 117 pmConfigFileSetsMD (config->arguments, &argc, argv, "LINEARITY", "-linearity", "-linearlist"); 118 118 119 if ((argnum = psArgumentGet(argc, argv, "-burntool"))) { 120 psArgumentRemove(argnum, &argc, argv); 121 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "BURNTOOL.TABLE", PS_META_REPLACE, "", argv[argnum]); 122 psArgumentRemove(argnum, &argc, argv); 123 } 124 119 125 // chip selection is used to limit chips to be processed 120 126 if ((argnum = psArgumentGet (argc, argv, "-chip"))) { -
trunk/ppImage/src/ppImageDetrendReadout.c
r35531 r35685 56 56 } 57 57 done_video_check: 58 58 59 59 // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine. 60 60 if (options->doMaskBuild) { … … 74 74 pmMaskBadPixels(input, mask, options->maskValue); 75 75 } 76 77 if (options->doApplyBurntool) 78 { 79 // extern bool ppImageBurntoolApply(pmConfig *, ppImageOptions *, pmFPAview *, pmReadout *); 80 ppImageBurntoolApply(config, options, view, input); 81 } 82 76 83 if (options->doMaskBurntool) { 77 ppImageBurntoolMask(config,options,view,input); 84 if (options->doApplyBurntool) { 85 // build burntool mask from data input burntool table 86 ppImageBurntoolMaskFromTable(config,options,view,input); 87 } else { 88 // build burntool mask from data in the input image's fits extension 89 ppImageBurntoolMask(config,options,view,input); 90 } 78 91 } 79 92 -
trunk/ppImage/src/ppImageOptions.c
r35531 r35685 23 23 options->doMaskLow = false; // mask low pixels 24 24 options->doMaskBurntool = false; // mask potential burntool trails 25 options->doApplyBurntool = false; // apply burntool correction 25 26 options->doVarianceBuild = false; // Build internal variance 26 27 options->doMask = false; // Mask bad pixels … … 231 232 options->doMaskLow = psMetadataLookupBool(NULL, recipe, "MASK.LOW"); 232 233 options->doMaskBurntool = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL"); 234 options->doApplyBurntool = psMetadataLookupBool(NULL, recipe, "APPLY.BURNTOOL"); 233 235 options->doVarianceBuild = psMetadataLookupBool(NULL, recipe, "VARIANCE.BUILD"); 234 236 options->doAuxMask = psMetadataLookupBool(NULL, recipe, "MASK.AUXMASK"); -
trunk/ppImage/src/ppImageParseCamera.c
r35557 r35685 184 184 } 185 185 outCTE->save = true; 186 } 187 if (options->doApplyBurntool) { 188 // If no burntool file was supplied do not fail. (camera_exp.pl does not supply it 189 // for example. 190 if (!psMetadataLookupStr(NULL, config->arguments, "BURNTOOL.TABLE")) { 191 psWarning("BURNTOOL.TABLE not supplied setting doApplyBurntool to false"); 192 options->doApplyBurntool = false; 193 } 186 194 } 187 195
Note:
See TracChangeset
for help on using the changeset viewer.
