IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23342


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

Location:
trunk
Files:
3 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 ) =
  • trunk/ippTasks/detrend.resid.pro

    r23230 r23342  
    316316    stderr $LOGDIR/detrend.resid.exp.log
    317317
    318     $run = detrend_resid_exp.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose
     318    $run = detrend_resid_exp.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_mode $MODE --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose
    319319
    320320    add_standard_args run
  • trunk/ippTools/share/dettool_toresidexp.sql

    r23229 r23342  
    2020-- detResidImfile.{det_id, iteration, exp_id} is not in detResidExp
    2121
    22 SELECT DISTINCT
     22SELECT
    2323    det_id,
    2424    iteration,
     
    3030    workdir,
    3131    exp_tag
    32 FROM
    33     (SELECT DISTINCT
     32FROM 
     33(   SELECT
    3434        detRun.det_id AS det_id,
    3535        detRun.iteration,
    3636        detRun.det_type,
    3737        detRun.mode,
    38         detRun.workdir,
    3938        detInputExp.exp_id,
    4039        detInputExp.include,
    4140        rawExp.camera,
    42         rawExp.exp_tag,
    43         detResidImfile.class_id
     41        detRun.workdir,
     42        rawExp.exp_tag
    4443    FROM detRun
    4544    JOIN detNormalizedExp
     
    6261    WHERE
    6362        detRun.state = 'run'
     63        AND detRun.mode = 'master'
    6464        AND detResidExp.det_id IS NULL
    6565        AND detResidExp.iteration IS NULL
     
    7272        COUNT(rawImfile.class_id) = COUNT(detResidImfile.class_id)
    7373        AND SUM(detResidImfile.fault) = 0
    74     ) AS toresidexp
     74    UNION
     75    SELECT
     76        detRun.det_id AS det_id,
     77        detRun.iteration,
     78        detRun.det_type,
     79        detRun.mode,
     80        detInputExp.exp_id,
     81        detInputExp.include,
     82        rawExp.camera,
     83        detRun.workdir,
     84        rawExp.exp_tag
     85    FROM detRun
     86    JOIN detInputExp
     87        USING(det_id, iteration)
     88    JOIN rawExp
     89        ON detInputExp.exp_id = rawExp.exp_id
     90    JOIN rawImfile
     91        on rawExp.exp_id = rawImfile.exp_id
     92    LEFT JOIN detResidImfile
     93        ON detRun.det_id = detResidImfile.det_id
     94        AND detRun.iteration = detResidImfile.iteration
     95        AND detInputExp.exp_id = detResidImfile.exp_id
     96        AND rawImfile.class_id = detResidImfile.class_id
     97    LEFT JOIN detResidExp
     98        ON detResidImfile.det_id = detResidExp.det_id
     99        AND detResidImfile.iteration = detResidExp.iteration
     100        AND detResidImfile.exp_id = detResidExp.exp_id
     101    WHERE
     102        detRun.state = 'run'
     103        AND detRun.mode = 'verify'
     104        AND detResidExp.det_id IS NULL
     105        AND detResidExp.iteration IS NULL
     106        AND detResidExp.exp_id IS NULL
     107    GROUP BY
     108        detInputExp.exp_id,
     109        detRun.iteration,
     110        detRun.det_id
     111    HAVING
     112        COUNT(rawImfile.class_id) = COUNT(detResidImfile.class_id)
     113        AND SUM(detResidImfile.fault) = 0
     114) as temp
Note: See TracChangeset for help on using the changeset viewer.