IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11297


Ignore:
Timestamp:
Jan 25, 2007, 2:55:43 PM (19 years ago)
Author:
Paul Price
Message:

Adding -dbname to all scripts.

Location:
trunk/ippScripts/scripts
Files:
13 edited

Legend:

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

    r10700 r11297  
    2323    $camera,                    # Camera
    2424    $detType,                   # Detrend type
     25    $dbname,                    # Database name
    2526    $no_update                  # Don't update the database
    2627    );
     
    3334    'camera|c=s'        => \$camera,
    3435    'det_type|t=s'      => \$detType,
     36    'dbname|d=s'        => \$dbname,
    3537    'no-update'         => \$no_update
    3638    ) or pod2usage( 2 );
     
    115117    }
    116118    $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
     119
     120    $command .= " -dbname $dbname" if defined $dbname;
     121
    117122    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    118123        run(command => $command, verbose => 1);
  • trunk/ippScripts/scripts/detrend_norm_calc.pl

    r10742 r11297  
    1818    $iter,                      # Iteration
    1919    $detType,                   # Detrend type
     20    $dbname,                    # Database name
    2021    $no_update                  # Don't update the database?
    2122    );
     
    2425        'iteration|i=s' => \$iter,
    2526        'det_type|t=s'  => \$detType,
     27        'dbname|d=s'    => \$dbname,# Database name
    2628        'no-update'     => \$no_update
    2729        ) or pod2usage( 2 );
     
    6365{
    6466    my $command = "$dettool -processedimfile -det_id $detId"; # Command to run
     67    $command .= " -dbname $dbname" if defined $dbname;
    6568    my @command = split /\s+/, $command;
    6669    my ( $stdin, $stdout, $stderr ); # Buffers for running program
     
    150153        my $command = "$dettool -addnormalizedstat -det_id $detId -iteration $iter -class_id $className ".
    151154            "-norm $normalisation"; # Command to run
     155        $command .= " -dbname $dbname" if defined $dbname;
    152156        my @command = split /\s+/, $command;
    153157
  • trunk/ippScripts/scripts/detrend_norm_exp.pl

    r10700 r11297  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $det_type, $camera, $no_update);
     21my ($det_id, $iter, $det_type, $camera, $dbname, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
     
    2525    'camera|c=s'        => \$camera,
    2626    'det_type|t=s'      => \$det_type,
     27    'dbname|d=s'        => \$dbname, # Database name
    2728    'no-update'         => \$no_update
    2829) or pod2usage( 2 );
     
    5556{
    5657    my $command = "$dettool -normalizedimfile -det_id $det_id -iteration $iter"; # Command to run
     58    $command .= " -dbname $dbname" if defined $dbname;
    5759    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    5860        run(command => $command, verbose => 1);
     
    139141        "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1Name -b2_uri $jpeg2Name " .
    140142        "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
     143    $command .= " -dbname $dbname" if defined $dbname;
    141144    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    142145        run(command => $command, verbose => 1);
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r10700 r11297  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $exp_tag, $camera, $no_update);
     21my ($det_id, $exp_tag, $camera, $dbname, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
    2424    'exp_tag|e=s'       => \$exp_tag,
    2525    'camera|c=s'        => \$camera,
     26    'dbname|d=s'        => \$dbname, # Database name
    2627    'no-update'         => \$no_update
    2728) or pod2usage( 2 );
     
    5354{
    5455    my $command = "$dettool -processedimfile -det_id $det_id -exp_tag $exp_tag"; # Command to run
     56    $command .= " -dbname $dbname" if defined $dbname;
    5557    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    5658        run(command => $command, verbose => 1);
     
    139141        "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1 -b2_uri $jpeg2 " .
    140142        "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev"; # Command to run
     143    $command .= " -dbname $dbname" if defined $dbname;
    141144    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    142145        run(command => $command, verbose => 1);
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r10742 r11297  
    1818use Pod::Usage qw( pod2usage );
    1919
    20 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $no_update);
     20my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $bdname, $no_update);
    2121GetOptions(
    2222    'det_id|d=s'        => \$det_id,
     
    2626    'input_uri|u=s'     => \$input_uri,
    2727    'camera|c=s'        => \$camera,
     28    'dbname|d=s'        => \$dbname, # Database name
    2829    'no-update'         => \$no_update
    2930) or pod2usage( 2 );
     
    122123    }
    123124    $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
     125    $command .= " -dbname $dbname" if defined $dbname;
    124126
    125127    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r10719 r11297  
    1818use Pod::Usage qw( pod2usage );
    1919
    20 my ($det_id, $iter, $det_type, $camera, $filter, $no_update);
     20my ($det_id, $iter, $det_type, $camera, $filter, $dbname, $no_update);
    2121GetOptions(
    2222           'det_id|d=s'        => \$det_id,
     
    2525           'camera=s'          => \$camera,
    2626           'filter=s'          => \$filter,
     27           'dbname|d=s'        => \$dbname, # Database name
    2728           'no-update'         => \$no_update
    2829) or pod2usage( 2 );
     
    4849{
    4950    my $command = "$dettool -residexp -det_id $det_id -iteration $iter"; # Command to run
     51    $command .= " -dbname $dbname" if defined $dbname;
    5052    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    5153        run(command => $command, verbose => 1);
     
    105107    $expTag = $expTags[$i];     # Exposure ID
    106108    $command = "$dettool -updateresidexp -det_id $det_id -iteration $iter -exp_tag $expTag"; # Command to run
     109    $command .= " -dbname $dbname" if defined $dbname;
     110
    107111    $reject = 0;                # Reject this exposure?
    108112
     
    197201        " -bg_mean_stdev " . $meanStats->standard_deviation();
    198202    $command .= " -accept" if $master;
    199    
     203    $command .= " -dbname $dbname" if defined $dbname;
     204
    200205    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    201206        run(command => $command, verbose => 1);
     
    211216        $command .= ' -again';
    212217    }
     218   
     219    $command .= " -dbname $dbname" if defined $dbname;
    213220   
    214221    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • trunk/ippScripts/scripts/detrend_reject_imfile.pl

    r10719 r11297  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $no_update, $reject);
     21my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $no_update);
    2222GetOptions(
    2323           'det_id|d=s'        => \$det_id,
     
    2525           'exp_tag|e=s'       => \$exp_tag,
    2626           'det_type|t=s'      => \$det_type,
    27            'no-update'         => \$no_update,
    2827           'camera=s'          => \$camera,
    2928           'filter=s'          => \$filter,
    3029           'reject'            => \$reject
     30           'dbname|d=s'        => \$dbname, # Database name
     31           'no-update'         => \$no_update,
    3132           ) or pod2usage( 2 );
    3233
     
    5859{
    5960    my $command = "$dettool -residimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag"; # Command to run
     61    $command .= " -dbname $dbname" if defined $dbname;
    6062    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6163        run(command => $command, verbose => 1);
     
    239241        "-bg $mean -bg_stdev $stdev -bg_mean_stdev $meanStdev"; # Command to run
    240242    $command .= ' -reject' if $reject;
     243    $command .= " -dbname $dbname" if defined $dbname;
    241244    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    242245        run(command => $command, verbose => 1);
  • trunk/ippScripts/scripts/detrend_resid.pl

    r11151 r11297  
    2020
    2121my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend,
    22         $input_uri, $camera, $mode, $no_update);
     22        $input_uri, $camera, $mode, $dbname, $no_update);
    2323GetOptions(
    2424    'det_id|d=s'        => \$det_id,
     
    3131    'camera|c=s'        => \$camera,
    3232    'mode|m=s'          => \$mode,
     33    'dbname|d=s'        => \$dbname, # Database name
    3334    'no-update'         => \$no_update,
    3435) or pod2usage( 2 );
     
    155156        "-b2_uri $bin2Name"; # Command to run dettool
    156157    $command .= " -bg " . $stats->bg_mean();
     158    $command .= " -dbname $dbname" if defined $dbname;
    157159
    158160    if (defined($stats->bg_mean_stdev())) {
  • trunk/ippScripts/scripts/detrend_stack.pl

    r11151 r11297  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $class_id, $det_type, $camera, $no_update);
     21my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
     
    2626    'det_type|t=s'      => \$det_type,
    2727    'camera|c=s'        => \$camera,
     28    'dbname|d=s'        => \$dbname, # Database name
    2829    'no-update'         => \$no_update
    2930) or pod2usage( 2 );
     
    6566{
    6667    my $command = "$dettool -processedimfile -det_id $det_id -class_id $class_id -included"; # Command to run
     68    $command .= " -dbname $dbname" if defined $dbname;
    6769    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    6870        run(command => $command, verbose => 1);
     
    128130    }
    129131    $command .= ' -bg_mean_stdev ' . $stats->bg_mean_stdev();
     132    $command .= " -dbname $dbname" if defined $dbname;
    130133    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    131134        run(command => $command, verbose => 1);
  • trunk/ippScripts/scripts/phase0_exp.pl

    r11151 r11297  
    3030    'caches'        => \$cache,
    3131    'exp_tag|e=s'   => \$exptag,
     32    'dbname|d=s'    => \$dbname,# Database name   
    3233    'no-update'     => \$no_update
    3334) or pod2usage( 2 );
     
    9697{
    9798    my $command = "$p0tool -processedimfile -exp_tag $exptag";
     99    $command .= " -dbname $dbname" if defined $dbname;
    98100    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    99101        cache_run(command => $command, verbose => 1);
     
    199201    }
    200202
     203    push @command, "-dbname", $dbname if defined $dbname;
     204
    201205    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    202206        cache_run(command => \@command, verbose => 1);
     
    243247    my $exit_code = $_[1];
    244248    if ($exp_tag) {
    245         system ("$p0tool -addprocessedexp -exp_tag $exp_tag -code $exit_code");
     249        my $command = "$p0tool -addprocessedexp -exp_tag $exp_tag -code $exit_code";
     250        $command .= " -dbname $dbname" if defined $dbname;
     251        system($command);
    246252    }
    247253    exit $exit_code;
  • trunk/ippScripts/scripts/phase0_imfile.pl

    r11212 r11297  
    3131use Pod::Usage qw( pod2usage );
    3232
    33 my ($cache, $exp_tag, $class_id, $uri, $workdir, $no_update);
     33my ($cache, $exp_tag, $class_id, $uri, $workdir, $dbname, $no_update);
    3434
    3535GetOptions(
     
    3838    'class_id|i=s'  => \$class_id,
    3939    'uri|u=s'       => \$uri,
    40     'workdir|w=s'   => \$workdir,
     40    'workdir|w=s'   => \$workdir, # Working directory for output files
     41    'dbname|d=s'    => \$dbname,# Database name
    4142    'no-update'     => \$no_update
    4243) or pod2usage( 2 );
     
    185186    }
    186187
     188    push @command, "-dbname", $dbname if defined $dbname;
     189
    187190    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    188191        run(command => \@command, verbose => 1);
     
    219222    my $exit_code = $_[2];
    220223    if ($exp_tag && $class_id) {
    221         system ("$p0tool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code");
     224        my $command = "$p0tool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code";
     225        $command .= " -dbname $dbname" if defined $dbname;
     226        system ($command);
    222227    }
    223228    exit $exit_code;
  • trunk/ippScripts/scripts/phase2.pl

    r11110 r11297  
    2323    $camera,                    # Camera
    2424    $outpath,                   # Outpath
     25    $dbname,                    # Database name
    2526    $no_update                  # Don't update the database?
    2627    );
     
    3132    'camera|c=s'    => \$camera,
    3233    'outpath|o=s'   => \$outpath,
     34    'dbname|d=s'    => \$dbname, # Database name
    3335    'no-update'     => \$no_update
    3436) or pod2usage( 2 );
     
    102104$outputBin2  = $ipprc->convert_filename_relative( $outputBin2 );
    103105unless ($no_update) {
    104     # Command to run dettool
     106    # Command to run p2tool
    105107    my $command = "$p2tool -addprocessedimfile";
    106108    $command .= " -exp_tag $expTag";
     
    113115    $command .= " -bg_stdev " . $stats->bg_stdev();
    114116    $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
     117    $command .= " -dbname $dbname" if defined $dbname;
    115118
    116119    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • trunk/ippScripts/scripts/phase3.pl

    r11110 r11297  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($exp_tag, $camera, $outpath, $no_update);
     21my ($exp_tag, $camera, $outpath, $dbname, $no_update);
    2222GetOptions(
    2323    'exp_tag|e=s'       => \$exp_tag,
    2424    'camera|c=s'        => \$camera,
    25     'outpath|o=s'   => \$outpath,
     25    'outpath|o=s'       => \$outpath,
     26    'dbname|d=s'        => \$dbname, # Database name
    2627    'no-update'         => \$no_update
    2728) or pod2usage( 2 );
     
    5253{
    5354    my $command = "$p3tool -pendingimfile -exp_tag $exp_tag"; # Command to run
     55    $command .= " -dbname $dbname" if defined $dbname;
    5456    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    5557        run(command => $command, verbose => 1);
     
    149151        "-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev " .
    150152        "-sigma_ra 0.0 -sigma_dec 0.0 -nastro 0 -zp_mean 0.0 -zp_stdev 0.0"; # Command to run
     153    $command .= " -dbname $dbname" if defined $dbname;
    151154    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    152155        run(command => $command, verbose => 1);
Note: See TracChangeset for help on using the changeset viewer.