Changeset 8493 for trunk/ippScripts/scripts/detrend_create_resid.pl
- Timestamp:
- Aug 22, 2006, 4:32:57 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_create_resid.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_create_resid.pl
r8491 r8493 17 17 }; 18 18 19 # Flags to specify the particular detrend to use 20 use constant DETRENDS => { 21 'bias' => '-bias', # Specify the bias frame 22 'dark' => '-dark', # Specify the dark frame 23 'flat' => '-flat', # Specify the flat frame 24 }; 25 19 26 use constant DELETE_STATS => 0; # Delete the statistics file when done? 20 27 21 28 # Parse the command-line arguments 22 29 if (scalar @ARGV != 6) { 23 die " Perform detrend processing at the imfile level.\n\n" .24 "Usage: $0 DET_ID EXP_ID CLASS_ID DETREND_TYPE INPUT.fits OUTPUT_ROOT\n\n";30 die "Apply a stacked detrend image to an individual detrend.\n\n" . 31 "Usage: $0 DET_ID EXP_ID CLASS_ID DETREND_TYPE DETREND.fits INPUT.fits OUTPUT_ROOT\n\n"; 25 32 } 26 33 my $detId = shift @ARGV; # Detrend ID … … 28 35 my $classId = shift @ARGV; # Class ID 29 36 my $detType = shift @ARGV; # Detrend type 37 my $detrend = shift @ARGV; # The detrend frame to apply 30 38 my $input = shift @ARGV; # Input FITS file 31 39 my $output = shift @ARGV; # Output root name … … 40 48 my $recipe = RECIPES->{$detType}; 41 49 die "Unrecognised detrend type: $detType\n" if not defined $recipe; 50 # Detrend to use in processing 51 my $detFlag = DETREND->{$detType}; 52 die "Unrecognised detrend type: $detType\n" if not defined $detFlag; 42 53 43 54 ### Output file names --- must match camera configuration! … … 49 60 { 50 61 my $command = "$ppImage -file $input $output -recipe PPIMAGE $recipe" . 51 " -stat $output.stats "; # Command to run ppImage62 " -stat $output.stats $detFlag $detrend"; # Command to run ppImage 52 63 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 53 64 run(command => $command, verbose => 1);
Note:
See TracChangeset
for help on using the changeset viewer.
