IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16196


Ignore:
Timestamp:
Jan 22, 2008, 5:36:36 PM (18 years ago)
Author:
eugene
Message:

updates from eam_branch_20080121: workdir changed to outroot

Location:
trunk/ippScripts/scripts
Files:
13 edited

Legend:

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

    r16018 r16196  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($exp_tag, $cam_id, $recipe, $camera, $dbname, $workdir, $reduction, $dvodb, $no_update, $no_op);
     39my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op);
    4040GetOptions(
    4141           'exp_tag=s'          => \$exp_tag, # Exposure identifier
     
    4444           'camera|c=s'        => \$camera, # Camera
    4545           'dbname|d=s'        => \$dbname, # Database name
    46            'workdir|w=s'       => \$workdir, # Working directory
     46           'outroot|w=s'       => \$outroot, # output file base name
    4747           'reduction=s'       => \$reduction, # Reduction class                       
    4848           'dvodb|w=s'         => \$dvodb,  # output DVO database
     
    5555          -msg => "Required options: --exp_tag --cam_id --camera",
    5656          -exitval => 3,
    57           ) unless defined $exp_tag
    58     and defined $cam_id
    59     and defined $camera;
     57          ) unless
     58    defined $exp_tag and
     59    defined $cam_id and
     60    defined $outroot and
     61    defined $camera;
    6062
    6163$ipprc->define_camera($camera);
     
    136138}
    137139
     140### not needed to have such an extensive temp file name.
    138141my ($list1File, $list1Name) = tempfile( "$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => 1 ); # For binning 1
    139142my ($list2File, $list2Name) = tempfile( "$exp_tag.cm.$cam_id.b2.list.XXXX", UNLINK => 1 ); # For binning 2
     
    162165
    163166# Output products
    164 $workdir = caturi( $workdir, $exp_tag ) if defined $workdir;
    165 my $outputRoot = $ipprc->file_prepare( "$exp_tag.cm.$cam_id", $workdir, ${$files}[0]->{path_base} );
    166 
    167 my $jpeg1      = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    168 my $jpeg2      = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    169 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outputRoot); # MEF psastro output
    170 
    171 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
    172 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".log"; # Log messages
     167$ipprc->outroot_prepare($outroot);
     168
     169my $jpeg1      = $ipprc->filename("PPIMAGE.JPEG1",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     170my $jpeg2      = $ipprc->filename("PPIMAGE.JPEG2",      $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     171my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     172my $traceDest  = $ipprc->filename("TRACE.EXP",          $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
     173my $logDest    = $ipprc->filename("LOG.EXP",            $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR);
    173174
    174175# convert supplied DVO database name to UNIX filename
     
    184185    # Make the jpeg for binning 1
    185186    {
    186         my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     187        my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    187188        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    188189            run(command => $command, verbose => 1);
     
    196197    # Make the jpeg for binning 2
    197198    {
    198         my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     199        my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    199200        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    200201            run(command => $command, verbose => 1);
     
    229230            # XXX add a ppStats call which will collect the astrometry stats
    230231            my $command;
    231             $command  = "$psastro -list $list3Name $outputRoot";
     232            $command  = "$psastro -list $list3Name $outroot";
    232233            $command .= " +mosastro -chipastro";
    233234            $command .= " -F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF";
     
    276277$fpaCommand .= " -cam_id $cam_id";
    277278$fpaCommand .= " -uri UNKNOWN";
    278 $fpaCommand .= " -path_base $outputRoot";
     279$fpaCommand .= " -path_base $outroot";
    279280$fpaCommand .= " -dbname $dbname" if defined $dbname;
    280281$fpaCommand .= $chipStats->cmdflags();
  • trunk/ippScripts/scripts/chip_imfile.pl

    r15466 r16196  
    3333
    3434# Parse the command-line arguments
    35 my ($exp_id, $chip_id, $class_id, $uri, $exp_tag, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     35my ($exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3636GetOptions(
    3737           'exp_id=s'      => \$exp_id,    # Exposure identifier                       
     38           'exp_tag=s'     => \$exp_tag,   # Exposure identifier                       
    3839           'chip_id=s'     => \$chip_id,   # Chiptool identifier                       
    3940           'class_id=s'    => \$class_id,  # Class identifier                 
    4041           'uri|u=s'       => \$uri,       # Input FITS file                   
    4142           'camera|c=s'    => \$camera,    # Camera                           
     43           'outroot|w=s'   => \$outroot,   # output file base name
    4244           'dbname|d=s'    => \$dbname,    # Database name
    43            'exp_tag=s'     => \$exp_tag,    # Exposure identifier                     
    44            'workdir|w=s'   => \$workdir,   # Working directory, for output files 
    4545           'reduction=s'   => \$reduction, # Reduction class                   
    4646           'no-update'     => \$no_update, # Don't update the database?       
     
    4949
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --exp_id --exp_tag --chip_id --class_id --uri --camera",
     51pod2usage( -msg => "Required options: --exp_id --exp_tag --chip_id --class_id --uri --camera --outroot",
    5252           -exitval => 3) unless
    5353    defined $exp_id and
     54    defined $exp_tag and
    5455    defined $chip_id and
    5556    defined $class_id and
    5657    defined $uri and
    57     defined $exp_tag and
    58     defined $camera;
     58    defined $camera and
     59    defined $outroot;
    5960
    6061$ipprc->define_camera($camera);
     
    100101&my_die("Couldn't find input file: $uri\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($uri);
    101102
    102 $workdir = caturi( $workdir, $exp_tag ) if defined $workdir;
    103 
    104 my $outputRoot  = $ipprc->file_prepare( "$exp_tag.ch.$chip_id", $workdir, $uri );
    105 
    106 my $outputImage = $ipprc->filename("PPIMAGE.CHIP",      $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    107 my $outputMask  = $ipprc->filename("PPIMAGE.CHIP.MASK", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    108 my $outputWeight  = $ipprc->filename("PPIMAGE.CHIP.WEIGHT", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    109 my $outputBin1  = $ipprc->filename("PPIMAGE.BIN1",      $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    110 my $outputBin2  = $ipprc->filename("PPIMAGE.BIN2",      $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    111 my $outputStats = $ipprc->filename("PPIMAGE.STATS",     $outputRoot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    112 
    113 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages
    114 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages
     103# outroot examples (HOST components must be set)
     104# file://data/ipp004.0/gpc1/20080130
     105# neb:///ipp004-v1/gpc1/20080130
     106# neb:///*/gpc1/20080130 (volume not specified)
     107
     108# check for existing directory, generate if needed
     109$ipprc->outroot_prepare($outroot);
     110
     111## these names are used in ppImage, and thus may be URIs
     112my $outputImage   = $ipprc->filename("PPIMAGE.CHIP",        $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     113my $outputMask    = $ipprc->filename("PPIMAGE.CHIP.MASK",   $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     114my $outputWeight  = $ipprc->filename("PPIMAGE.CHIP.WEIGHT", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     115my $outputBin1    = $ipprc->filename("PPIMAGE.BIN1",        $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     116my $outputBin2    = $ipprc->filename("PPIMAGE.BIN2",        $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     117my $outputStats   = $ipprc->filename("PPIMAGE.STATS",       $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     118my $traceDest     = $ipprc->filename("TRACE.IMFILE",        $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     119my $logDest       = $ipprc->filename("LOG.IMFILE",          $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    115120
    116121# Run ppImage
    117122unless ($no_op) {
    118     my $command = "$ppImage -file $uri $outputRoot";
     123    ## XXX can we convert ppImage log and trace to use the filerules to generate consistent names
     124    ## XXX also stats: output should be implied by $outroot
     125    my $command = "$ppImage -file $uri $outroot";
    119126    $command .= " -recipe PPIMAGE $recipe";
    120127    $command .= " -recipe PPSTATS CHIPSTATS";
     
    130137    }
    131138
    132     &my_die("Couldn't find expected output file: $outputImage\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
    133     &my_die("Couldn't find expected output file: $outputMask\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
    134     &my_die("Couldn't find expected output file: $outputWeight\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
    135     &my_die("Couldn't find expected output file: $outputBin1\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
    136     &my_die("Couldn't find expected output file: $outputBin2\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
    137     &my_die("Couldn't find expected output file: $outputStats\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
     139    &my_die("Couldn't find expected output file: $outputImage\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
     140    &my_die("Couldn't find expected output file: $outputMask\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     141    &my_die("Couldn't find expected output file: $outputWeight\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
     142    &my_die("Couldn't find expected output file: $outputBin1\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
     143    &my_die("Couldn't find expected output file: $outputBin2\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
     144    &my_die("Couldn't find expected output file: $outputStats\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    138145
    139146    # Get the statistics on the processed image
     
    162169$command .= " -class_id $class_id";
    163170$command .= " -uri $outputImage";
    164 $command .= " -path_base $outputRoot";
     171$command .= " -path_base $outroot";
    165172$command .= " -dbname $dbname" if defined $dbname;
    166173$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_norm_apply.pl

    r15918 r16196  
    3333
    3434# Parse the command-line
    35 my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $dbname, $workdir, $no_update, $no_op);
     35my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $no_update, $no_op);
    3636GetOptions(
    3737    'det_id|d=s'        => \$det_id,     # Detrend ID                           
     
    4242    'camera|c=s'        => \$camera,     # Camera                               
    4343    'det_type|t=s'      => \$det_type,   # Detrend type                         
     44    'outroot|w=s'       => \$outroot,    # output file base name
    4445    'dbname|d=s'        => \$dbname,     # Database name                               
    45     'workdir|w=s'       => \$workdir,    # Working directory, for output files 
    4646    'no-update'         => \$no_update,  # Don't update the database           
    4747    'no-op'             => \$no_op,      # Don't do any operations               
     
    4949   
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --det_id --iteration --class_id --value --input_uri --camera --det_type",
    52            -exitval => 3)
    53     unless defined $det_id
    54     and defined $iter
    55     and defined $class_id
    56     and defined $value
    57     and defined $input_uri
    58     and defined $camera
    59     and defined $det_type;
     51pod2usage( -msg => "Required options: --det_id --iteration --class_id --value --input_uri --camera --det_type --outroot",
     52           -exitval => 3) unless
     53    defined $det_id    and
     54    defined $iter      and
     55    defined $class_id  and
     56    defined $value     and
     57    defined $input_uri and
     58    defined $camera    and
     59    defined $det_type  and
     60    defined $outroot;
    6061
    6162$ipprc->define_camera($camera);
     
    9091&my_die("Couldn't find input file: $input_uri\n", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri);
    9192
    92 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    93 
    94 my $outputRoot = $ipprc->file_prepare( "$camera.$det_type.norm.$det_id.$iter", $workdir, $input_uri );
    95 
    96 my $output    = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id);
    97 my $b1name    = $ipprc->filename("PPIMAGE.BIN1",   $outputRoot, $class_id);
    98 my $b2name    = $ipprc->filename("PPIMAGE.BIN2",   $outputRoot, $class_id);
    99 my $statsName = $ipprc->filename("PPIMAGE.STATS",  $outputRoot, $class_id);
    100 
    101 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages
    102 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages
     93# outroot examples (HOST components must be set)
     94# file://data/ipp004.0/gpc1/20080130
     95# neb:///ipp004-v1/gpc1/20080130
     96# neb:///*/gpc1/20080130 (volume not specified)
     97
     98# check for existing directory, generate if needed
     99$ipprc->outroot_prepare($outroot);
     100
     101my $output    = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     102my $b1name    = $ipprc->filename("PPIMAGE.BIN1",   $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     103my $b2name    = $ipprc->filename("PPIMAGE.BIN2",   $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     104my $statsName = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     105my $traceDest = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
     106my $logDest   = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);
    103107
    104108# Run normalisation
    105109unless ($no_op) {
    106     my $command = "$ppImage -file $input_uri $outputRoot";
     110    my $command = "$ppImage -file $input_uri $outroot";
    107111    $command .= " -norm $value -stats $statsName";
    108112    $command .= " -recipe PPIMAGE $RECIPE_PPIMAGE";
     
    118122        &my_die("Unable to perform ppImage: $error_code", $det_id, $iter, $class_id, $error_code);
    119123    }
    120     &my_die("Can't find expected output file: $output", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($output);
    121     &my_die("Can't find expected output file: $b1name", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($b1name);
    122     &my_die("Can't find expected output file: $b2name", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($b2name);
     124    &my_die("Can't find expected output file: $output",    $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($output);
     125    &my_die("Can't find expected output file: $b1name",    $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($b1name);
     126    &my_die("Can't find expected output file: $b2name",    $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($b2name);
    123127    &my_die("Can't find expected output file: $statsName", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($statsName);
    124128   
     
    149153$command .= " -class_id $class_id";
    150154$command .= " -uri $output";
    151 $command .= " -path_base $outputRoot";
     155$command .= " -path_base $outroot";
    152156$command .= " -dbname $dbname" if defined $dbname;
    153157$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_norm_calc.pl

    r15616 r16196  
    3232
    3333# Parse command-line arguments
    34 my ($det_id, $iter, $detType, $workdir, $dbname, $no_update, $no_op);
     34my ($det_id, $iter, $detType, $outroot, $dbname, $no_update, $no_op);
    3535GetOptions(
    3636        'det_id|d=s'    => \$det_id,    # Detrend id                         
    3737        'iteration|i=s' => \$iter,      # Iteration                         
    3838        'det_type|t=s'  => \$detType,   # Detrend type                       
    39         'workdir|w=s'   => \$workdir,   # Working directory for output files
     39        'outroot|w=s'   => \$outroot,   # output file base name
    4040        'dbname|d=s'    => \$dbname,    # Database name                     
    4141        'no-update'     => \$no_update, # Don't update the database?         
     
    4444
    4545pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    46 pod2usage( -msg => "Required options --det_id --iteration --det_type",
     46pod2usage( -msg => "Required options --det_id --iteration --det_type --outroot",
    4747           -exitval => 3,
    48            )
    49     unless defined $det_id
    50     and defined $iter
    51     and defined $detType;
     48           ) unless
     49    defined $det_id  and
     50    defined $iter    and
     51    defined $detType and
     52    defined $outroot;
    5253
    5354use constant STATISTIC => 'bg'; # Background statistic to use from the database
  • trunk/ippScripts/scripts/detrend_norm_exp.pl

    r15853 r16196  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     37my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3838GetOptions(
    3939           'det_id|d=s'        => \$det_id,
     
    4141           'camera|c=s'        => \$camera,
    4242           'det_type|t=s'      => \$det_type,
     43           'outroot|w=s'       => \$outroot,   # output file base name
    4344           'dbname|d=s'        => \$dbname, # Database name
    44            'workdir|w=s'       => \$workdir,    # Working directory, for output files
    4545           'reduction|=s'      => \$reduction,
    4646           'no-update'         => \$no_update,
     
    4949
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --det_id --iteration --camera --det_type",
    52            -exitval => 3)
    53     unless defined $det_id
    54     and defined $iter
    55     and defined $camera
    56     and defined $det_type;
     51pod2usage( -msg => "Required options: --det_id --iteration --camera --det_type --outroot",
     52           -exitval => 3) unless
     53    defined $det_id   and
     54    defined $iter     and
     55    defined $camera   and
     56    defined $det_type and
     57    defined $outroot;
    5758
    5859$ipprc->define_camera($camera);
     
    126127close $list2File;
    127128
    128 # Output products
    129 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    130 my $outputRoot = $ipprc->file_prepare( "$camera.$det_type.norm.$det_id.$iter", $workdir );
    131 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    132 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     129# outroot examples (HOST components must be set)
     130# file://data/ipp004.0/gpc1/20080130
     131# neb:///ipp004-v1/gpc1/20080130
     132# neb:///*/gpc1/20080130 (volume not specified)
     133
     134# check for existing directory, generate if needed
     135$ipprc->outroot_prepare($outroot);
     136
     137my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1
     138my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2
    133139
    134140unless ($no_op) {
    135141    # Make the jpeg for binning 1
    136     $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     142    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    137143    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    138144        run(command => $command, verbose => 1);
     
    140146   
    141147    # Make the jpeg for binning 2
    142     $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     148    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    143149    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    144150        run(command => $command, verbose => 1);
     
    152158$command .= " -iteration $iter";
    153159$command .= " -recip $recipe1,$recipe2";
    154 $command .= " -path_base $outputRoot ";
     160$command .= " -path_base $outroot ";
    155161$command .= " -dbname $dbname" if defined $dbname;
    156162$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r15643 r16196  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     37my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3838GetOptions(
    3939    'det_id|d=s'        => \$det_id,
     
    4242    'exp_tag|=s'        => \$exp_tag,
    4343    'camera|c=s'        => \$camera,
     44    'outroot|w=s'       => \$outroot,   # output file base name
    4445    'dbname|d=s'        => \$dbname, # Database name
    45     'workdir|w=s'       => \$workdir,   # Working directory, for output files
    4646    'reduction|=s'      => \$reduction,
    4747    'no-update'         => \$no_update,
     
    5050
    5151pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    52 pod2usage( -msg => "Required options: --det_id --det_type --exp_id --exp_tag --camera",
    53            -exitval => 3)
    54     unless defined $det_id
    55     and defined $det_type
    56     and defined $exp_id
    57     and defined $exp_tag
    58     and defined $camera;
     52pod2usage( -msg => "Required options: --det_id --det_type --exp_id --exp_tag --camera --outroot",
     53           -exitval => 3) unless
     54    defined $det_id   and
     55    defined $det_type and
     56    defined $exp_id   and
     57    defined $exp_tag  and
     58    defined $camera   and
     59    defined $outroot;
    5960
    6061$ipprc->define_camera($camera);
     
    129130close $list2File;
    130131
    131 # Output files
    132 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    133 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detproc.$det_id", $workdir, ${$files}[0]->{path_base} );
    134 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    135 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     132# outroot examples (HOST components must be set)
     133# file://data/ipp004.0/gpc1/20080130
     134# neb:///ipp004-v1/gpc1/20080130
     135# neb:///*/gpc1/20080130 (volume not specified)
     136
     137# check for existing directory, generate if needed
     138$ipprc->outroot_prepare($outroot);
     139
     140my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1
     141my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2
    136142
    137143unless ($no_op) {
    138144    # Make the jpeg for binning 1
    139     $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     145    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    140146    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    141147        run(command => $command, verbose => 1);
     
    147153   
    148154    # Make the jpeg for binning 2
    149     $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     155    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    150156    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    151157        run(command => $command, verbose => 1);
     
    161167$command .= " -det_id $det_id";
    162168$command .= " -exp_id $exp_id";
    163 $command .= " -recip $recipe1,$recipe2 -path_base $outputRoot";
     169$command .= " -recip $recipe1,$recipe2 -path_base $outroot";
    164170$command .= " -dbname $dbname" if defined $dbname;
    165171$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r15466 r16196  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     34my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3535GetOptions(
    3636    'det_id|d=s'        => \$det_id,
     
    4141    'input_uri|u=s'     => \$input_uri,
    4242    'camera|c=s'        => \$camera,
     43    'outroot|w=s'       => \$outroot, # output file base name
    4344    'dbname|d=s'        => \$dbname, # Database name
    44     'workdir|w=s'       => \$workdir, # Working directory, for output files
    4545    'reduction=s'       => \$reduction, # Reduction class
    4646    'no-update'         => \$no_update,
     
    4949
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --det_id --exp_id --class_id --det_type --exp_tag --input_uri --camera",
    52            -exitval => 3)
    53     unless defined $det_id
    54     and defined $exp_id
    55     and defined $class_id
    56     and defined $det_type
    57     and defined $exp_tag
    58     and defined $input_uri
    59     and defined $camera;
     51pod2usage( -msg => "Required options: --det_id --exp_id --class_id --det_type --exp_tag --input_uri --camera --outroot",
     52           -exitval => 3) unless
     53    defined $det_id    and
     54    defined $exp_id    and
     55    defined $class_id  and
     56    defined $det_type  and
     57    defined $exp_tag   and
     58    defined $input_uri and
     59    defined $camera    and
     60    defined $outroot;
    6061
    6162# XXX this exits with status = 0 on failure
     
    8889&my_die("Couldn't find input file: $input_uri\n", $det_id, $exp_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri);
    8990
    90 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
     91# outroot examples (HOST components must be set)
     92# file://data/ipp004.0/gpc1/20080130
     93# neb:///ipp004-v1/gpc1/20080130
     94# neb:///*/gpc1/20080130 (volume not specified)
    9195
    92 my $outputRoot  = $ipprc->file_prepare( "$exp_tag/$exp_tag.detproc.$det_id", $workdir, $input_uri );
     96# check for existing directory, generate if needed
     97$ipprc->outroot_prepare($outroot);
    9398
    94 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    95 my $outputBin1  = $ipprc->filename("PPIMAGE.BIN1",   $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    96 my $outputBin2  = $ipprc->filename("PPIMAGE.BIN2",   $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    97 my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
    98 
    99 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages
    100 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages
     99my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
     100my $outputBin1  = $ipprc->filename("PPIMAGE.BIN1",   $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
     101my $outputBin2  = $ipprc->filename("PPIMAGE.BIN2",   $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
     102my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR);
     103my $traceDest   = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
     104my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR);
    101105
    102106# Run ppImage
    103107unless ($no_op) {
    104     my $command = "$ppImage -file $input_uri $outputRoot";
     108    my $command = "$ppImage -file $input_uri $outroot";
    105109    $command .= " -recipe PPIMAGE $recipe";
    106110    $command .= " -recipe PPSTATS CHIPSTATS";
     
    141145$command .= " -class_id $class_id";
    142146$command .= " -recip $reduction";
    143 $command .= " -uri $outputImage -path_base $outputRoot";
     147$command .= " -uri $outputImage -path_base $outroot";
    144148$command .= " -dbname $dbname" if defined $dbname;
    145149$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r15489 r16196  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($det_id, $iter, $det_type, $camera, $filter, $workdir, $dbname, $no_update, $no_op);
     39my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $no_update, $no_op);
    4040GetOptions(
    4141           'det_id|d=s'        => \$det_id,
     
    4343           'det_type|t=s'      => \$det_type,
    4444           'camera=s'          => \$camera,
     45           'outroot|w=s'   => \$outroot,   # output file base name
    4546           'filter=s'          => \$filter,
    46            'workdir|w=s'       => \$workdir, # Working directory for output files
    4747           'dbname|d=s'        => \$dbname, # Database name
    4848           'no-update'         => \$no_update,
     
    5151
    5252pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    53 pod2usage( -msg => "Required options: --det_id --iteration --det_type --camera",
    54            -exitval => 3)
    55     unless defined $det_id
    56     and defined $iter
    57     and defined $det_type
    58     and defined $camera;
     53pod2usage( -msg => "Required options: --det_id --iteration --det_type --camera --outroot",
     54           -exitval => 3) unless
     55    defined $det_id   and
     56    defined $iter     and
     57    defined $det_type and
     58    defined $camera   and
     59    defined $outroot;
    5960
    6061# values to extract from output metadata and the stats to calculate
     
    141142my $reject_meanstdev = rejection_limit( 'ENSEMBLE.MEANSTDEV', $det_type, $filter );
    142143
    143 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    144 
    145 my $logName = $ipprc->file_prepare( "$camera.$det_type.$det_id.$iter.detreject.log", $workdir ); # Name for log
     144# outroot examples (HOST components must be set)
     145# file://data/ipp004.0/gpc1/20080130
     146# neb:///ipp004-v1/gpc1/20080130
     147# neb:///*/gpc1/20080130 (volume not specified)
     148
     149# check for existing directory, generate if needed
     150$ipprc->outroot_prepare($outroot);
     151
     152my $logName = $outroot . "log"; # Name for log
    146153
    147154my $logFile;
  • trunk/ippScripts/scripts/detrend_reject_imfile.pl

    r14823 r16196  
    4343
    4444# parse the command-line options
    45 my ($det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $workdir, $reduction, $no_update, $no_op);
     45my ($det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, $no_update, $no_op);
    4646GetOptions(
    4747           'det_id|d=s'        => \$det_id,
     
    5151           'det_type|t=s'      => \$det_type,
    5252           'camera=s'          => \$camera,
     53           'outroot|w=s'       => \$outroot,   # output file base name
    5354           'filter=s'          => \$filter,
    5455           'reject'            => \$reject,
    5556           'dbname|d=s'        => \$dbname, # Database name
    56            'workdir|w=s'       => \$workdir, # Working directory, for output files
    5757           'reduction|=s'      => \$reduction,
    5858           'no-update'         => \$no_update,
     
    6161
    6262pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    63 pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --det_type --camera",
    64            -exitval => 3)
    65     unless defined $det_id
    66     and defined $iter
    67     and defined $exp_id
    68     and defined $exp_tag
    69     and defined $det_type
    70     and defined $camera;
     63pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --det_type --camera --outroot",
     64           -exitval => 3) unless
     65    defined $det_id   and
     66    defined $iter     and
     67    defined $exp_id   and
     68    defined $exp_tag  and
     69    defined $det_type and
     70    defined $camera   and
     71    defined $outroot;
    7172
    7273# load IPP config information for the specified camera
     
    144145}
    145146
    146 # Output products
    147 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    148 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detresid.$det_id.$iter", $workdir, ${$files}[0]->{path_base} );
    149 my $jpeg1Name  = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    150 my $jpeg2Name  = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
    151 my $logName    = $ipprc->filename("LOG.EXP", $outputRoot); # Name for log
     147# outroot examples (HOST components must be set)
     148# file://data/ipp004.0/gpc1/20080130
     149# neb:///ipp004-v1/gpc1/20080130
     150# neb:///*/gpc1/20080130 (volume not specified)
     151
     152# check for existing directory, generate if needed
     153$ipprc->outroot_prepare($outroot);
     154
     155my $jpeg1Name  = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1
     156my $jpeg2Name  = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2
     157my $logName    = $ipprc->filename("LOG.EXP",       $outroot); # Name for log
    152158
    153159my $logFile;
     
    170176unless ($no_op) {
    171177    # Make the jpeg for binning 1
    172     $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     178    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    173179    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    174180        run(command => $command, verbose => 1);
     
    180186   
    181187    # Make the jpeg for binning 2
    182     $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     188    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    183189    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    184190        run(command => $command, verbose => 1);
     
    502508
    503509$command  = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_id $exp_id";
    504 $command .= " -recip $recipe1,$recipe2 -path_base $outputRoot ";
     510$command .= " -recip $recipe1,$recipe2 -path_base $outroot ";
    505511$command .= ' -reject' if $reject;
    506512$command .= " -dbname $dbname" if defined $dbname;
  • trunk/ippScripts/scripts/detrend_resid.pl

    r15616 r16196  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $dbname, $workdir, $reduction, $no_update, $no_op);
     34my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, $dbname, $reduction, $no_update, $no_op);
    3535GetOptions(
    3636    'det_id|d=s'        => \$det_id,
     
    4444    'camera|c=s'        => \$camera,
    4545    'mode|m=s'          => \$mode,
     46    'outroot|w=s'       => \$outroot,   # output file base name
    4647    'dbname|d=s'        => \$dbname, # Database name
    47     'workdir|w=s'       => \$workdir,   # Working directory, for output files
    4848    'reduction=s'       => \$reduction, # Reduction class
    4949    'no-update'         => \$no_update,
     
    5252
    5353pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    54 pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend (not for 'verify' mode)",
    55            -exitval => 3)
    56     unless defined $det_id
    57     and defined $iter
    58     and defined $exp_id
    59     and defined $exp_tag
    60     and defined $class_id
    61     and defined $det_type
    62     and defined $input_uri
    63     and defined $camera
    64     and defined $mode
    65     and (defined $detrend or lc($mode) eq 'verify');
     54pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)",
     55           -exitval => 3) unless
     56    defined $det_id    and
     57    defined $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 or lc($mode) eq 'verify');
    6667
    6768$ipprc->define_camera($camera);
     
    130131$ppImage .= " -dbname $dbname" if defined $dbname;
    131132
    132 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    133 
    134 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detresid.$det_id.$iter", $workdir, $input_uri );
    135 
    136 my $outputName  = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id);
    137 my $bin1Name    = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id);
    138 my $bin2Name    = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id);
    139 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outputRoot, $class_id);
    140 
    141 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages
    142 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages
     133# outroot examples (HOST components must be set)
     134# file://data/ipp004.0/gpc1/20080130
     135# neb:///ipp004-v1/gpc1/20080130
     136# neb:///*/gpc1/20080130 (volume not specified)
     137
     138# check for existing directory, generate if needed
     139$ipprc->outroot_prepare($outroot);
     140
     141my $outputName  = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id);
     142my $bin1Name    = $ipprc->filename("PPIMAGE.BIN1",   $outroot, $class_id);
     143my $bin2Name    = $ipprc->filename("PPIMAGE.BIN2",   $outroot, $class_id);
     144my $outputStats = $ipprc->filename("PPIMAGE.STATS",  $outroot, $class_id);
     145my $traceDest   = $ipprc->filename("TRACE.IMFILE",   $outroot, $class_id);
     146my $logDest     = $ipprc->filename("LOG.IMFILE",     $outroot, $class_id);
    143147
    144148# Run ppImage & ppStats
    145149unless ($no_op) {
    146     my $command = "$ppImage -file $input_uri $outputRoot";
     150    my $command = "$ppImage -file $input_uri $outroot";
    147151    $command .= " -recipe PPIMAGE $recipe";
    148152    $command .= " -recipe PPSTATS RESIDUAL";
     
    205209$command .= " -recip $recipe";
    206210$command .= " -uri $outputName";
    207 $command .= " -path_base $outputRoot";
     211$command .= " -path_base $outroot";
    208212$command .= " -dbname $dbname" if defined $dbname;
    209213$command .= $stats->cmdflags();
  • trunk/ippScripts/scripts/detrend_stack.pl

    r15467 r16196  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $reduction, $no_update, $no_op, $quiet);
     35my ($det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op, $quiet);
    3636GetOptions(
    3737    'det_id|d=s'        => \$det_id,
     
    4040    'det_type|t=s'      => \$det_type,
    4141    'camera|c=s'        => \$camera,
     42    'outroot|w=s'       => \$outroot,   # output file base name
    4243    'dbname|d=s'        => \$dbname, # Database name
    43     'workdir|w=s'       => \$workdir, # Working directory, for output files
    4444    'reduction=s'       => \$reduction, # Reduction class for processing
    4545    'no-update'         => \$no_update,
     
    4949
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --det_id --iteration --class_id --det_type --camera",
    52            -exitval => 3)
    53     unless defined $det_id
    54     and defined $iter
    55     and defined $class_id
    56     and defined $det_type
    57     and defined $camera;
     51pod2usage( -msg => "Required options: --det_id --iteration --class_id --det_type --camera --outroot",
     52           -exitval => 3) unless
     53    defined $det_id   and
     54    defined $iter     and
     55    defined $class_id and
     56    defined $det_type and
     57    defined $camera   and
     58    defined $outroot;
    5859
    5960my $verbose = 1;
     
    111112}
    112113
    113 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    114 
    115 my $outputRoot  = $ipprc->file_prepare( "$camera.$det_type.$det_id.$iter.$class_id", $workdir, ${$files}[0]->{uri} );
    116 my $outputStack = $outputRoot . '.fits'; # Output name
    117 my $outputStats = $outputRoot . '.stats'; # Statistics name
    118 
    119 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
    120 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".log"; # Log messages
     114# outroot examples (HOST components must be set)
     115# file://data/ipp004.0/gpc1/20080130
     116# neb:///ipp004-v1/gpc1/20080130
     117# neb:///*/gpc1/20080130 (volume not specified)
     118
     119# check for existing directory, generate if needed
     120$ipprc->outroot_prepare($outroot);
     121
     122## XXX should we be using the filerules here?
     123my $outputStack = $outroot . '.fits'; # Output name
     124my $outputStats = $outroot . '.stats'; # Statistics name
     125my $traceDest   = $outroot . '.trace'; # Trace messages
     126my $logDest     = $outroot . '.log'; # Log messages
    121127
    122128$command = "$ppMerge $outputStack"; # Command to run
  • trunk/ippScripts/scripts/register_exp.pl

    r16172 r16196  
    3434    );
    3535
    36 my ($cache, $exp_id, $exp_tag, $workdir, $dbname, $no_update, $no_op);
     36my ($cache, $exp_id, $exp_tag, $dbname, $no_update, $no_op);
    3737GetOptions(
    3838    'caches'        => \$cache,
    3939    'exp_id|e=s'    => \$exp_id,
    4040    'exp_tag|t=s'   => \$exp_tag,
    41     'workdir|w=s'   => \$workdir, # Working directory for output files
    4241    'dbname|d=s'    => \$dbname, # Database name   
    4342    'no-update'     => \$no_update,
  • trunk/ippScripts/scripts/register_imfile.pl

    r15779 r16196  
    3737use Pod::Usage qw( pod2usage );
    3838
    39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $workdir, $dbname, $no_update, $no_op);
     39my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $no_update, $no_op);
    4040GetOptions(
    4141    'caches'           => \$cache,
     
    4444    'tmp_exp_name|n=s' => \$tmp_exp_name,
    4545    'uri|u=s'          => \$uri,
    46     'workdir|w=s'      => \$workdir, # Working directory for output files
    4746    'dbname|d=s'       => \$dbname,# Database name
    4847    'no-update'        => \$no_update,
Note: See TracChangeset for help on using the changeset viewer.