Changeset 18433
- Timestamp:
- Jul 7, 2008, 10:29:08 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/ipp_image_path.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_image_path.pl
r17928 r18433 3 3 # ipp_image_path.pl print out the unix path name(s) for rawImage files for an exposure 4 4 # 5 # XXX TODO add argument to get paths to chip processed images6 5 7 6 use warnings; 8 7 use strict; 8 9 # get images that are on ipp008 from alternative location until the 10 # dataase is updated 11 my $use_008_workaround = 1; 9 12 10 13 use vars qw( $VERSION ); … … 92 95 $path = $uri; 93 96 } else { 94 $path = $ipprc->file_resolve($uri); 97 if ($use_008_workaround && ($uri =~ /ipp008/)) { 98 $path = resolve_ipp008_file($uri); 99 } else { 100 $path = $ipprc->file_resolve($uri); 101 } 95 102 } 96 103 if ($path) { … … 127 134 } 128 135 136 sub resolve_ipp008_file { 137 my %locations = ( "ota24" => "ipp006", 138 "ota25" => "ipp009", 139 "ota26" => "ipp011", 140 "ota27" => "ipp019", 141 "ota30" => "ipp020", 142 "ota31" => "ipp021" 143 ); 144 145 my $uri = shift; 146 147 # uri's look like neb://ipp008.0/gpc1/20080625/o4642g0400o/o4642g0400o.ota24.fits 148 149 my ($left, $middle, $ota, $fits) = split '\.', $uri; 150 151 my $node = $locations{$ota}; 152 153 die "can't find node for $ota: $uri" if (!$node); 154 155 my $path = $uri; 156 157 $path =~ s%neb://ipp008.0%/data/${node}.0/recover08%; 158 159 die "sorry backup image for $uri not found\n" if (!-e $path); 160 161 return $path; 162 }
Note:
See TracChangeset
for help on using the changeset viewer.
