Changeset 27449
- Timestamp:
- Mar 26, 2010, 10:15:03 AM (16 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
dist_bundle.pl (modified) (8 diffs)
-
dist_component.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_bundle.pl
r27018 r27449 59 59 60 60 # Parse the command-line arguments 61 my ($camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $ clean);61 my ($camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $alt_path_base, $clean); 62 62 my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality, $results_file, $prefix); 63 63 my ($dbname, $save_temps, $verbose, $no_update, $logfile); … … 76 76 'no_magic' => \$no_magic, # magic is not required for this distribution run 77 77 'magicked' => \$magicked, # magicked state for this component 78 'alt_path_base=s'=> \$alt_path_base, # path to alternate inputs 78 79 'outdir=s' => \$outdir, # "directory" for outputs 79 80 'prefix=s' => \$prefix, # "prefix" to apply to filenames … … 104 105 $ipprc->define_camera($camera); 105 106 106 # making a clean bundle of raw images doesn't make sense107 108 107 # create the output directories if it is not a nebulous path and it doesn't exist 109 108 if (index($outdir, "neb://") != 0) { … … 151 150 my ($inv_image, $inv_mask, $inv_variance); 152 151 153 # foreach my $file_rule (keys %$file_list) {154 152 my $num_files = 0; 155 153 foreach my $file (@$file_list) { … … 208 206 } elsif ($image_type eq 'inv_variance') { 209 207 $inv_variance = $file_name;; 208 } elsif ($image_type eq 'inv_variance') { 209 $inv_variance = $file_name;; 210 210 } else { 211 211 &my_die("invalid image type found: $image_type", $component, … … 225 225 # requires magic and hasn't been magicked, but we check again here 226 226 227 if (!($magicked or $no_magic )) {227 if (!($magicked or $no_magic or $alt_path_base)) { 228 228 &my_die("cannot create distribution bundle ${stage}_id $stage_id because the data has not been magic desreaked", $component, $PS_EXIT_DATA_ERROR); 229 229 } 230 230 231 231 &my_die("no image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$image; 232 &my_die("no mask image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$mask; 233 &my_die("no variance image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 232 if ($stage ne "raw") { 233 &my_die("no mask image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$mask; 234 &my_die("no variance image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$variance; 235 } 234 236 235 237 my $class_id; … … 240 242 # and so the camera mask and the chip mask are the same 241 243 $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $chip_path_base, $component); 242 my $fh = open_with_retries($mask); 244 my $mask_resolved = $ipprc->file_resolve($mask); 245 my $fh = open_with_retries($mask_resolved); 243 246 close $fh; 244 247 } elsif ($stage eq "chip") { … … 384 387 my @file_list; 385 388 if ($stage eq "raw") { 386 # XXX: TODO for now disttool sets path_base is set to the uri of the file387 # eventually rawImfile will have a path_base that we'll need to add '.fits'388 # XXX do we want to distribute the registration log files? 389 # raw files have no '.mdc' file thus we need to build the list of files by 390 # hand 391 # XXX do we want to distribute the registration log files? I vote no 389 392 if (!$clean) { 390 my %file; 391 $file{file_rule} = "RAW.IMAGE"; 392 $file{name} = $path_base; 393 push @file_list, \%file; 393 my %image; 394 $image{file_rule} = "RAW.IMAGE"; 395 my $image_name; 396 if ($alt_path_base) { 397 $image_name = "$alt_path_base.fits"; 398 } else { 399 $image_name = "$path_base.fits"; 400 } 401 $image{name} = $image_name; 402 push @file_list, \%image; 403 404 my %burntool_table; 405 $burntool_table{file_rule} = "BURNTOOL.TABLE"; 406 $burntool_table{name} = "$path_base.burn.tbl"; 407 push @file_list, \%burntool_table; 394 408 } 395 409 return \@file_list; -
trunk/ippScripts/scripts/dist_component.pl
r26049 r27449 38 38 39 39 # Parse the command-line arguments 40 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean );40 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean, $alt_path_base); 41 41 my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality); 42 42 my ($dbname, $save_temps, $verbose, $no_update, $logfile); … … 55 55 'no_magic' => \$no_magic, # magic is not required for this distribution run 56 56 'magicked' => \$magicked, # magicked state for this component 57 'alt_path_base=s'=> \$alt_path_base, # path to alternate inputs 57 58 'outdir=s' => \$outdir, # "directory" for outputs 58 59 'clean' => \$clean, # create clean distribution … … 97 98 $command .= " --no_magic" if defined $no_magic; 98 99 $command .= " --magicked" if defined $magicked; 100 $command .= " --alt_path_base $alt_path_base" if defined $alt_path_base; 99 101 $command .= " --clean" if defined $clean; 100 102 $command .= " --save-temps" if defined $save_temps;
Note:
See TracChangeset
for help on using the changeset viewer.
