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/detrend_process_imfile.pl

    r13748 r13937  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $no_update, $no_op);
     34my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
    3535GetOptions(
    3636    'det_id|d=s'        => \$det_id,
     
    4242    'dbname|d=s'        => \$dbname, # Database name
    4343    'workdir|w=s'       => \$workdir, # Working directory, for output files
     44    'reduction=s'       => \$reduction, # Reduction class
    4445    'no-update'         => \$no_update,
    4546    'no-op'             => \$no_op,
     
    6061$ipprc->define_camera($camera);
    6162
    62 # Recipes to use, as a function of the detrend type
    63 use constant RECIPES => {
    64     'bias'     => 'PPIMAGE_O',    # Overscan only
    65     'dark'     => 'PPIMAGE_OB',   # Overscan and bias only
    66     'shutter'  => 'PPIMAGE_OBD',  # Overscan, bias and dark only
    67     'flat'     => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    68     'domeflat' => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    69     'skyflat'  => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    70     'fringe'   => 'PPIMAGE_OBDSF',# Overscan, bias, dark, shutter and flat only
    71 };
     63$reduction = "DETREND" unless defined $reduction;
     64my $recipe = $ipprc->reduction($reduction, $det_type . '_PROCESS'); # Recipe name to use
    7265
    7366# Look for programs we need
     
    8073}
    8174$ppImage .= " -dbname $dbname" if defined $dbname;
    82 
    83 # Recipe to use in processing
    84 my $recipe = RECIPES->{lc($det_type)};
    85 unless (defined $recipe) {
    86     warn("Unrecognised detrend type: $det_type");
    87     exit($PS_EXIT_CONFIG_ERROR);
    88 }
    8975
    9076$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
Note: See TracChangeset for help on using the changeset viewer.