IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2008, 4:56:26 PM (18 years ago)
Author:
eugene
Message:

making chip/host and nebulous upgrades

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080121/ippScripts/scripts/detrend_reject_imfile.pl

    r14823 r16176  
    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;
Note: See TracChangeset for help on using the changeset viewer.