IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16336


Ignore:
Timestamp:
Feb 6, 2008, 9:52:57 AM (18 years ago)
Author:
Paul Price
Message:

Adding outroot instead of workdir for chip and camera; adding verbose flags.

Location:
trunk/ippScripts/scripts
Files:
6 edited

Legend:

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

    r14372 r16336  
    1313
    1414my ($dbname,                    # Database name to use
    15     $workdir,                   # Working directory
     15    $workdir_default,           # Default working directory
     16    $verbose,                   # Verbose operations?
    1617    $no_op,                     # No operations?
    1718    $no_update,                 # No updating?
    1819    );
    1920GetOptions(
    20            'dbname|d=s' => \$dbname,
    21            'workdir|w=s' => \$workdir,
     21           'dbname=s' => \$dbname,
     22           'workdir=s' => \$workdir_default,
     23           'verbose' => \$verbose,
    2224           'no-op' => \$no_op,
    2325           'no-update' => \$no_update,
     
    2830          -exitval => 3,
    2931          ) unless defined $dbname;
     32
     33$workdir_default = `pwd` unless defined $workdir_default;
    3034
    3135my $mdcParser = PS::IPP::Metadata::Config->new; # Metadata config parser
     
    5256    my $exp_tag = $item->{exp_tag};
    5357    my $camera = $item->{camera};
     58    my $workdir = $item->{workdir};
    5459   
     60    $workdir = $workdir_default unless (defined $workdir or $workdir ne "NULL");
     61    my $outroot = $workdir . '/' . ${exp_tag} . '/' . ${exp_tag} . '.cm.' . ${cam_id};
     62
    5563    my $command = "$camera_exp --cam_id $cam_id --exp_tag $exp_tag --camera $camera --dbname $dbname";
     64    $command .= " --verbose" if defined $verbose;
    5665    $command .= " --no-op" if defined $no_op;
    5766    $command .= " --no-update" if defined $no_update;
  • trunk/ippScripts/scripts/ipp_serial_chip.pl

    r15481 r16336  
    1313
    1414my ($dbname,                    # Database name to use
     15    $workdir_default,           # Default working directory
     16    $verbose,                   # Verbose operations?
    1517    $no_op,                     # No operations?
    1618    $no_update,                 # No updating?
    1719    );
    1820GetOptions(
    19            'dbname|d=s' => \$dbname,
     21           'dbname=s' => \$dbname,
     22           'workdir=s' => \$workdir_default,
     23           'verbose' => \$verbose,
    2024           'no-op' => \$no_op,
    2125           'no-update' => \$no_update,
    2226) or pod2usage( 2 );
    2327
    24 pod2usage(
    25           -msg => "Required options: --dbname",
    26           -exitval => 3,
    27           ) unless defined $dbname;
     28pod2usage( -msg => "Required options: --dbname --workdir",
     29           -exitval => 3,
     30           ) unless
     31    defined $dbname;
     32
     33$workdir_default = `pwd` unless defined $workdir_default;
    2834
    2935my $mdcParser = PS::IPP::Metadata::Config->new; # Metadata config parser
     
    3541die "Can't find required tools.\n" if $missing_tools;
    3642
    37 # Phase 2 imfile processing
     43# Imfile processing
    3844my @whole;                      # The whole list for processing
    3945{
     
    6571            my $reduction = $item->{reduction};
    6672            my $workdir = $item->{workdir};
    67            
    68             my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera";
     73            $workdir = $workdir_default unless (defined $workdir or $workdir ne "NULL");
     74
     75            my $outroot = $workdir . '/' . ${exp_tag} . '/' . ${exp_tag} . '.ch.' . ${chip_id};
     76
     77            my $command = "$chip --chip_id $chip_id --exp_id $exp_id --exp_tag $exp_tag --class_id $class_id --uri $uri --dbname $dbname --camera $camera --outroot $outroot";
    6978            $command .= " --reduction $reduction" if defined $reduction;
     79            $command .= " --verbose" if defined $verbose;
    7080            $command .= " --no-op" if defined $no_op;
    7181            $command .= " --no-update" if defined $no_update;
    72             $command .= " --workdir $workdir" if defined $workdir and $workdir ne "NULL";
    7382            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    7483                run( command => $command, verbose => 1 );
  • trunk/ippScripts/scripts/ipp_serial_diff.pl

    r15458 r16336  
    2626
    2727my ($dbname,                    # Database name to use
     28    $verbose,                   # Verbose operations?
    2829    $no_op,                     # No operations?
    2930    $no_update,                 # No updating?
    3031    );
    3132GetOptions(
    32            'dbname|d=s' => \$dbname,
     33           'dbname=s' => \$dbname,
     34           'verbose' => \$verbose,
    3335           'no-op' => \$no_op,
    3436           'no-update' => \$no_update,
     
    7274       
    7375        my $command = "$diff_skycell --diff_id $diff_id --dbname $dbname";
     76        $command .= " --verbose" if defined $verbose;
    7477        $command .= " --no-op" if defined $no_op;
    7578        $command .= " --no-update" if defined $no_update;
  • trunk/ippScripts/scripts/ipp_serial_stack.pl

    r15458 r16336  
    2626
    2727my ($dbname,                    # Database name to use
     28    $verbose,                   # Verbose operations?
    2829    $no_op,                     # No operations?
    2930    $no_update,                 # No updating?
     
    3132    );
    3233GetOptions(
    33            'dbname|d=s' => \$dbname,
     34           'dbname=s' => \$dbname,
     35           'verbose' => \$verbose,
    3436           'no-op' => \$no_op,
    3537           'no-update' => \$no_update,
     
    7476       
    7577        my $command = "$stack_skycell --stack_id $stack_id --dbname $dbname";
     78        $command .= " --verbose" if defined $verbose;
    7679        $command .= " --no-op" if defined $no_op;
    7780        $command .= " --no-update" if defined $no_update;
  • trunk/ippScripts/scripts/ipp_serial_warp.pl

    r16323 r16336  
    2626
    2727my ($dbname,                    # Database name to use
     28    $verbose,                   # Verbose operations?
    2829    $no_op,                     # No operations?
    2930    $no_update,                 # No updating?
    3031    );
    3132GetOptions(
    32            'dbname|d=s' => \$dbname,
     33           'dbname=s' => \$dbname,
     34           'verbose' => \$verbose,
    3335           'no-op' => \$no_op,
    3436           'no-update' => \$no_update,
     
    7779       
    7880        my $command = "$warp_overlap --warp_id $warp_id --camera $camera --tess_id $tess_id --dbname $dbname";
     81        $command .= " --verbose" if defined $verbose;
    7982        $command .= " --no-op" if defined $no_op;
    8083        $command .= " --no-update" if defined $no_update;
     
    106109       
    107110        my $command = "$warp_skycell --warp_id $warp_id --skycell_id $skycell_id --tess_id $tess_id --camera $camera --dbname $dbname";
     111        $command .= " --verbose" if defined $verbose;
    108112        $command .= " --no-op" if defined $no_op;
    109113        $command .= " --no-update" if defined $no_update;
  • trunk/ippScripts/scripts/warp_overlap.pl

    r16329 r16336  
    159159    # Extract the skycells to images, used as warp templates.
    160160    my @skycells = keys %unique_skycells;
    161     generate_skycells($ipprc, $tess_id, \@skycells, $workdir) or
     161    generate_skycells($ipprc, $tess_id, \@skycells, $workdir, $verbose) or
    162162        &my_die("Unable to generate skycells for tessellation $tess_id", $warp_id, $PS_EXIT_SYS_ERROR);
    163163   
Note: See TracChangeset for help on using the changeset viewer.