IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 21, 2007, 2:10:11 PM (19 years ago)
Author:
Paul Price
Message:

Changes to multiple packages in order to use "reduction classes" to
specify recipe names. The idea is to give a group of recipes a
symbolic name, which distinguish how the reduction is to be performed,
without going to all the trouble of changing the recipes themselves.

For example, we might want to turn off the usual
overscan/bias/dark/shutter/flat processing and only do photometry if
we have pre-processed data. Gene also wants a similar ability for
building the flat-field correction.

Added a REDUCTION metadata to the camera configuration that contains
multiple METADATA entries that have recipes for different processing
steps. PS::IPP::Config has a 'reduction' function to return the
appropriate recipe, and this is now used in the scripts. Updated
ippTasks to use these where appropriate.

This necessitated changing the database, so that the desired reduction
class can be specified in the right places. Instructions on converting
an extant database are in dbconfig/changes.txt.

Tested with the SIMTEST, and it works.

There is currently no way of specifying the reduction class when an
exposure proceeds from 'register' to 'chip' (it has to be hacked in
the database directly: "update chipPendingExp set reduction =
'SOME_CLASS' where ..."), but it can be specified when adding a
detrend run or queuing chips with 'chiptool -queue' (the '-reduction'
option). Also, the 'recipe' columns remain throughout the detrend
tables, and they continue to be populated with the actual recipe used
(rather than the reduction class; but that is contained in the
detRun).

File:
1 edited

Legend:

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

    r13926 r13937  
    2929use Pod::Usage qw( pod2usage );
    3030
    31 my $RECIPE = 'PPIMAGE_OBDSFRA'; # Recipe to use
    32 
    3331# Parse the command-line arguments
    3432my ($exp_id,                    # Exposure identifier
     
    3634    $class_id,                  # Class identifier
    3735    $input,                     # Input FITS file
    38     $recipe,                    # Recipe to use
    3936    $camera,                    # Camera
    4037    $dbname,                    # Database name
    4138    $workdir,                   # Working directory, for output files
     39    $reduction,                 # Reduction class
    4240    $no_update,                 # Don't update the database?
    4341    $no_op,                     # Don't do any operations?
     
    4846           'class_id=s'    => \$class_id,
    4947           'uri|u=s'       => \$input,
    50            'recipe=s'      => \$recipe,
    5148           'camera|c=s'    => \$camera,
    5249           'dbname|d=s'    => \$dbname, # Database name
    5350           'workdir|w=s'   => \$workdir,
     51           'reduction=s'   => \$reduction,
    5452           'no-update'     => \$no_update,
    5553           'no-op'         => \$no_op,
     
    6765
    6866$ipprc->define_camera($camera);
     67$reduction = 'DEFAULT' unless defined $reduction;
     68my $recipe = $ipprc->reduction($reduction, 'CHIP'); # Recipe to use
    6969
    7070# Look for programs we need
     
    9797
    9898    my $command = "$ppImage -file $input $outputRoot";
    99     $command .= " -recipe PPIMAGE $RECIPE";
     99    $command .= " -recipe PPIMAGE $recipe";
    100100    $command .= " -recipe PPSTATS CHIPSTATS";
    101101    $command .= " -stats $outputStats"; # Command to run ppImage
     
    130130my $bg_stdev = ($stats->bg_stdev() or 'NAN');
    131131my $bg_mean_stdev = ($stats->bg_mean_stdev() or 'NAN');
    132 my $fringe_0      = (${$stats->fringe()[0]} or 'NAN');
    133 my $fringe_1      = (${$stats->fringe_err()[0]} or 'NAN');
     132my $fringe_0      = (${$stats->fringe()}[0] or 'NAN');
     133my $fringe_1      = (${$stats->fringe_err()}[0] or 'NAN');
    134134my $fringe_2      = 'NAN';
    135135
Note: See TracChangeset for help on using the changeset viewer.