Index: trunk/ippScripts/scripts/mergedvodb_merge.pl
===================================================================
--- trunk/ippScripts/scripts/mergedvodb_merge.pl	(revision 35302)
+++ trunk/ippScripts/scripts/mergedvodb_merge.pl	(revision 35306)
@@ -156,5 +156,5 @@
 	    $merge_command = "rsync -rvat $minidvodb_path/* $mergedvodb_path";
 	} else {
-	    $merge_command = "$dvomerge $minidvodb_path into $mergedvodb_path";
+	    $merge_command = "$dvomerge -parallel $minidvodb_path into $mergedvodb_path";
 	}
 	print "\n$merge_command\n";
Index: trunk/ippScripts/scripts/minidvodb_premerge.pl
===================================================================
--- trunk/ippScripts/scripts/minidvodb_premerge.pl	(revision 35302)
+++ trunk/ippScripts/scripts/minidvodb_premerge.pl	(revision 35306)
@@ -16,4 +16,5 @@
 my $dtime_relphot;
 my $dtime_script;
+my $dtime_delstar;
 
 use vars qw( $VERSION );
@@ -33,7 +34,9 @@
 my $dvomerge = can_run('dvomerge') or (warn "Can't find dvomerge" and $missing_tools = 1);
 my $addtool = can_run('addtool') or (warn "Can't find addtool" and $missing_tools = 1);
+my $delstar = can_run('delstar') or (warn "Can't find delstar" and $missing_tools = 1);
 my $addstar = can_run('addstar') or (warn "Can't find addstar" and $missing_tools = 1);
 my $relphot = can_run('relphot') or (warn "Can't find relphot" and $missing_tools = 1);
 my $relastro = can_run('relastro') or (warn "Can't find relastro" and $missing_tools = 1);
+
 my $dvoverify = can_run('dvoverify') or (warn "Can't find dvoverify" and $missing_tools = 1);
 
@@ -80,5 +83,26 @@
 unless ($no_op) {
     
-	#this is chopped into several parts: addstar, relphot
+	#this is chopped into several parts: delstar,addstar, relphot, relastro, dvoverify
+        #delstar - first step: are there duplicates, if so remove them
+	{
+            my $command  = "$delstar -update -dup-images ";
+            #$command .= " -D CAMERA $camera";
+            $command .= " -D CATDIR $minidvodb";
+            my $mjd_delstar_start = DateTime->now->mjd;   # MJD of starting script
+	    print "\n$command\n";
+            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+                run(command => $command, verbose => $verbose);
+            unless ($success) {
+                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+                &my_die("Unable to perform delstar: $error_code", $minidvodb_id, $error_code);
+            }
+	    print $full_buf;
+            $dtime_delstar = 86400.0*(DateTime->now->mjd - $mjd_delstar_start);  
+	    # MJD of starting script
+	    print "delstar time $dtime_delstar\n";
+        }
+
+
+
 	#addstar
 	{
@@ -94,6 +118,6 @@
                 &my_die("Unable to perform addstar: $error_code", $minidvodb_id, $error_code);
             }
-            $dtime_addstar = 86400.0*(DateTime->now->mjd - $mjd_addstar_start);  $dtime_resort = $dtime_addstar;
-            # MJD of starting script
+            $dtime_addstar = 86400.0*(DateTime->now->mjd - $mjd_addstar_start);  
+	    # MJD of starting script
 	    $dtime_resort = $dtime_addstar;
             print "addstar -resort time $dtime_addstar\n";
