Index: trunk/ippScripts/scripts/ipp_image_path.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_image_path.pl	(revision 18410)
+++ trunk/ippScripts/scripts/ipp_image_path.pl	(revision 18433)
@@ -3,8 +3,11 @@
 # ipp_image_path.pl print out the unix path name(s) for rawImage files for an exposure
 #
-# XXX TODO add argument to get paths to chip processed images
 
 use warnings;
 use strict;
+
+# get images that are on ipp008 from alternative location until the
+# dataase is updated
+my $use_008_workaround  = 1;
 
 use vars qw( $VERSION );
@@ -92,5 +95,9 @@
             $path =  $uri;
         } else {
-            $path = $ipprc->file_resolve($uri);
+            if ($use_008_workaround && ($uri =~ /ipp008/)) {
+                $path = resolve_ipp008_file($uri);
+            } else {
+                $path = $ipprc->file_resolve($uri);
+            }
         }
         if ($path) {
@@ -127,2 +134,29 @@
 }
 
+sub resolve_ipp008_file {
+    my %locations = ( "ota24" => "ipp006",
+                      "ota25" => "ipp009",
+                      "ota26" => "ipp011",
+                      "ota27" => "ipp019",
+                      "ota30" => "ipp020",
+                      "ota31" => "ipp021"
+                    );
+
+    my $uri = shift;
+
+    # uri's look like neb://ipp008.0/gpc1/20080625/o4642g0400o/o4642g0400o.ota24.fits
+    
+    my ($left, $middle, $ota, $fits) = split '\.', $uri;
+    
+    my $node = $locations{$ota};
+
+    die "can't find node for $ota: $uri" if (!$node);
+
+    my $path =  $uri;
+    
+    $path =~  s%neb://ipp008.0%/data/${node}.0/recover08%;
+
+    die "sorry backup image for $uri not found\n" if (!-e $path);
+
+    return $path;
+}
