Index: trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_0.dat
===================================================================
--- trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_0.dat	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_0.dat	(revision 39769)
@@ -0,0 +1,32 @@
+PSPS_PV3_P2_SLICE_09_3_2_0
+PSPS_PV3_P2_SLICE_09
+IPP_PSPS
+1
+LAP.PV3.MERGE
+/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master
+258
+274
+-21
+-17
+1
+/data/ipp104.1/ipptopsps/LAP.PV3.MERGE
+3
+1
+1
+1
+2016-04-26
+3PI
+PV3
+1
+0
+0
+0
+0
+0
+0
+1
+1
+use_original
+not_reproc
+2013-07-01
+2013-08-01
Index: trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_1.dat
===================================================================
--- trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_1.dat	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_1.dat	(revision 39769)
@@ -0,0 +1,32 @@
+PSPS_PV3_P2_SLICE_09_3_2_1
+PSPS_PV3_P2_SLICE_09
+IPP_PSPS
+1
+LAP.PV3.MERGE
+/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master
+258
+274
+-21
+-17
+1
+/data/ipp104.1/ipptopsps/LAP.PV3.MERGE
+3
+1
+1
+1
+2016-04-26
+3PI
+PV3
+1
+0
+0
+0
+0
+0
+0
+1
+1
+use_original
+not_reproc
+2013-08-01
+2013-09-01
Index: trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_2.dat
===================================================================
--- trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_2.dat	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_2.dat	(revision 39769)
@@ -0,0 +1,32 @@
+PSPS_PV3_P2_SLICE_09_3_2_2
+PSPS_PV3_P2_SLICE_09
+IPP_PSPS
+1
+LAP.PV3.MERGE
+/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master
+258
+274
+-21
+-17
+1
+/data/ipp104.1/ipptopsps/LAP.PV3.MERGE
+3
+1
+1
+1
+2016-04-26
+3PI
+PV3
+1
+0
+0
+0
+0
+0
+0
+1
+1
+use_original
+not_reproc
+2013-09-01
+2013-10-01
Index: trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_3.dat
===================================================================
--- trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_3.dat	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/PSPS_PV3_P2_SLICE_09_3_2_3.dat	(revision 39769)
@@ -0,0 +1,32 @@
+PSPS_PV3_P2_SLICE_09_3_2
+PSPS_PV3_P2_SLICE_09
+IPP_PSPS
+1
+LAP.PV3.MERGE
+/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master
+258
+274
+-21
+-17
+1
+/data/ipp104.1/ipptopsps/LAP.PV3.MERGE
+3
+1
+1
+1
+2016-04-26
+3PI
+PV3
+1
+0
+0
+0
+0
+0
+0
+1
+1
+use_original
+not_reproc
+2013-07-01
+2013-10-01
Index: trunk/tools/heather/PV3P2loaders/createPV3P2_padded0.pl
===================================================================
--- trunk/tools/heather/PV3P2loaders/createPV3P2_padded0.pl	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/createPV3P2_padded0.pl	(revision 39769)
@@ -0,0 +1,144 @@
+#!/usr/bin/env perl
+use vars qw ($queueOB, $queueST);
+
+
+while (<>) {
+#example line of the OB.txt file:
+#187   360   28    35    PSPS_PV3_OB_SLICE_22 3800.5985297 ipp101.0
+#settings for the queuer
+my @split = split (/\s+/, $_);
+
+$minra = $split[0];
+$maxra = $split[1];
+$mindec = $split[2];
+$maxdec = $split[3];
+$datastore = $split[4];
+$drive = $split[6];
+
+$pspssurvey = 'PV3';
+$ippsurvey = '3PI';
+$datarelease = '3';
+#$datastore_stub = 'PSPS_PV3_TEST_';
+$dvodb = 'LAP.PV3.MERGE';
+$dvodb_path = '/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master';
+
+
+$skychunk = $datastore; 
+
+#@stage = ("OB","P2","ST","IN","FO","FW");
+@stage = ("P2");
+   $queueP2 = 0;
+   $queueST = 0;
+   $queueOB = 0;
+   $queueFW = 0;
+   $queueFO = 0;
+
+
+$date1='2007-05-01';
+$date2='2016-09-01';
+
+foreach $mid (@stage) {
+    $loadername = $skychunk;
+   $main::queueP2 = 0;
+   $main::queueST = 0;
+   $main::queueOB = 0;
+   $main::queueFW = 0;
+   $main::queueFO = 0;
+
+    if ($mid =~ /P2/) {
+	$main::queueP2 = 1;
+	$main::queueST = 0;
+	$main::queueOB = 0;
+	$main::queueFW = 0;
+	$main::queueFO = 0;
+    }
+
+
+ #  print "$mid $main::queueP2  $main::queueST $main::queueOB $main::queueFW $main::queueFO\n";
+
+$date = "2016-04-26";
+
+#md 04 is 150 2.2
+
+$box = 1;
+
+$rabox = $maxra - $minra;
+$decbox = $maxdec -$mindec;
+
+
+#first check if $maxra - $minra is a multiple of box
+if ($rabox % $box == 0) {
+#    print "ra boxsize seems ok\n";
+} else {
+    print "ra boxsize not ok\n";
+}
+if ($decbox % $box == 0) {
+#    print "dec boxsize seems ok \n";
+} else {
+    print "dec boxsize not ok\n";
+}
+
+$compra = ($maxra-$minra) % $box;
+if ($compra == 0) {
+#    print "min/max ra is a multiple of $box\n";
+} else {
+    print "min/max ra is not a multiple of $box\n";
+}
+
+$compdec = ($maxdec - $mindec) % $box;
+if ($compdec == 0) {
+ #   print "min/max dec is a multiple of $box\n";
+} else {
+    print "min/max dec is not a multiple of $box\n";
+}
+
+    
+	#$mid = "ALL";
+	$file = "$skychunk.dat";
+	open FILE, ">", $file or die $!;
+	
+
+	print FILE "$skychunk\n";  #skychunk name
+	print FILE "$datastore\n";                     #datstore product
+	print FILE "IPP_PSPS\n";                       #datastore type
+	print FILE "1\n";                              #publish to datastore
+	print FILE "$dvodb\n";                         #dvolabel
+	print FILE "$dvodb_path\n";                    #dvopath
+	print FILE "$minra\n";                            #rmin 
+	$ra1 = $ra + $rabox;                      #rmax 
+	print FILE "$maxra\n";                           
+	print FILE "$mindec\n";                           #decmin 
+	$dec1 = $dec + $decbox;  
+	print FILE "$maxdec\n";                          #decmax
+	print FILE "$box\n";                           #box
+	print FILE "/data/$drive/ipptopsps/$dvodb\n";              #output dir
+	print FILE "3\n";                              #datarelease
+	print FILE "1\n";                              #delete local
+	print FILE "1\n";                              #delete datastore
+	print FILE "1\n";                              #delete dxlayer
+	print FILE "$date\n";                          #epoch wtf
+	print FILE "$ippsurvey\n";                     #survey
+	print FILE "$pspssurvey\n";                    #pspssurvey
+	print FILE "$main::queueP2\n";                              # queueP2
+	print FILE "$main::queueST\n";                              #queuest
+	print FILE "$main::queueOB\n";                              #queueob
+        print FILE "0\n";#queuedf
+        print FILE "0\n";#queuedo
+        print FILE "$main::queueFW\n";#queuefw
+        print FILE "$main::queueFO\n";#queuefo
+	print FILE "1\n";                              #actibe
+	print FILE "1\n";                              #parallel
+        print FILE "use_original\n";                     #use orig for p2
+        print FILE "not_reproc\n";                       #ST 
+	print FILE "$date1\n";
+	print FILE "$date2\n";
+	close FILE;
+
+
+	print "ippjython queue.py edit < $file\n";
+	#print "ra: $ra dec: $dec box: $box\n";
+	$count++;
+    }
+
+
+}
Index: trunk/tools/heather/PV3P2loaders/createPV3P2_padded0_subs.pl
===================================================================
--- trunk/tools/heather/PV3P2loaders/createPV3P2_padded0_subs.pl	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/createPV3P2_padded0_subs.pl	(revision 39769)
@@ -0,0 +1,151 @@
+#!/usr/bin/env perl
+use vars qw ($queueOB, $queueST);
+
+
+while (<>) {
+#example line of the OB.txt file:
+#187   360   28    35    PSPS_PV3_OB_SLICE_22 3800.5985297 ipp101.0
+#settings for the queuer
+my @split = split (/\s+/, $_);
+
+$minra = $split[0];
+$maxra = $split[1];
+$mindec = $split[2];
+$maxdec = $split[3];
+$datastore = $split[4];
+$drive = $split[6];
+
+$pspssurvey = 'PV3';
+$ippsurvey = '3PI';
+$datarelease = '3';
+#$datastore_stub = 'PSPS_PV3_TEST_';
+$dvodb = 'LAP.PV3.MERGE';
+$dvodb_path = '/data/ipp094.0/eugene/pv3.cam.20150607/catdir.master';
+
+
+$skychunk = $datastore; 
+
+#@stage = ("OB","P2","ST","IN","FO","FW");
+@stage = ("P2");
+   $queueP2 = 0;
+   $queueST = 0;
+   $queueOB = 0;
+   $queueFW = 0;
+   $queueFO = 0;
+
+
+$date1='2007-05-01';
+$date2='2016-09-01';
+
+foreach $mid (@stage) {
+    $loadername = $skychunk;
+   $main::queueP2 = 0;
+   $main::queueST = 0;
+   $main::queueOB = 0;
+   $main::queueFW = 0;
+   $main::queueFO = 0;
+
+    if ($mid =~ /P2/) {
+	$main::queueP2 = 1;
+	$main::queueST = 0;
+	$main::queueOB = 0;
+	$main::queueFW = 0;
+	$main::queueFO = 0;
+    }
+
+
+ #  print "$mid $main::queueP2  $main::queueST $main::queueOB $main::queueFW $main::queueFO\n";
+
+$date = "2016-04-26";
+
+#md 04 is 150 2.2
+
+$box = 1;
+
+$rabox = $maxra - $minra;
+$decbox = $maxdec -$mindec;
+
+
+#first check if $maxra - $minra is a multiple of box
+if ($rabox % $box == 0) {
+#    print "ra boxsize seems ok\n";
+} else {
+    print "ra boxsize not ok\n";
+}
+if ($decbox % $box == 0) {
+#    print "dec boxsize seems ok \n";
+} else {
+    print "dec boxsize not ok\n";
+}
+
+$compra = ($maxra-$minra) % $box;
+if ($compra == 0) {
+#    print "min/max ra is a multiple of $box\n";
+} else {
+    print "min/max ra is not a multiple of $box\n";
+}
+
+$compdec = ($maxdec - $mindec) % $box;
+if ($compdec == 0) {
+ #   print "min/max dec is a multiple of $box\n";
+} else {
+    print "min/max dec is not a multiple of $box\n";
+}
+
+    @dates = ("$date1", "2011-01-01","2012-01-01","2013-01-01","2014-01-01", "$date2");
+
+#	  $num = $#dates;
+	
+for ($iii=0;$iii<=4; $iii++) {  
+    chomp $iii;
+     $date1= $dates[$iii];
+     $date2= $dates[$iii+1];
+	#$mid = "ALL";
+	$file = "$skychunk"."_".$iii.".dat";
+	open FILE, ">", $file or die $!;
+	
+     $sk = $skychunk."_"."$iii";
+	print FILE "$sk\n";  #skychunk name
+	print FILE "$datastore\n";                     #datstore product
+	print FILE "IPP_PSPS\n";                       #datastore type
+	print FILE "1\n";                              #publish to datastore
+	print FILE "$dvodb\n";                         #dvolabel
+	print FILE "$dvodb_path\n";                    #dvopath
+	print FILE "$minra\n";                            #rmin 
+	$ra1 = $ra + $rabox;                      #rmax 
+	print FILE "$maxra\n";                           
+	print FILE "$mindec\n";                           #decmin 
+	$dec1 = $dec + $decbox;  
+	print FILE "$maxdec\n";                          #decmax
+	print FILE "$box\n";                           #box
+	print FILE "/data/$drive/ipptopsps/$dvodb\n";              #output dir
+	print FILE "3\n";                              #datarelease
+	print FILE "1\n";                              #delete local
+	print FILE "1\n";                              #delete datastore
+	print FILE "1\n";                              #delete dxlayer
+	print FILE "$date\n";                          #epoch wtf
+	print FILE "$ippsurvey\n";                     #survey
+	print FILE "$pspssurvey\n";                    #pspssurvey
+	print FILE "$main::queueP2\n";                              # queueP2
+	print FILE "$main::queueST\n";                              #queuest
+	print FILE "$main::queueOB\n";                              #queueob
+        print FILE "0\n";#queuedf
+        print FILE "0\n";#queuedo
+        print FILE "$main::queueFW\n";#queuefw
+        print FILE "$main::queueFO\n";#queuefo
+	print FILE "1\n";                              #actibe
+	print FILE "1\n";                              #parallel
+        print FILE "use_original\n";                     #use orig for p2
+        print FILE "not_reproc\n";                       #ST 
+	print FILE "$date1\n";
+	print FILE "$date2\n";
+	close FILE;
+
+
+	print "ippjython queue.py edit < $file\n";
+	#print "ra: $ra dec: $dec box: $box\n";
+	$count++;
+    }
+
+}
+}
Index: trunk/tools/heather/PV3P2loaders/p2_0padded.txt
===================================================================
--- trunk/tools/heather/PV3P2loaders/p2_0padded.txt	(revision 39769)
+++ trunk/tools/heather/PV3P2loaders/p2_0padded.txt	(revision 39769)
@@ -0,0 +1,64 @@
+277   360   -35   -26   PSPS_PV3_P2_SLICE_00 6740.16396051 ipp100.0
+263   277   -35   -26   PSPS_PV3_P2_SLICE_01 6493.73772466 ipp100.1
+161   263   -35   -26   PSPS_PV3_P2_SLICE_02 6476.44614946 ipp101.0
+0     161   -35   -26   PSPS_PV3_P2_SLICE_03 6147.30653759 ipp101.1
+275   360   -26   -21   PSPS_PV3_P2_SLICE_04 7248.08059501 ipp102.0
+261   275   -26   -21   PSPS_PV3_P2_SLICE_05 7368.77213287 ipp102.1
+157   261   -26   -21   PSPS_PV3_P2_SLICE_06 7055.64291716 ipp103.0
+0     157   -26   -21   PSPS_PV3_P2_SLICE_07 6489.9615345 ipp103.1
+274   360   -21   -17   PSPS_PV3_P2_SLICE_08 5307.57097422 ipp104.0
+258   274   -21   -17   PSPS_PV3_P2_SLICE_09 5503.72396469 ipp104.1
+154   258   -21   -17   PSPS_PV3_P2_SLICE_10 5241.01318765 ipp100.0
+0     154   -21   -17   PSPS_PV3_P2_SLICE_11 4906.04201078 ipp100.1
+271   360   -17   -12   PSPS_PV3_P2_SLICE_12 6240.38892037 ipp101.0
+254   271   -17   -12   PSPS_PV3_P2_SLICE_13 6244.03386307 ipp101.1
+124   254   -17   -12   PSPS_PV3_P2_SLICE_14 5947.18009043 ipp102.0
+0     124   -17   -12   PSPS_PV3_P2_SLICE_15 5318.50558829 ipp102.1
+266   360   -12   -7    PSPS_PV3_P2_SLICE_16 5651.84031514 ipp103.0
+251   266   -12   -7    PSPS_PV3_P2_SLICE_17 5646.0561142 ipp103.1
+128   251   -12   -7    PSPS_PV3_P2_SLICE_18 5501.19907856 ipp104.0
+0     128   -12   -7    PSPS_PV3_P2_SLICE_19 5143.42507696 ipp104.1
+263   360   -7    -1    PSPS_PV3_P2_SLICE_20 6217.20369795 ipp100.0
+248   263   -7    -1    PSPS_PV3_P2_SLICE_21 6222.74501514 ipp100.1
+127   248   -7    -1    PSPS_PV3_P2_SLICE_22 6215.82623529 ipp101.0
+0     127   -7    -1    PSPS_PV3_P2_SLICE_23 6122.19688582 ipp101.1
+263   360   -1    4     PSPS_PV3_P2_SLICE_24 5271.930264 ipp102.0
+244   263   -1    4     PSPS_PV3_P2_SLICE_25 5408.21640873 ipp102.1
+122   244   -1    4     PSPS_PV3_P2_SLICE_26 5214.37824249 ipp103.0
+0     122   -1    4     PSPS_PV3_P2_SLICE_27 4925.06227255 ipp103.1
+262   360   4     9     PSPS_PV3_P2_SLICE_28 5137.93326807 ipp104.0
+243   262   4     9     PSPS_PV3_P2_SLICE_29 5136.61160564 ipp104.1
+126   243   4     9     PSPS_PV3_P2_SLICE_30 5127.23534274 ipp100.0
+0     126   4     9     PSPS_PV3_P2_SLICE_31 5049.54392815 ipp100.1
+258   360   9     15    PSPS_PV3_P2_SLICE_32 6159.23766446 ipp101.0
+243   258   9     15    PSPS_PV3_P2_SLICE_33 6028.55503082 ipp101.1
+127   243   9     15    PSPS_PV3_P2_SLICE_34 6004.94591403 ipp102.0
+0     127   9     15    PSPS_PV3_P2_SLICE_35 5798.10750937 ipp102.1
+255   360   15    21    PSPS_PV3_P2_SLICE_36 5758.51058722 ipp103.0
+240   255   15    21    PSPS_PV3_P2_SLICE_37 5793.04980469 ipp103.1
+122   240   15    21    PSPS_PV3_P2_SLICE_38 5697.71941209 ipp104.0
+0     122   15    21    PSPS_PV3_P2_SLICE_39 5477.79934692 ipp104.1
+251   360   21    28    PSPS_PV3_P2_SLICE_40 6424.79206586 ipp100.0
+233   251   21    28    PSPS_PV3_P2_SLICE_41 6323.19407272 ipp100.1
+113   233   21    28    PSPS_PV3_P2_SLICE_42 6188.67031217 ipp101.0
+0     113   21    28    PSPS_PV3_P2_SLICE_43 5812.46483278 ipp101.1
+248   360   28    35    PSPS_PV3_P2_SLICE_44 6272.04837203 ipp102.0
+228   248   28    35    PSPS_PV3_P2_SLICE_45 6022.45598221 ipp102.1
+114   228   28    35    PSPS_PV3_P2_SLICE_46 6030.8351295 ipp103.0
+0     114   28    35    PSPS_PV3_P2_SLICE_47 5679.11011386 ipp103.1
+247   360   35    42    PSPS_PV3_P2_SLICE_48 5511.00540519 ipp104.0
+217   247   35    42    PSPS_PV3_P2_SLICE_49 5617.67864275 ipp104.1
+114   217   35    42    PSPS_PV3_P2_SLICE_50 5528.62885427 ipp100.0
+0     114   35    42    PSPS_PV3_P2_SLICE_51 5385.60569406 ipp100.1
+239   360   42    50    PSPS_PV3_P2_SLICE_52 5837.38097978 ipp101.0
+205   239   42    50    PSPS_PV3_P2_SLICE_53 5872.25277996 ipp101.1
+117   205   42    50    PSPS_PV3_P2_SLICE_54 5777.10199976 ipp102.0
+0     117   42    50    PSPS_PV3_P2_SLICE_55 5589.87236738 ipp102.1
+228   360   50    60    PSPS_PV3_P2_SLICE_56 6325.26457886 ipp103.0
+191   228   50    60    PSPS_PV3_P2_SLICE_57 6363.57689428 ipp103.1
+126   191   50    60    PSPS_PV3_P2_SLICE_58 6244.51773024 ipp104.0
+0     126   50    60    PSPS_PV3_P2_SLICE_59 6000.18480372 ipp104.1
+236   360   60    90    PSPS_PV3_P2_SLICE_60 5986.83767 ipp100.0
+179   236   60    90    PSPS_PV3_P2_SLICE_61 5963.32087529 ipp100.1
+120   179   60    90    PSPS_PV3_P2_SLICE_62 5984.41789492 ipp101.0
+0     120   60    90    PSPS_PV3_P2_SLICE_63 5871.42299783 ipp101.1
