Index: /trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9179)
+++ /trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9180)
@@ -11,4 +11,8 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 use Statistics::Descriptive;
+
+use PS::IPP::Config;
+my $ipprc = PS::IPP::Config->new(); # IPP configuration
+use File::Spec;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
@@ -84,6 +88,10 @@
 }
 
+my $example = ${$files}[0]->{b1_uri}; # Example filename
+my ($vol, $dir, $file) = File::Spec->splitpath( $example );
+
 # Generate the file list, and get the statistics
 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name
+$outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() );
 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
 my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2
@@ -93,6 +101,6 @@
 open my $list2File, '>' . $list2Name;
 foreach my $file (@$files) {
-    print $list1File $file->{b1_uri} . "\n";
-    print $list2File $file->{b2_uri} . "\n";
+    print $list1File File::Spec->rel2abs( $file->{b1_uri}, $ipprc->workdir() ) . "\n";
+    print $list2File File::Spec->rel2abs( $file->{b2_uri}, $ipprc->workdir() ) . "\n";
     push @means, $file->{bg};
     push @stdevs, $file->{bg_stdev};
@@ -121,5 +129,7 @@
 }
 
+
 # Add the result into the database
+$outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() );
 unless ($no_update) {
     my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " .
Index: /trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- /trunk/ippScripts/scripts/detrend_stack.pl	(revision 9179)
+++ /trunk/ippScripts/scripts/detrend_stack.pl	(revision 9180)
@@ -11,4 +11,8 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 use PS::IPP::Metadata::Stats;
+
+use PS::IPP::Config;
+my $ipprc = PS::IPP::Config->new(); # IPP configuration
+use File::Spec;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
@@ -73,6 +77,10 @@
 }
 
+my $example = ${$files}[0]->{uri}; # Example file
+my ($vol, $dir, $file) = File::Spec->splitpath( $example );
+
 # Stack the files
 my $outputRoot = $camera . '.' . $det_type . '.' . $det_id . '.' . $iter . '.' . $class_id; # Root name
+$outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() );
 my $outputStack = $outputRoot . '.fits'; # Output name
 my $outputStats = $outputRoot . '.stats'; # Statistics name
@@ -81,4 +89,5 @@
     foreach my $file (@$files) {
 	my $uri = $file->{uri};	# URI for input file
+	$uri = File::Spec->rel2abs( $uri, $ipprc->workdir() );
 	$command .= ' ' . $uri;
     }
@@ -93,6 +102,4 @@
     die "Unable to find expected output file: $outputStats\n" if not -f $outputStats;
 }
-
-### Could do some sort of JPEG generation here.
 
 # Get the statistics on the stacked image
@@ -112,4 +119,5 @@
 
 # Add the resultant into the database
+$outputStack = File::Spec->abs2rel( $outputStack, $ipprc->workdir() );
 unless ($no_update) {
     my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id" .
