Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 12051)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 12056)
@@ -37,5 +37,4 @@
 GetOptions(
     'diff_id|d=s'       => \$diff_id, # Diff identifier
-    'camera|c=s'        => \$camera, # Camera name
     'dbname|d=s'        => \$dbname, # Database name
     'workdir|w=s'       => \$workdir,	# Working directory, for output files
@@ -46,10 +45,7 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-    -msg => "Required options: --diff_id --camera",
+    -msg => "Required options: --diff_id",
     -exitval => 3,
-) unless defined $diff_id
-    and defined $camera;
-
-$ipprc->define_camera($camera);
+	  ) unless defined $diff_id;
 
 # Look for programs we need
@@ -88,4 +84,5 @@
 my $template;			# Template file
 my $skycell_id;			# Skycell identifier
+my $camera;			# Camera
 foreach my $file (@$files) {
     my $uri = $ipprc->convert_filename_absolute( $file->{uri} ); # URI for file
@@ -101,8 +98,14 @@
 	$skycell_id = $file->{skycell_id};
     }
+    if (defined $camera) {
+	&my_die("Cameras don't match", $diff_id, $PS_EXIT_SYS_ERROR) unless $file->{camera} eq $camera;
+    } else {
+	$camera = $file->{camera};
+    }
 }
 
 &my_die("Unable to identify template", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $template;
 &my_die("Unable to identify input", $diff_id, $PS_EXIT_SYS_ERROR) unless defined $input;
+$ipprc->define_camera($camera);
 
 ### Working directory
