IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8493


Ignore:
Timestamp:
Aug 22, 2006, 4:32:57 PM (20 years ago)
Author:
Paul Price
Message:

Need to specify a detrend frame to apply to the individual.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_create_resid.pl

    r8491 r8493  
    1717};
    1818
     19# Flags to specify the particular detrend to use
     20use 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
    1926use constant DELETE_STATS => 0; # Delete the statistics file when done?
    2027
    2128# Parse the command-line arguments
    2229if (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";
    2532}
    2633my $detId = shift @ARGV;        # Detrend ID
     
    2835my $classId = shift @ARGV;      # Class ID
    2936my $detType = shift @ARGV;      # Detrend type
     37my $detrend = shift @ARGV;      # The detrend frame to apply
    3038my $input = shift @ARGV;        # Input FITS file
    3139my $output = shift @ARGV;       # Output root name
     
    4048my $recipe = RECIPES->{$detType};
    4149die "Unrecognised detrend type: $detType\n" if not defined $recipe;
     50# Detrend to use in processing
     51my $detFlag = DETREND->{$detType};
     52die "Unrecognised detrend type: $detType\n" if not defined $detFlag;
    4253
    4354### Output file names --- must match camera configuration!
     
    4960{
    5061    my $command = "$ppImage -file $input $output -recipe PPIMAGE $recipe" .
    51         " -stat $output.stats"; # Command to run ppImage
     62        " -stat $output.stats $detFlag $detrend"; # Command to run ppImage
    5263    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    5364        run(command => $command, verbose => 1);
Note: See TracChangeset for help on using the changeset viewer.