IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 10:36:05 AM (17 years ago)
Author:
eugene
Message:

verify vs master: verify needs to use the detNormalizedImfile entry / master uses detStackedImfile; verify should not block on detNormalizedExp; verify does not select normalization values

File:
1 edited

Legend:

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

    r23295 r23342  
    4545
    4646# parse the command-line options
    47 my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction,
     47my ( $det_id, $iter, $exp_id, $exp_tag, $det_mode, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction,
    4848     $verbose, $no_update, $no_op, $save_temps, $redirect );
    4949GetOptions(
     
    5353           'exp_tag|=s'        => \$exp_tag,
    5454           'det_type|t=s'      => \$det_type,
     55           'det_mode=s'        => \$det_mode,
    5556           'camera=s'          => \$camera,
    5657           'outroot|w=s'       => \$outroot,   # output file base name
     
    7475    defined $exp_tag  and
    7576    defined $det_type and
     77    defined $det_mode and
    7678    defined $camera   and
    7779    defined $outroot;
     
    9395# Get list of normalizations by class_id : stored as $norms; save to temp file for ppImage runs below
    9496my (%norms, $normsName);
    95 {
     97if ($det_mode eq 'master') {
    9698    # dettool command to select imfile data for this exp_id
    9799    $command  = "$dettool -normalizedstat";
     
    164166    my ($statFile, $statName) = tempfile( "/tmp/$exp_tag.detresid.$det_id.$iter.stats.XXXX", UNLINK => !$save_temps );
    165167
     168    print $statFile "rawResidImfile MULTI\n";
     169
    166170    # parse the file info in the metadata
    167171    # as we parse the list of files and their stats, apply the normalization to the relevant fields
     
    188192        # modify and save the data in this block:
    189193        foreach my $data (@$mdComponents) {
    190             my $norm = $norms{$class_id};
     194            my $norm = 1.0;
     195            if ($det_mode eq "master") {
     196                $norm = $norms{$class_id};
     197            }
    191198
    192199            # fields to modify by the normalization:
     
    252259    $command .= " -recipe PPIMAGE PPIMAGE_J1";
    253260    $command .= " -recipe JPEG $recipe";
    254     $command .= " -normlist $normsName";
     261    $command .= " -normlist $normsName" if defined $normsName;
    255262    $command .= " -dbname $dbname" if defined $dbname;
    256263    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    267274    $command .= " -recipe PPIMAGE PPIMAGE_J2";
    268275    $command .= " -recipe JPEG $recipe";
    269     $command .= " -normlist $normsName";
     276    $command .= " -normlist $normsName" if defined $normsName;
    270277    $command .= " -dbname $dbname" if defined $dbname;
    271278    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note: See TracChangeset for help on using the changeset viewer.