Changeset 27690
- Timestamp:
- Apr 14, 2010, 4:49:51 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/chip_outputs.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/chip_outputs.pl
r27668 r27690 12 12 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 13 13 14 use constant MUGGLE => { 'IMAGE' => 1, 15 'MASK' => 1, 16 'VARIANCE' => 1, 17 }; 18 14 19 use constant EXTENSIONS => { 'IMAGE' => '.ch.fits', # Image 15 20 'MASK' => '.ch.mk.fits', # Mask … … 24 29 my ($input); # Input list 25 30 my ($products); # Products of interest 31 my ($muggle); # Retrieve un-magicked data? 26 32 27 33 GetOptions( … … 33 39 'class_id=s' => \$class_id, # Class identifier 34 40 'products=s' => \$products, # Products of interest 41 'muggle' => \$muggle, # Retrieve un-magicked data? 35 42 ) or die "Unable to parse arguments.\n"; 36 43 die "Unknown option: @ARGV\n" if @ARGV; … … 60 67 my @products; # Array of products 61 68 if (defined $products) { 62 @products = split /,/, $products;69 @products = split(/,/, $products); 63 70 } else { 64 71 @products = keys %{EXTENSIONS()}; … … 71 78 my $name = "$path.$class_id"; # Full name 72 79 foreach my $product ( @products ) { 73 copy_extension( $name, ${EXTENSIONS()}{$product} ); 80 my $base = $name; 81 if ($muggle and defined ${MUGGLE()}{$product}) { 82 my @file = split /\//, $base; 83 my $last = pop @file; 84 push @file, "SR_$last"; 85 $base = join '/', @file; 86 } 87 copy_extension( $base, ${EXTENSIONS()}{$product} ); 74 88 } 75 89 }
Note:
See TracChangeset
for help on using the changeset viewer.
