Index: /branches/eam_branches/ipp-20121219/ippToPsps/test/mkgpc1data.dvo
===================================================================
--- /branches/eam_branches/ipp-20121219/ippToPsps/test/mkgpc1data.dvo	(revision 34992)
+++ /branches/eam_branches/ipp-20121219/ippToPsps/test/mkgpc1data.dvo	(revision 34993)
@@ -11,16 +11,16 @@
 # exp_id stack_id raw_file exp_file offset
 list imagedata
- 1 1 test.01.txt test.01.cmf  0.000 
- 2 1 test.02.txt test.02.cmf -0.025
- 3 1 test.03.txt test.03.cmf  0.025
- 4 1 test.04.txt test.04.cmf  0.010
- 5 2 test.05.txt test.05.cmf  0.000 
- 6 2 test.06.txt test.06.cmf -0.025
- 7 2 test.07.txt test.07.cmf  0.025
- 8 2 test.08.txt test.08.cmf  0.010
- 9 3 test.09.txt test.09.cmf  0.000 
-10 3 test.10.txt test.10.cmf -0.025
-11 3 test.11.txt test.11.cmf  0.025
-12 3 test.12.txt test.12.cmf  0.010
+ 1 1 test.01.txt test.01.smf  0.000 
+ 2 1 test.02.txt test.02.smf -0.025
+ 3 1 test.03.txt test.03.smf  0.025
+ 4 1 test.04.txt test.04.smf  0.010
+ 5 2 test.05.txt test.05.smf  0.000 
+ 6 2 test.06.txt test.06.smf -0.025
+ 7 2 test.07.txt test.07.smf  0.025
+ 8 2 test.08.txt test.08.smf  0.010
+ 9 3 test.09.txt test.09.smf  0.000 
+10 3 test.10.txt test.10.smf -0.025
+11 3 test.11.txt test.11.smf  0.025
+12 3 test.12.txt test.12.smf  0.010
 end
 
@@ -74,4 +74,7 @@
   $DEC = 20.0
 
+  $TIMEFORMAT = mjd
+  $TIMEREF = 2001/01/01,00:00:00
+
   for i 0 $imagedata:n
     list word -split $imagedata:$i
@@ -81,6 +84,14 @@
     $offset = $word:4
 
+    ctimes -ref 2008/01/01,$i\:00:00 -var mjd
+
     mkinput $offset $rawfile
     exec mkcmf $rawfile $cmffile -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 0
+    exec rm -f header.dat
+    output header.dat
+    echo MJD-OBS = $mjd
+    echo FILTERID= 'r.00000' 
+    output stdout
+    exec fits_insert $cmffile header.dat
     exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
   end
@@ -136,5 +147,8 @@
   local myID filename
   $myID = $1
-  $filename = $2
+  $filename = `basename $2 .smf`
+  pwd -var cwd
+
+  # NOTE: the filename is an absolute path without cmf extension
 
   # a single exposure
@@ -142,5 +156,5 @@
   dbinsert chipRun (exp_id, chip_id) values ($myID, $myID)
   dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", "testsoft")
-  dbinsert camProcessedExp (cam_id, path_base) values ($myID, "$filename")
+  dbinsert camProcessedExp (cam_id, path_base) values ($myID, "$cwd/$filename")
   dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID)
   dbinsert warpRun (warp_id, fake_id) values ($myID, $myID)
