Index: /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 16726)
+++ /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 16727)
@@ -1,5 +1,5 @@
 # Copyright (c) 2006  Paul Price, Joshua Hoblitt
 #
-# $Id: Config.pm,v 1.76 2008-02-22 20:20:37 eugene Exp $
+# $Id: Config.pm,v 1.77 2008-02-29 00:57:50 price Exp $
 
 package PS::IPP::Config;
@@ -1023,4 +1023,37 @@
 }
 
+sub skycell_file
+{
+    my $self = shift;		# Configuration object
+    my $tess_id = shift;	# Tessellation identifier
+    my $skycell_id = shift;	# Skycell identifier
+    my $outname = shift;	# Output name
+    my $verbose = shift;	# Verbose?
+
+    unless (defined $self and defined $tess_id and defined $skycell_id and defined $outname) {
+	carp "Input parameters not defined";
+	return 0;
+    }
+
+    my $dvoImageExtract = can_run('dvoImageExtract') or die "Can't find dvoImageExtract";
+    
+    my $tess_dir = $self->tessellation_catdir( $tess_id ); # Tessellation catdir for DVO
+    unless (defined $tess_dir) {
+	carp "Can't get list of tessellations.";
+	return 0;
+    }
+    $tess_dir = $self->convert_filename_absolute( $tess_dir );
+
+    unless ($self->file_exists( $outName )) {
+	my $outNameResolved = $self->file_create( $outName ); # Resolved filename, for Nebulous
+	my $command = "$dvoImageExtract -D CATDIR $tess_dir $skycell_id -o $outNameResolved";
+	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+	    run(command => $command, verbose => $verbose);
+	die "Unable to perform dvoImageExtract for $tess_id $skycell_id\n" unless ($success and $self->file_exists( $outName ));
+    }
+
+    return 1;
+}
+
 # Interpolate environment variables in a directory (or colon-delimited list of directories)
 sub _interpolate_env
