Changeset 16196
- Timestamp:
- Jan 22, 2008, 5:36:36 PM (18 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 13 edited
-
camera_exp.pl (modified) (9 diffs)
-
chip_imfile.pl (modified) (5 diffs)
-
detrend_norm_apply.pl (modified) (6 diffs)
-
detrend_norm_calc.pl (modified) (2 diffs)
-
detrend_norm_exp.pl (modified) (6 diffs)
-
detrend_process_exp.pl (modified) (6 diffs)
-
detrend_process_imfile.pl (modified) (5 diffs)
-
detrend_reject_exp.pl (modified) (4 diffs)
-
detrend_reject_imfile.pl (modified) (7 diffs)
-
detrend_resid.pl (modified) (5 diffs)
-
detrend_stack.pl (modified) (4 diffs)
-
register_exp.pl (modified) (1 diff)
-
register_imfile.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r16018 r16196 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($exp_tag, $cam_id, $ recipe, $camera, $dbname, $workdir, $reduction, $dvodb, $no_update, $no_op);39 my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op); 40 40 GetOptions( 41 41 'exp_tag=s' => \$exp_tag, # Exposure identifier … … 44 44 'camera|c=s' => \$camera, # Camera 45 45 'dbname|d=s' => \$dbname, # Database name 46 ' workdir|w=s' => \$workdir, # Working directory46 'outroot|w=s' => \$outroot, # output file base name 47 47 'reduction=s' => \$reduction, # Reduction class 48 48 'dvodb|w=s' => \$dvodb, # output DVO database … … 55 55 -msg => "Required options: --exp_tag --cam_id --camera", 56 56 -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; 60 62 61 63 $ipprc->define_camera($camera); … … 136 138 } 137 139 140 ### not needed to have such an extensive temp file name. 138 141 my ($list1File, $list1Name) = tempfile( "$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => 1 ); # For binning 1 139 142 my ($list2File, $list2Name) = tempfile( "$exp_tag.cm.$cam_id.b2.list.XXXX", UNLINK => 1 ); # For binning 2 … … 162 165 163 166 # 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 169 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 170 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 171 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 172 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 173 my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 173 174 174 175 # convert supplied DVO database name to UNIX filename … … 184 185 # Make the jpeg for binning 1 185 186 { 186 my $command = "$ppImage -list $list1Name $out putRoot -recipe PPIMAGE $recipe1"; # Command to run187 my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 187 188 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 188 189 run(command => $command, verbose => 1); … … 196 197 # Make the jpeg for binning 2 197 198 { 198 my $command = "$ppImage -list $list2Name $out putRoot -recipe PPIMAGE $recipe2"; # Command to run199 my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 199 200 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 200 201 run(command => $command, verbose => 1); … … 229 230 # XXX add a ppStats call which will collect the astrometry stats 230 231 my $command; 231 $command = "$psastro -list $list3Name $out putRoot";232 $command = "$psastro -list $list3Name $outroot"; 232 233 $command .= " +mosastro -chipastro"; 233 234 $command .= " -F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF"; … … 276 277 $fpaCommand .= " -cam_id $cam_id"; 277 278 $fpaCommand .= " -uri UNKNOWN"; 278 $fpaCommand .= " -path_base $out putRoot";279 $fpaCommand .= " -path_base $outroot"; 279 280 $fpaCommand .= " -dbname $dbname" if defined $dbname; 280 281 $fpaCommand .= $chipStats->cmdflags(); -
trunk/ippScripts/scripts/chip_imfile.pl
r15466 r16196 33 33 34 34 # Parse the command-line arguments 35 my ($exp_id, $ chip_id, $class_id, $uri, $exp_tag, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);35 my ($exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 36 36 GetOptions( 37 37 'exp_id=s' => \$exp_id, # Exposure identifier 38 'exp_tag=s' => \$exp_tag, # Exposure identifier 38 39 'chip_id=s' => \$chip_id, # Chiptool identifier 39 40 'class_id=s' => \$class_id, # Class identifier 40 41 'uri|u=s' => \$uri, # Input FITS file 41 42 'camera|c=s' => \$camera, # Camera 43 'outroot|w=s' => \$outroot, # output file base name 42 44 'dbname|d=s' => \$dbname, # Database name 43 'exp_tag=s' => \$exp_tag, # Exposure identifier44 'workdir|w=s' => \$workdir, # Working directory, for output files45 45 'reduction=s' => \$reduction, # Reduction class 46 46 'no-update' => \$no_update, # Don't update the database? … … 49 49 50 50 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 51 pod2usage( -msg => "Required options: --exp_id --exp_tag --chip_id --class_id --uri --camera ",51 pod2usage( -msg => "Required options: --exp_id --exp_tag --chip_id --class_id --uri --camera --outroot", 52 52 -exitval => 3) unless 53 53 defined $exp_id and 54 defined $exp_tag and 54 55 defined $chip_id and 55 56 defined $class_id and 56 57 defined $uri and 57 defined $ exp_tagand58 defined $ camera;58 defined $camera and 59 defined $outroot; 59 60 60 61 $ipprc->define_camera($camera); … … 100 101 &my_die("Couldn't find input file: $uri\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($uri); 101 102 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 112 my $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); 113 my $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); 114 my $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); 115 my $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); 116 my $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); 117 my $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); 118 my $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); 119 my $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); 115 120 116 121 # Run ppImage 117 122 unless ($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"; 119 126 $command .= " -recipe PPIMAGE $recipe"; 120 127 $command .= " -recipe PPSTATS CHIPSTATS"; … … 130 137 } 131 138 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); 138 145 139 146 # Get the statistics on the processed image … … 162 169 $command .= " -class_id $class_id"; 163 170 $command .= " -uri $outputImage"; 164 $command .= " -path_base $out putRoot";171 $command .= " -path_base $outroot"; 165 172 $command .= " -dbname $dbname" if defined $dbname; 166 173 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r15918 r16196 33 33 34 34 # Parse the command-line 35 my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $ dbname, $workdir, $no_update, $no_op);35 my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $no_update, $no_op); 36 36 GetOptions( 37 37 'det_id|d=s' => \$det_id, # Detrend ID … … 42 42 'camera|c=s' => \$camera, # Camera 43 43 'det_type|t=s' => \$det_type, # Detrend type 44 'outroot|w=s' => \$outroot, # output file base name 44 45 'dbname|d=s' => \$dbname, # Database name 45 'workdir|w=s' => \$workdir, # Working directory, for output files46 46 'no-update' => \$no_update, # Don't update the database 47 47 'no-op' => \$no_op, # Don't do any operations … … 49 49 50 50 pod2usage( -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; 51 pod2usage( -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; 60 61 61 62 $ipprc->define_camera($camera); … … 90 91 &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); 91 92 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 101 my $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); 102 my $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); 103 my $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); 104 my $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); 105 my $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); 106 my $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); 103 107 104 108 # Run normalisation 105 109 unless ($no_op) { 106 my $command = "$ppImage -file $input_uri $out putRoot";110 my $command = "$ppImage -file $input_uri $outroot"; 107 111 $command .= " -norm $value -stats $statsName"; 108 112 $command .= " -recipe PPIMAGE $RECIPE_PPIMAGE"; … … 118 122 &my_die("Unable to perform ppImage: $error_code", $det_id, $iter, $class_id, $error_code); 119 123 } 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); 123 127 &my_die("Can't find expected output file: $statsName", $det_id, $iter, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($statsName); 124 128 … … 149 153 $command .= " -class_id $class_id"; 150 154 $command .= " -uri $output"; 151 $command .= " -path_base $out putRoot";155 $command .= " -path_base $outroot"; 152 156 $command .= " -dbname $dbname" if defined $dbname; 153 157 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_norm_calc.pl
r15616 r16196 32 32 33 33 # Parse command-line arguments 34 my ($det_id, $iter, $detType, $ workdir, $dbname, $no_update, $no_op);34 my ($det_id, $iter, $detType, $outroot, $dbname, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, # Detrend id 37 37 'iteration|i=s' => \$iter, # Iteration 38 38 '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 40 40 'dbname|d=s' => \$dbname, # Database name 41 41 'no-update' => \$no_update, # Don't update the database? … … 44 44 45 45 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 46 pod2usage( -msg => "Required options --det_id --iteration --det_type ",46 pod2usage( -msg => "Required options --det_id --iteration --det_type --outroot", 47 47 -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; 52 53 53 54 use constant STATISTIC => 'bg'; # Background statistic to use from the database -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r15853 r16196 35 35 use Pod::Usage qw( pod2usage ); 36 36 37 my ($det_id, $iter, $det_type, $camera, $ dbname, $workdir, $reduction, $no_update, $no_op);37 my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 38 38 GetOptions( 39 39 'det_id|d=s' => \$det_id, … … 41 41 'camera|c=s' => \$camera, 42 42 'det_type|t=s' => \$det_type, 43 'outroot|w=s' => \$outroot, # output file base name 43 44 'dbname|d=s' => \$dbname, # Database name 44 'workdir|w=s' => \$workdir, # Working directory, for output files45 45 'reduction|=s' => \$reduction, 46 46 'no-update' => \$no_update, … … 49 49 50 50 pod2usage( -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; 51 pod2usage( -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; 57 58 58 59 $ipprc->define_camera($camera); … … 126 127 close $list2File; 127 128 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 137 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1 138 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2 133 139 134 140 unless ($no_op) { 135 141 # Make the jpeg for binning 1 136 $command = "$ppImage -list $list1Name $out putRoot -recipe PPIMAGE $recipe1"; # Command to run142 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 137 143 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 138 144 run(command => $command, verbose => 1); … … 140 146 141 147 # Make the jpeg for binning 2 142 $command = "$ppImage -list $list2Name $out putRoot -recipe PPIMAGE $recipe2"; # Command to run148 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 143 149 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 144 150 run(command => $command, verbose => 1); … … 152 158 $command .= " -iteration $iter"; 153 159 $command .= " -recip $recipe1,$recipe2"; 154 $command .= " -path_base $out putRoot ";160 $command .= " -path_base $outroot "; 155 161 $command .= " -dbname $dbname" if defined $dbname; 156 162 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_process_exp.pl
r15643 r16196 35 35 use Pod::Usage qw( pod2usage ); 36 36 37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $ dbname, $workdir, $reduction, $no_update, $no_op);37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 38 38 GetOptions( 39 39 'det_id|d=s' => \$det_id, … … 42 42 'exp_tag|=s' => \$exp_tag, 43 43 'camera|c=s' => \$camera, 44 'outroot|w=s' => \$outroot, # output file base name 44 45 'dbname|d=s' => \$dbname, # Database name 45 'workdir|w=s' => \$workdir, # Working directory, for output files46 46 'reduction|=s' => \$reduction, 47 47 'no-update' => \$no_update, … … 50 50 51 51 pod2usage( -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; 52 pod2usage( -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; 59 60 60 61 $ipprc->define_camera($camera); … … 129 130 close $list2File; 130 131 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 140 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1 141 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2 136 142 137 143 unless ($no_op) { 138 144 # Make the jpeg for binning 1 139 $command = "$ppImage -list $list1Name $out putRoot -recipe PPIMAGE $recipe1"; # Command to run145 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 140 146 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 141 147 run(command => $command, verbose => 1); … … 147 153 148 154 # Make the jpeg for binning 2 149 $command = "$ppImage -list $list2Name $out putRoot -recipe PPIMAGE $recipe2"; # Command to run155 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 150 156 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 151 157 run(command => $command, verbose => 1); … … 161 167 $command .= " -det_id $det_id"; 162 168 $command .= " -exp_id $exp_id"; 163 $command .= " -recip $recipe1,$recipe2 -path_base $out putRoot";169 $command .= " -recip $recipe1,$recipe2 -path_base $outroot"; 164 170 $command .= " -dbname $dbname" if defined $dbname; 165 171 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r15466 r16196 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $ dbname, $workdir, $reduction, $no_update, $no_op);34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, … … 41 41 'input_uri|u=s' => \$input_uri, 42 42 'camera|c=s' => \$camera, 43 'outroot|w=s' => \$outroot, # output file base name 43 44 'dbname|d=s' => \$dbname, # Database name 44 'workdir|w=s' => \$workdir, # Working directory, for output files45 45 'reduction=s' => \$reduction, # Reduction class 46 46 'no-update' => \$no_update, … … 49 49 50 50 pod2usage( -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; 51 pod2usage( -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; 60 61 61 62 # XXX this exits with status = 0 on failure … … 88 89 &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); 89 90 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) 91 95 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); 93 98 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 99 my $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); 100 my $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); 101 my $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); 102 my $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); 103 my $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); 104 my $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); 101 105 102 106 # Run ppImage 103 107 unless ($no_op) { 104 my $command = "$ppImage -file $input_uri $out putRoot";108 my $command = "$ppImage -file $input_uri $outroot"; 105 109 $command .= " -recipe PPIMAGE $recipe"; 106 110 $command .= " -recipe PPSTATS CHIPSTATS"; … … 141 145 $command .= " -class_id $class_id"; 142 146 $command .= " -recip $reduction"; 143 $command .= " -uri $outputImage -path_base $out putRoot";147 $command .= " -uri $outputImage -path_base $outroot"; 144 148 $command .= " -dbname $dbname" if defined $dbname; 145 149 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_reject_exp.pl
r15489 r16196 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($det_id, $iter, $det_type, $camera, $ filter, $workdir, $dbname, $no_update, $no_op);39 my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $no_update, $no_op); 40 40 GetOptions( 41 41 'det_id|d=s' => \$det_id, … … 43 43 'det_type|t=s' => \$det_type, 44 44 'camera=s' => \$camera, 45 'outroot|w=s' => \$outroot, # output file base name 45 46 'filter=s' => \$filter, 46 'workdir|w=s' => \$workdir, # Working directory for output files47 47 'dbname|d=s' => \$dbname, # Database name 48 48 'no-update' => \$no_update, … … 51 51 52 52 pod2usage( -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; 53 pod2usage( -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; 59 60 60 61 # values to extract from output metadata and the stats to calculate … … 141 142 my $reject_meanstdev = rejection_limit( 'ENSEMBLE.MEANSTDEV', $det_type, $filter ); 142 143 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 152 my $logName = $outroot . "log"; # Name for log 146 153 147 154 my $logFile; -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r14823 r16196 43 43 44 44 # 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);45 my ($det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, $no_update, $no_op); 46 46 GetOptions( 47 47 'det_id|d=s' => \$det_id, … … 51 51 'det_type|t=s' => \$det_type, 52 52 'camera=s' => \$camera, 53 'outroot|w=s' => \$outroot, # output file base name 53 54 'filter=s' => \$filter, 54 55 'reject' => \$reject, 55 56 'dbname|d=s' => \$dbname, # Database name 56 'workdir|w=s' => \$workdir, # Working directory, for output files57 57 'reduction|=s' => \$reduction, 58 58 'no-update' => \$no_update, … … 61 61 62 62 pod2usage( -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; 63 pod2usage( -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; 71 72 72 73 # load IPP config information for the specified camera … … 144 145 } 145 146 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 155 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1 156 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2 157 my $logName = $ipprc->filename("LOG.EXP", $outroot); # Name for log 152 158 153 159 my $logFile; … … 170 176 unless ($no_op) { 171 177 # Make the jpeg for binning 1 172 $command = "$ppImage -list $list1Name $out putRoot -recipe PPIMAGE $recipe1"; # Command to run178 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 173 179 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 174 180 run(command => $command, verbose => 1); … … 180 186 181 187 # Make the jpeg for binning 2 182 $command = "$ppImage -list $list2Name $out putRoot -recipe PPIMAGE $recipe2"; # Command to run188 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 183 189 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 184 190 run(command => $command, verbose => 1); … … 502 508 503 509 $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_id $exp_id"; 504 $command .= " -recip $recipe1,$recipe2 -path_base $out putRoot ";510 $command .= " -recip $recipe1,$recipe2 -path_base $outroot "; 505 511 $command .= ' -reject' if $reject; 506 512 $command .= " -dbname $dbname" if defined $dbname; -
trunk/ippScripts/scripts/detrend_resid.pl
r15616 r16196 32 32 use Pod::Usage qw( pod2usage ); 33 33 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);34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, $dbname, $reduction, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, … … 44 44 'camera|c=s' => \$camera, 45 45 'mode|m=s' => \$mode, 46 'outroot|w=s' => \$outroot, # output file base name 46 47 'dbname|d=s' => \$dbname, # Database name 47 'workdir|w=s' => \$workdir, # Working directory, for output files48 48 'reduction=s' => \$reduction, # Reduction class 49 49 'no-update' => \$no_update, … … 52 52 53 53 pod2usage( -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'); 54 pod2usage( -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'); 66 67 67 68 $ipprc->define_camera($camera); … … 130 131 $ppImage .= " -dbname $dbname" if defined $dbname; 131 132 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 141 my $outputName = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id); 142 my $bin1Name = $ipprc->filename("PPIMAGE.BIN1", $outroot, $class_id); 143 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outroot, $class_id); 144 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id); 145 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id); 146 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id); 143 147 144 148 # Run ppImage & ppStats 145 149 unless ($no_op) { 146 my $command = "$ppImage -file $input_uri $out putRoot";150 my $command = "$ppImage -file $input_uri $outroot"; 147 151 $command .= " -recipe PPIMAGE $recipe"; 148 152 $command .= " -recipe PPSTATS RESIDUAL"; … … 205 209 $command .= " -recip $recipe"; 206 210 $command .= " -uri $outputName"; 207 $command .= " -path_base $out putRoot";211 $command .= " -path_base $outroot"; 208 212 $command .= " -dbname $dbname" if defined $dbname; 209 213 $command .= $stats->cmdflags(); -
trunk/ippScripts/scripts/detrend_stack.pl
r15467 r16196 33 33 use Pod::Usage qw( pod2usage ); 34 34 35 my ($det_id, $iter, $class_id, $det_type, $camera, $ dbname, $workdir, $reduction, $no_update, $no_op, $quiet);35 my ($det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op, $quiet); 36 36 GetOptions( 37 37 'det_id|d=s' => \$det_id, … … 40 40 'det_type|t=s' => \$det_type, 41 41 'camera|c=s' => \$camera, 42 'outroot|w=s' => \$outroot, # output file base name 42 43 'dbname|d=s' => \$dbname, # Database name 43 'workdir|w=s' => \$workdir, # Working directory, for output files44 44 'reduction=s' => \$reduction, # Reduction class for processing 45 45 'no-update' => \$no_update, … … 49 49 50 50 pod2usage( -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; 51 pod2usage( -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; 58 59 59 60 my $verbose = 1; … … 111 112 } 112 113 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? 123 my $outputStack = $outroot . '.fits'; # Output name 124 my $outputStats = $outroot . '.stats'; # Statistics name 125 my $traceDest = $outroot . '.trace'; # Trace messages 126 my $logDest = $outroot . '.log'; # Log messages 121 127 122 128 $command = "$ppMerge $outputStack"; # Command to run -
trunk/ippScripts/scripts/register_exp.pl
r16172 r16196 34 34 ); 35 35 36 my ($cache, $exp_id, $exp_tag, $ workdir, $dbname, $no_update, $no_op);36 my ($cache, $exp_id, $exp_tag, $dbname, $no_update, $no_op); 37 37 GetOptions( 38 38 'caches' => \$cache, 39 39 'exp_id|e=s' => \$exp_id, 40 40 'exp_tag|t=s' => \$exp_tag, 41 'workdir|w=s' => \$workdir, # Working directory for output files42 41 'dbname|d=s' => \$dbname, # Database name 43 42 'no-update' => \$no_update, -
trunk/ippScripts/scripts/register_imfile.pl
r15779 r16196 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $ workdir, $dbname, $no_update, $no_op);39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $no_update, $no_op); 40 40 GetOptions( 41 41 'caches' => \$cache, … … 44 44 'tmp_exp_name|n=s' => \$tmp_exp_name, 45 45 'uri|u=s' => \$uri, 46 'workdir|w=s' => \$workdir, # Working directory for output files47 46 'dbname|d=s' => \$dbname,# Database name 48 47 'no-update' => \$no_update,
Note:
See TracChangeset
for help on using the changeset viewer.
