IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 19, 2008, 2:11:37 PM (18 years ago)
Author:
eugene
Message:

changing detrend verify mode to behave just like master mode in terms of processing and residual generation; adding ref_det_id, ref_iter to detRun and detResidImfile, modifying the foreign constraint; adding a simtest suite to test the detrend verify mode

File:
1 edited

Legend:

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

    r19374 r19621  
    2424use Pod::Usage qw( pod2usage );
    2525
    26 my ( $det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot,
     26my ( $det_id, $iter, $ref_det_id, $ref_iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot,
    2727     $dbname, $reduction, $threads, $verbose, $no_update, $no_op, $redirect );
    2828GetOptions(
    2929    'det_id|d=s'        => \$det_id,
    3030    'iteration=s'       => \$iter,
     31    'ref_det_id=s'      => \$ref_det_id,
     32    'ref_iter=s'        => \$ref_iter,
    3133    'exp_id|e=s'        => \$exp_id,
    3234    'exp_tag|=s'        => \$exp_tag,
     
    4850
    4951pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    50 pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)",
     52pod2usage( -msg => "Required options: --det_id --iteration --ref_det_id --ref_iter --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)",
    5153           -exitval => 3) unless
    52     defined $det_id    and
    53     defined $iter      and
    54     defined $exp_id    and
    55     defined $exp_tag   and
    56     defined $class_id  and
    57     defined $det_type  and
    58     defined $input_uri and
    59     defined $camera    and
    60     defined $mode      and
    61     defined $outroot   and
    62     (defined $detrend or lc($mode) eq 'verify');
     54    defined $det_id     and
     55    defined $iter       and
     56    defined $ref_det_id and
     57    defined $ref_iter   and
     58    defined $exp_id     and
     59    defined $exp_tag    and
     60    defined $class_id   and
     61    defined $det_type   and
     62    defined $input_uri  and
     63    defined $camera     and
     64    defined $mode       and
     65    defined $outroot    and
     66    defined $detrend;
    6367
    6468$ipprc->define_camera($camera);
     
    6973
    7074# Recipes to use as a function of detrend type and mode
     75# XXX probably can drop the distinct 'verify' recipes
    7176$reduction = 'DETREND' unless defined $reduction;
    7277my $recipe;                     # Name of recipe to use
     
    7883    &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    7984}
     85
     86print "raw recipe: $recipe\n";
    8087$recipe = $ipprc->reduction($reduction, $recipe);
     88print "real recipe: $recipe\n";
    8189
    8290# values to extract from output metadata and the stats to calculate
     
    166174
    167175    # Detrend to use in processing
    168     if (lc($mode) ne 'verify') {
    169         my $detFlag = DETRENDS->{lc($det_type)};
    170         &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR) unless defined $detFlag;
    171         $command .= " $detFlag $detrend";
    172     }
     176    my $detFlag = DETRENDS->{lc($det_type)};
     177    &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR) unless defined $detFlag;
     178    $command .= " $detFlag $detrend";
    173179
    174180    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    216222$command .= " -det_id $det_id";
    217223$command .= " -iteration $iter";
     224$command .= " -ref_det_id $ref_det_id";
     225$command .= " -ref_iter $ref_iter";
    218226$command .= " -exp_id $exp_id";
    219227$command .= " -class_id $class_id";
     
    252260        $command .= " -det_id $det_id";
    253261        $command .= " -iteration $iter";
     262        $command .= " -ref_det_id $ref_det_id";
     263        $command .= " -ref_iter $ref_iter";
    254264        $command .= " -exp_id $exp_id";
    255265        $command .= " -class_id $class_id";
Note: See TracChangeset for help on using the changeset viewer.