Index: /trunk/Ohana/src/libdvo/Makefile
===================================================================
--- /trunk/Ohana/src/libdvo/Makefile	(revision 40062)
+++ /trunk/Ohana/src/libdvo/Makefile	(revision 40063)
@@ -50,4 +50,5 @@
 $(DESTINC)/ps1_v4_defs.h \
 $(DESTINC)/ps1_v5_defs.h \
+$(DESTINC)/ps1_v5_ld_defs.h \
 $(DESTINC)/ps1_ref_defs.h \
 $(DESTINC)/ps1_sim_defs.h \
@@ -99,4 +100,5 @@
 $(SRC)/dvo_convert_PS1_V4.$(ARCH).o \
 $(SRC)/dvo_convert_PS1_V5.$(ARCH).o \
+$(SRC)/dvo_convert_PS1_V5_LOAD.$(ARCH).o \
 $(SRC)/dvo_convert_PS1_REF.$(ARCH).o \
 $(SRC)/dvo_convert_PS1_SIM.$(ARCH).o \
Index: /trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- /trunk/Ohana/src/libdvo/include/dvo.h	(revision 40062)
+++ /trunk/Ohana/src/libdvo/include/dvo.h	(revision 40063)
@@ -33,4 +33,5 @@
   DVO_FORMAT_PS1_V4,
   DVO_FORMAT_PS1_V5,
+  DVO_FORMAT_PS1_V5_LOAD,
 } DVOCatFormat;
 
@@ -1072,4 +1073,5 @@
 # include "ps1_v4_defs.h"
 # include "ps1_v5_defs.h"
+# include "ps1_v5_ld_defs.h"
 # include "ps1_ref_defs.h"
 # include "ps1_sim_defs.h"
Index: /trunk/Ohana/src/libdvo/include/ps1_v5_ld_defs.h
===================================================================
--- /trunk/Ohana/src/libdvo/include/ps1_v5_ld_defs.h	(revision 40063)
+++ /trunk/Ohana/src/libdvo/include/ps1_v5_ld_defs.h	(revision 40063)
@@ -0,0 +1,26 @@
+Image 		       	*Image_PS1_V5_LOAD_ToInternal (Image_PS1_V5_LOAD *in, off_t Nvalues, off_t Nalloc);
+Image_PS1_V5_LOAD    	*ImageInternalTo_PS1_V5_LOAD (Image *in, off_t Nvalues);
+
+Average 	       	*Average_PS1_V5_LOAD_ToInternal (Average_PS1_V5_LOAD *in, off_t Nvalues, SecFilt **primary);
+Average_PS1_V5_LOAD     *AverageInternalTo_PS1_V5_LOAD (Average *in, off_t Nvalues, SecFilt *primary);
+
+Measure 	       	*Measure_PS1_V5_LOAD_ToInternal (Average *ave, Measure_PS1_V5_LOAD *in, off_t Nvalues);
+Measure_PS1_V5_LOAD     *MeasureInternalTo_PS1_V5_LOAD (Average *ave, Measure *in, off_t Nvalues);
+
+SecFilt 	       	*SecFilt_PS1_V5_LOAD_ToInternal (SecFilt_PS1_V5_LOAD *in, off_t Nvalues);
+SecFilt_PS1_V5_LOAD     *SecFiltInternalTo_PS1_V5_LOAD (SecFilt *in, off_t Nvalues);
+
+Lensobj 	       	*Lensobj_PS1_V5_LOAD_ToInternal (Lensobj_PS1_V5_LOAD *in, off_t Nvalues);
+Lensobj_PS1_V5_LOAD     *LensobjInternalTo_PS1_V5_LOAD (Lensobj *in, off_t Nvalues);
+
+Lensing 	       	*Lensing_PS1_V5_LOAD_ToInternal (Lensing_PS1_V5_LOAD *in, off_t Nvalues);
+Lensing_PS1_V5_LOAD     *LensingInternalTo_PS1_V5_LOAD (Lensing *in, off_t Nvalues);
+
+StarPar 	       	*StarPar_PS1_V5_LOAD_ToInternal (StarPar_PS1_V5_LOAD *in, off_t Nvalues);
+StarPar_PS1_V5_LOAD     *StarParInternalTo_PS1_V5_LOAD (StarPar *in, off_t Nvalues);
+
+GalPhot 	       	*GalPhot_PS1_V5_LOAD_ToInternal (GalPhot_PS1_V5_LOAD *in, off_t Nvalues);
+GalPhot_PS1_V5_LOAD     *GalPhotInternalTo_PS1_V5_LOAD (GalPhot *in, off_t Nvalues);
+
+PhotCode                *PhotCode_PS1_V5_LOAD_To_Internal (PhotCode_PS1_V5_LOAD *in, off_t Nvalues);
+PhotCode_PS1_V5_LOAD    *PhotCode_Internal_To_PS1_V5_LOAD (PhotCode *in, off_t Nvalues);
Index: /trunk/Ohana/src/libdvo/src/LoadPhotcodesFITS.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/LoadPhotcodesFITS.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/LoadPhotcodesFITS.c	(revision 40063)
@@ -53,15 +53,16 @@
   }
 
-  CONVERT_FORMAT("DVO_PHOTCODE",           Elixir);
-  CONVERT_FORMAT("DVO_PHOTCODE_ELIXIR",    Elixir);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_1", PS1_DEV_1);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_2", PS1_DEV_2);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_3", PS1_DEV_3);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_REF",   PS1_REF);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V1",    PS1_V1);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V2",    PS1_V2);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V3",    PS1_V3);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V4",    PS1_V4);
-  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V5",    PS1_V5);
+  CONVERT_FORMAT("DVO_PHOTCODE",             Elixir);
+  CONVERT_FORMAT("DVO_PHOTCODE_ELIXIR",      Elixir);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_1",   PS1_DEV_1);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_2",   PS1_DEV_2);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_DEV_3",   PS1_DEV_3);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_REF",     PS1_REF);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V1",      PS1_V1);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V2",      PS1_V2);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V3",      PS1_V3);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V4",      PS1_V4);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V5",      PS1_V5);
+  CONVERT_FORMAT("DVO_PHOTCODE_PS1_V5_LOAD", PS1_V5_LOAD);
 
   gfits_db_free (&db);
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog.c	(revision 40063)
@@ -57,4 +57,5 @@
   if (!strcasecmp (catformat, "PS1_V4"))          return (DVO_FORMAT_PS1_V4);
   if (!strcasecmp (catformat, "PS1_V5"))          return (DVO_FORMAT_PS1_V5);
+  if (!strcasecmp (catformat, "PS1_V5_LOAD"))     return (DVO_FORMAT_PS1_V5_LOAD);
   if (!strcasecmp (catformat, "PS1_REF"))         return (DVO_FORMAT_PS1_REF);
   if (!strcasecmp (catformat, "PS1_SIM"))         return (DVO_FORMAT_PS1_SIM);
Index: /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c	(revision 40063)
@@ -84,13 +84,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -287,4 +288,5 @@
   if (catalog[0].catformat == DVO_FORMAT_PS1_V4)          gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PS1_V4");
   if (catalog[0].catformat == DVO_FORMAT_PS1_V5)          gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PS1_V5");
+  if (catalog[0].catformat == DVO_FORMAT_PS1_V5_LOAD)     gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PS1_V5_LOAD");
   if (catalog[0].catformat == DVO_FORMAT_PS1_REF)         gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PS1_REF");
   if (catalog[0].catformat == DVO_FORMAT_PS1_SIM)         gfits_modify (&catalog[0].header, "FORMAT", "%s", 1, "PS1_SIM");
@@ -385,13 +387,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -438,13 +441,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -495,12 +499,13 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -547,13 +552,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -604,13 +610,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
@@ -657,13 +664,14 @@
       FORMAT_CASE (PANSTARRS_DEV_0, Panstarrs_DEV_0);
       FORMAT_CASE (PANSTARRS_DEV_1, Panstarrs_DEV_1);
-      FORMAT_CASE (PS1_DEV_1, PS1_DEV_1);
-      FORMAT_CASE (PS1_DEV_2, PS1_DEV_2);
-      FORMAT_CASE (PS1_V1,    PS1_V1);
-      FORMAT_CASE (PS1_V2,    PS1_V2);
-      FORMAT_CASE (PS1_V3,    PS1_V3);
-      FORMAT_CASE (PS1_V4,    PS1_V4);
-      FORMAT_CASE (PS1_V5,    PS1_V5);
-      FORMAT_CASE (PS1_REF,   PS1_REF);
-      FORMAT_CASE (PS1_SIM,   PS1_SIM);
+      FORMAT_CASE (PS1_DEV_1,   PS1_DEV_1);
+      FORMAT_CASE (PS1_DEV_2,   PS1_DEV_2);
+      FORMAT_CASE (PS1_V1,      PS1_V1);
+      FORMAT_CASE (PS1_V2,      PS1_V2);
+      FORMAT_CASE (PS1_V3,      PS1_V3);
+      FORMAT_CASE (PS1_V4,      PS1_V4);
+      FORMAT_CASE (PS1_V5,      PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD, PS1_V5_LOAD);
+      FORMAT_CASE (PS1_REF,     PS1_REF);
+      FORMAT_CASE (PS1_SIM,     PS1_SIM);
 
     default:
Index: /trunk/Ohana/src/libdvo/src/dvo_convert.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_convert.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/dvo_convert.c	(revision 40063)
@@ -42,4 +42,5 @@
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_V4",          PS1_V4);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_V5",          PS1_V5);
+  CONVERT_FORMAT ("DVO_AVERAGE_PS1_V5_LOAD",     PS1_V5_LOAD);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_REF",         PS1_REF);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_SIM",         PS1_SIM);
@@ -132,4 +133,5 @@
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_V5",          PS1_V5,          PS1_V5);
+  CONVERT_FORMAT ("DVO_AVERAGE_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_REF",         PS1_REF,         PS1_REF);
   CONVERT_FORMAT ("DVO_AVERAGE_PS1_SIM",         PS1_SIM,         PS1_SIM);
@@ -169,4 +171,5 @@
       FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
       FORMAT_CASE (PS1_REF,         PS1_REF);
       FORMAT_CASE (PS1_SIM,         PS1_SIM);
@@ -267,4 +270,5 @@
   CONVERT_FORMAT ("DVO_MEASURE_PS1_V4",          PS1_V4,          PS1_V4,          FALSE);
   CONVERT_FORMAT ("DVO_MEASURE_PS1_V5",          PS1_V5,          PS1_V5,          TRUE);
+  CONVERT_FORMAT ("DVO_MEASURE_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD,     TRUE);
   CONVERT_FORMAT ("DVO_MEASURE_PS1_REF",         PS1_REF,         PS1_REF,         FALSE);
   CONVERT_FORMAT ("DVO_MEASURE_PS1_SIM",         PS1_SIM,         PS1_SIM,         TRUE);
@@ -306,4 +310,5 @@
       FORMAT_CASE (PS1_V4,          PS1_V4,          FALSE);
       FORMAT_CASE (PS1_V5,          PS1_V5,          TRUE);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD,     TRUE);
       FORMAT_CASE (PS1_REF,         PS1_REF,         FALSE);
       FORMAT_CASE (PS1_SIM,         PS1_SIM,         TRUE);
@@ -386,4 +391,5 @@
   SKIPPING_FORMAT ("DVO_MISSING_PS1_V4",          PS1_V4,          PS1_V4);
   SKIPPING_FORMAT ("DVO_MISSING_PS1_V5",          PS1_V5,          PS1_V5);
+  SKIPPING_FORMAT ("DVO_MISSING_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef CONVERT_FORMAT
 # undef SKIPPING_FORMAT
@@ -460,4 +466,5 @@
   CONVERT_FORMAT ("DVO_SECFILT_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT ("DVO_SECFILT_PS1_V5",          PS1_V5,          PS1_V5);
+  CONVERT_FORMAT ("DVO_SECFILT_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   CONVERT_FORMAT ("DVO_SECFILT_PS1_REF",         PS1_REF,         PS1_REF);
   CONVERT_FORMAT ("DVO_SECFILT_PS1_SIM",         PS1_SIM,         PS1_SIM);
@@ -497,4 +504,5 @@
       FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
       FORMAT_CASE (PS1_REF,         PS1_REF);
       FORMAT_CASE (PS1_SIM,         PS1_SIM);
@@ -604,4 +612,5 @@
   SKIPPING_FORMAT ("DVO_LENSING_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT  ("DVO_LENSING_PS1_V5",          PS1_V5,          PS1_V5_R3);
+  CONVERT_FORMAT  ("DVO_LENSING_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   SKIPPING_FORMAT ("DVO_LENSING_PS1_SIM",         PS1_SIM,         PS1_SIM);
 # undef CONVERT_FORMAT
@@ -643,4 +652,5 @@
 //    FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5_R3);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef FORMAT_CASE
 
@@ -722,4 +732,5 @@
   SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT  ("DVO_LENSOBJ_PS1_V5",          PS1_V5,          PS1_V5_R1);
+  CONVERT_FORMAT  ("DVO_LENSOBJ_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   SKIPPING_FORMAT ("DVO_LENSOBJ_PS1_SIM",         PS1_SIM,         PS1_SIM);
 # undef CONVERT_FORMAT
@@ -761,4 +772,5 @@
 //    FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5_R1);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef FORMAT_CASE
 
@@ -828,4 +840,5 @@
   SKIPPING_FORMAT ("DVO_STARPAR_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT  ("DVO_STARPAR_PS1_V5",          PS1_V5,          PS1_V5);
+  CONVERT_FORMAT  ("DVO_STARPAR_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef CONVERT_FORMAT
 # undef SKIPPING_FORMAT
@@ -867,4 +880,5 @@
 //    FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef FORMAT_CASE
 
@@ -947,4 +961,5 @@
   SKIPPING_FORMAT ("DVO_GALPHOT_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT  ("DVO_GALPHOT_PS1_V5",          PS1_V5,          PS1_V5_R1);
+  CONVERT_FORMAT  ("DVO_GALPHOT_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   SKIPPING_FORMAT ("DVO_GALPHOT_PS1_SIM",         PS1_SIM,         PS1_SIM);
 # undef CONVERT_FORMAT
@@ -986,4 +1001,5 @@
 //    FORMAT_CASE (PS1_V4,          PS1_V4);
       FORMAT_CASE (PS1_V5,          PS1_V5_R1);
+      FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
 # undef FORMAT_CASE
 
@@ -1059,4 +1075,5 @@
   CONVERT_FORMAT ("DVO_IMAGE_PS1_V4",          PS1_V4,          PS1_V4);
   CONVERT_FORMAT ("DVO_IMAGE_PS1_V5",          PS1_V5,          PS1_V5);
+  CONVERT_FORMAT ("DVO_IMAGE_PS1_V5_LOAD",     PS1_V5_LOAD,     PS1_V5_LOAD);
   CONVERT_FORMAT ("DVO_IMAGE_PS1_REF",         PS1_REF,         PS1_REF);
   CONVERT_FORMAT ("DVO_IMAGE_PS1_SIM",         PS1_SIM,         PS1_SIM);
@@ -1097,4 +1114,5 @@
     FORMAT_CASE (PS1_V4,          PS1_V4);
     FORMAT_CASE (PS1_V5,          PS1_V5);
+    FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
     FORMAT_CASE (PS1_REF,         PS1_REF);
     FORMAT_CASE (PS1_SIM,         PS1_SIM);
@@ -1148,4 +1166,5 @@
     FORMAT_CASE (PS1_V4,          PS1_V4);
     FORMAT_CASE (PS1_V5,          PS1_V5);
+    FORMAT_CASE (PS1_V5_LOAD,     PS1_V5_LOAD);
     FORMAT_CASE (PS1_REF,         PS1_REF);
     FORMAT_CASE (PS1_SIM,         PS1_SIM);
Index: /trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c	(revision 40063)
+++ /trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c	(revision 40063)
@@ -0,0 +1,836 @@
+# include <dvo.h>
+
+/* convert PS1_V5_LOAD formats to internal formats */
+
+Measure *Measure_PS1_V5_LOAD_ToInternal (Average *ave, Measure_PS1_V5_LOAD *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
+
+  off_t i;
+  Measure *out;
+
+  ALLOCATE_ZERO (out, Measure, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_measure_init (&out[i]);
+
+    out[i].R          = in[i].R;
+    out[i].D          = in[i].D;
+    out[i].M          = in[i].M;
+    out[i].dM         = in[i].dM;
+    out[i].Map        = in[i].Map;
+    out[i].dMap       = in[i].dMap;
+    out[i].Mkron      = in[i].Mkron;
+    out[i].dMkron     = in[i].dMkron;
+    out[i].Mcal       = in[i].Mcal;
+    out[i].dMcal      = in[i].dMcal;
+    out[i].dt         = in[i].dt;
+    out[i].FluxPSF    = in[i].FluxPSF;
+    out[i].dFluxPSF   = in[i].dFluxPSF;
+    out[i].FluxKron   = in[i].FluxKron;
+    out[i].dFluxKron  = in[i].dFluxKron;
+    out[i].FluxAp     = in[i].FluxAp;
+    out[i].dFluxAp    = in[i].dFluxAp;
+    out[i].airmass    = in[i].airmass;
+    out[i].az         = in[i].az;
+    out[i].Xccd       = in[i].Xccd;
+    out[i].Yccd       = in[i].Yccd;
+    out[i].Xfix       = in[i].Xfix;
+    out[i].Yfix       = in[i].Yfix;
+    out[i].XoffKH     = in[i].XoffKH;
+    out[i].YoffKH     = in[i].YoffKH;
+    out[i].XoffDCR    = in[i].XoffDCR;
+    out[i].YoffDCR    = in[i].YoffDCR;
+    out[i].XoffCAM    = in[i].XoffCAM;
+    out[i].YoffCAM    = in[i].YoffCAM;
+    out[i].Mflat      = in[i].Mflat;
+    out[i].Sky        = in[i].Sky;
+    out[i].dSky       = in[i].dSky;
+    out[i].t          = in[i].t;
+    out[i].averef     = in[i].averef;
+    out[i].detID      = in[i].detID;
+    out[i].objID      = in[i].objID;
+    out[i].catID      = in[i].catID;
+    out[i].extID      = in[i].extID;
+    out[i].imageID    = in[i].imageID;
+    out[i].psfQF      = in[i].psfQF;
+    out[i].psfQFperf  = in[i].psfQFperf;
+    out[i].psfChisq   = in[i].psfChisq;
+    out[i].psfNdof    = in[i].psfNdof;
+    out[i].psfNpix    = in[i].psfNpix;
+    out[i].extNsigma  = in[i].extNsigma;
+    out[i].FWx 	      = in[i].FWx;
+    out[i].FWy 	      = in[i].FWy;
+    out[i].theta      = in[i].theta;
+    out[i].Mxx 	      = in[i].Mxx;
+    out[i].Mxy 	      = in[i].Mxy;
+    out[i].Myy 	      = in[i].Myy;
+    out[i].t_msec     = in[i].t_msec;
+    out[i].photcode   = in[i].photcode;
+    out[i].dXccd      = in[i].dXccd;
+    out[i].dYccd      = in[i].dYccd;
+    out[i].dRsys      = in[i].dRsys;
+    out[i].posangle   = in[i].posangle;
+    out[i].pltscale   = in[i].pltscale;
+    out[i].dbFlags    = in[i].dbFlags;
+    out[i].photFlags  = in[i].photFlags;
+    out[i].photFlags2 = in[i].photFlags2;
+  }
+  return (out);
+}
+
+Measure_PS1_V5_LOAD *MeasureInternalTo_PS1_V5_LOAD (Average *ave, Measure *in, off_t Nvalues) {
+  OHANA_UNUSED_PARAM(ave);
+
+  off_t i;
+  Measure_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, Measure_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    out[i].R          = in[i].R;
+    out[i].D          = in[i].D;
+    out[i].M          = in[i].M;
+    out[i].dM         = in[i].dM;
+    out[i].Map        = in[i].Map;
+    out[i].dMap       = in[i].dMap;
+    out[i].Mkron      = in[i].Mkron;
+    out[i].dMkron     = in[i].dMkron;
+    out[i].Mcal       = in[i].Mcal;
+    out[i].dMcal      = in[i].dMcal;
+    out[i].dt         = in[i].dt;
+    out[i].FluxPSF    = in[i].FluxPSF;
+    out[i].dFluxPSF   = in[i].dFluxPSF;
+    out[i].FluxKron   = in[i].FluxKron;
+    out[i].dFluxKron  = in[i].dFluxKron;
+    out[i].FluxAp     = in[i].FluxAp;
+    out[i].dFluxAp    = in[i].dFluxAp;
+    out[i].airmass    = in[i].airmass;
+    out[i].az         = in[i].az;
+    out[i].Xccd       = in[i].Xccd;
+    out[i].Yccd       = in[i].Yccd;
+    out[i].Xfix       = in[i].Xfix;
+    out[i].Yfix       = in[i].Yfix;
+    out[i].XoffKH     = in[i].XoffKH;
+    out[i].YoffKH     = in[i].YoffKH;
+    out[i].XoffDCR    = in[i].XoffDCR;
+    out[i].YoffDCR    = in[i].YoffDCR;
+    out[i].XoffCAM    = in[i].XoffCAM;
+    out[i].YoffCAM    = in[i].YoffCAM;
+    out[i].Mflat      = in[i].Mflat;
+    out[i].Sky        = in[i].Sky;
+    out[i].dSky       = in[i].dSky;
+    out[i].t          = in[i].t;
+    out[i].averef     = in[i].averef;
+    out[i].detID      = in[i].detID;
+    out[i].objID      = in[i].objID;
+    out[i].catID      = in[i].catID;
+    out[i].extID      = in[i].extID;
+    out[i].imageID    = in[i].imageID;
+    out[i].psfQF      = in[i].psfQF;
+    out[i].psfQFperf  = in[i].psfQFperf;
+    out[i].psfChisq   = in[i].psfChisq;
+    out[i].psfNdof    = in[i].psfNdof;
+    out[i].psfNpix    = in[i].psfNpix;
+    out[i].extNsigma  = in[i].extNsigma;
+    out[i].FWx 	      = in[i].FWx;
+    out[i].FWy 	      = in[i].FWy;
+    out[i].theta      = in[i].theta;
+    out[i].Mxx 	      = in[i].Mxx;
+    out[i].Mxy 	      = in[i].Mxy;
+    out[i].Myy 	      = in[i].Myy;
+    out[i].t_msec     = in[i].t_msec;
+    out[i].photcode   = in[i].photcode;
+    out[i].dXccd      = in[i].dXccd;
+    out[i].dYccd      = in[i].dYccd;
+    out[i].dRsys      = in[i].dRsys;
+    out[i].posangle   = in[i].posangle;
+    out[i].pltscale   = in[i].pltscale;
+    out[i].dbFlags    = in[i].dbFlags;
+    out[i].photFlags  = in[i].photFlags;
+    out[i].photFlags2 = in[i].photFlags2;
+  }
+  return (out);
+}
+
+// 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
+Average *Average_PS1_V5_LOAD_ToInternal (Average_PS1_V5_LOAD *in, off_t Nvalues, SecFilt **primary) {
+  OHANA_UNUSED_PARAM(primary);
+
+  off_t i;
+  Average *out;
+
+  ALLOCATE_ZERO (out, Average, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_average_init (&out[i]);
+
+    out[i].R        	  = in[i].R;      
+    out[i].D        	  = in[i].D;      
+
+    out[i].Nmeasure       = in[i].Nmeasure;     
+    out[i].Nlensing       = in[i].Nlensing;     
+    out[i].Ngalphot       = in[i].Ngalphot;     
+			  
+    out[i].measureOffset  = in[i].measureOffset; 
+    out[i].lensingOffset  = in[i].lensingOffset;
+    out[i].galphotOffset  = in[i].galphotOffset;
+
+    out[i].objID 	  = in[i].objID;
+    out[i].catID 	  = in[i].catID;
+    out[i].extID 	  = in[i].extID;
+  }
+  return (out);
+}
+
+// 'primary' is needed to conform with the API for Loneos and Elixir, but is not used
+Average_PS1_V5_LOAD *AverageInternalTo_PS1_V5_LOAD (Average *in, off_t Nvalues, SecFilt *primary) {
+  OHANA_UNUSED_PARAM(primary);
+
+  off_t i;
+  Average_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, Average_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    out[i].R        	  = in[i].R;      
+    out[i].D        	  = in[i].D;      
+
+    out[i].Nmeasure       = in[i].Nmeasure;     
+    out[i].Nlensing       = in[i].Nlensing;     
+    out[i].Ngalphot       = in[i].Ngalphot;     
+			  
+    out[i].measureOffset  = in[i].measureOffset; 
+    out[i].lensingOffset  = in[i].lensingOffset;
+    out[i].galphotOffset  = in[i].galphotOffset;
+			  
+    out[i].objID 	  = in[i].objID;
+    out[i].catID 	  = in[i].catID;
+    out[i].extID 	  = in[i].extID;
+  }
+  return (out);
+}
+
+SecFilt *SecFilt_PS1_V5_LOAD_ToInternal (SecFilt_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  SecFilt *out;
+
+  ALLOCATE_ZERO (out, SecFilt, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_secfilt_init (&out[i], SECFILT_RESET_ALL);
+
+    out[i].M             = in[i].M;      
+    out[i].Ncode         = in[i].Ncode;
+    out[i].Nused         = in[i].Nused;
+  }
+  return (out);
+}
+
+SecFilt_PS1_V5_LOAD *SecFiltInternalTo_PS1_V5_LOAD (SecFilt *in, off_t Nvalues) {
+
+  off_t i;
+  SecFilt_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, SecFilt_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+
+    out[i].M             = in[i].M;      
+    out[i].Ncode         = in[i].Ncode;
+    out[i].Nused         = in[i].Nused;
+  }
+  return (out);
+}
+
+Lensing *Lensing_PS1_V5_LOAD_ToInternal (Lensing_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  Lensing *out;
+
+  ALLOCATE_ZERO (out, Lensing, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_lensing_init (&out[i]);
+
+    out[i].X11_sm_obj  = in[i].X11_sm_obj;      
+    out[i].X12_sm_obj  = in[i].X12_sm_obj;      
+    out[i].X22_sm_obj  = in[i].X22_sm_obj;      
+    out[i].E1_sm_obj   = in[i].E1_sm_obj;      
+    out[i].E2_sm_obj   = in[i].E2_sm_obj;      
+	             	                 
+    out[i].X11_sh_obj  = in[i].X11_sh_obj;      
+    out[i].X12_sh_obj  = in[i].X12_sh_obj;      
+    out[i].X22_sh_obj  = in[i].X22_sh_obj;      
+    out[i].E1_sh_obj   = in[i].E1_sh_obj;      
+    out[i].E2_sh_obj   = in[i].E2_sh_obj;     
+	             	                 
+    out[i].X11_sm_psf  = in[i].X11_sm_psf;
+    out[i].X12_sm_psf  = in[i].X12_sm_psf;
+    out[i].X22_sm_psf  = in[i].X22_sm_psf;
+    out[i].E1_sm_psf   = in[i].E1_sm_psf;
+    out[i].E2_sm_psf   = in[i].E2_sm_psf;     
+	             	                 
+    out[i].X11_sh_psf  = in[i].X11_sh_psf;
+    out[i].X12_sh_psf  = in[i].X12_sh_psf;
+    out[i].X22_sh_psf  = in[i].X22_sh_psf;
+    out[i].E1_sh_psf   = in[i].E1_sh_psf;
+    out[i].E2_sh_psf   = in[i].E2_sh_psf;
+
+    out[i].E1_psf      = in[i].E1_psf;
+    out[i].E2_psf      = in[i].E2_psf;
+
+    out[i].F_ApR5      = in[i].F_ApR5;
+    out[i].dF_ApR5     = in[i].dF_ApR5;
+    out[i].sF_ApR5     = in[i].sF_ApR5;
+    out[i].fF_ApR5     = in[i].fF_ApR5;
+	               	            
+    out[i].F_ApR6      = in[i].F_ApR6;
+    out[i].dF_ApR6     = in[i].dF_ApR6;
+    out[i].sF_ApR6     = in[i].sF_ApR6;
+    out[i].fF_ApR6     = in[i].fF_ApR6;
+	          	            
+    out[i].F_ApR7      = in[i].F_ApR7;
+    out[i].dF_ApR7     = in[i].dF_ApR7;
+    out[i].sF_ApR7     = in[i].sF_ApR7;
+    out[i].fF_ApR7     = in[i].fF_ApR7;
+	          	            
+    out[i].detID       = in[i].detID;
+    out[i].objID       = in[i].objID;
+    out[i].catID       = in[i].catID;
+    out[i].averef      = in[i].averef;
+
+    out[i].imageID     = in[i].imageID;
+    out[i].oldImID     = in[i].oldImID;
+  }
+  return (out);
+}
+
+Lensing_PS1_V5_LOAD *LensingInternalTo_PS1_V5_LOAD (Lensing *in, off_t Nvalues) {
+
+  off_t i;
+  Lensing_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, Lensing_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+
+    out[i].X11_sm_obj  = in[i].X11_sm_obj;      
+    out[i].X12_sm_obj  = in[i].X12_sm_obj;      
+    out[i].X22_sm_obj  = in[i].X22_sm_obj;      
+    out[i].E1_sm_obj   = in[i].E1_sm_obj;      
+    out[i].E2_sm_obj   = in[i].E2_sm_obj;      
+	             	                 
+    out[i].X11_sh_obj  = in[i].X11_sh_obj;      
+    out[i].X12_sh_obj  = in[i].X12_sh_obj;      
+    out[i].X22_sh_obj  = in[i].X22_sh_obj;      
+    out[i].E1_sh_obj   = in[i].E1_sh_obj;      
+    out[i].E2_sh_obj   = in[i].E2_sh_obj;     
+	             	                 
+    out[i].X11_sm_psf  = in[i].X11_sm_psf;
+    out[i].X12_sm_psf  = in[i].X12_sm_psf;
+    out[i].X22_sm_psf  = in[i].X22_sm_psf;
+    out[i].E1_sm_psf   = in[i].E1_sm_psf;
+    out[i].E2_sm_psf   = in[i].E2_sm_psf;     
+	             	                 
+    out[i].X11_sh_psf  = in[i].X11_sh_psf;
+    out[i].X12_sh_psf  = in[i].X12_sh_psf;
+    out[i].X22_sh_psf  = in[i].X22_sh_psf;
+    out[i].E1_sh_psf   = in[i].E1_sh_psf;
+    out[i].E2_sh_psf   = in[i].E2_sh_psf;
+
+    out[i].E1_psf      = in[i].E1_psf;
+    out[i].E2_psf      = in[i].E2_psf;
+
+    out[i].F_ApR5      = in[i].F_ApR5;
+    out[i].dF_ApR5     = in[i].dF_ApR5;
+    out[i].sF_ApR5     = in[i].sF_ApR5;
+    out[i].fF_ApR5     = in[i].fF_ApR5;
+	               	            
+    out[i].F_ApR6      = in[i].F_ApR6;
+    out[i].dF_ApR6     = in[i].dF_ApR6;
+    out[i].sF_ApR6     = in[i].sF_ApR6;
+    out[i].fF_ApR6     = in[i].fF_ApR6;
+	          	            
+    out[i].F_ApR7      = in[i].F_ApR7;
+    out[i].dF_ApR7     = in[i].dF_ApR7;
+    out[i].sF_ApR7     = in[i].sF_ApR7;
+    out[i].fF_ApR7     = in[i].fF_ApR7;
+	          	            
+    out[i].detID       = in[i].detID;
+    out[i].objID       = in[i].objID;
+    out[i].catID       = in[i].catID;
+    out[i].averef      = in[i].averef;
+
+    out[i].imageID     = in[i].imageID;
+    out[i].oldImID     = in[i].oldImID;
+  }
+  return (out);
+}
+
+Lensobj *Lensobj_PS1_V5_LOAD_ToInternal (Lensobj_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  Lensobj *out;
+
+  ALLOCATE_ZERO (out, Lensobj, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_lensobj_init (&out[i], FALSE);
+
+    out[i].X11_sm_obj  = in[i].X11_sm_obj;      
+    out[i].X12_sm_obj  = in[i].X12_sm_obj;      
+    out[i].X22_sm_obj  = in[i].X22_sm_obj;      
+    out[i].E1_sm_obj   = in[i].E1_sm_obj;      
+    out[i].E2_sm_obj   = in[i].E2_sm_obj;      
+	             	                 
+    out[i].X11_sh_obj  = in[i].X11_sh_obj;      
+    out[i].X12_sh_obj  = in[i].X12_sh_obj;      
+    out[i].X22_sh_obj  = in[i].X22_sh_obj;      
+    out[i].E1_sh_obj   = in[i].E1_sh_obj;      
+    out[i].E2_sh_obj   = in[i].E2_sh_obj;     
+	             	                 
+    out[i].X11_sm_psf  = in[i].X11_sm_psf;
+    out[i].X12_sm_psf  = in[i].X12_sm_psf;
+    out[i].X22_sm_psf  = in[i].X22_sm_psf;
+    out[i].E1_sm_psf   = in[i].E1_sm_psf;
+    out[i].E2_sm_psf   = in[i].E2_sm_psf;     
+	             	                 
+    out[i].X11_sh_psf  = in[i].X11_sh_psf;
+    out[i].X12_sh_psf  = in[i].X12_sh_psf;
+    out[i].X22_sh_psf  = in[i].X22_sh_psf;
+    out[i].E1_sh_psf   = in[i].E1_sh_psf;
+    out[i].E2_sh_psf   = in[i].E2_sh_psf;
+
+    out[i].F_ApR5      = in[i].F_ApR5;
+    out[i].dF_ApR5     = in[i].dF_ApR5;
+    out[i].sF_ApR5     = in[i].sF_ApR5;
+    out[i].fF_ApR5     = in[i].fF_ApR5;
+	               	            
+    out[i].F_ApR6      = in[i].F_ApR6;
+    out[i].dF_ApR6     = in[i].dF_ApR6;
+    out[i].sF_ApR6     = in[i].sF_ApR6;
+    out[i].fF_ApR6     = in[i].fF_ApR6;
+	          	            
+    out[i].F_ApR7      = in[i].F_ApR7;
+    out[i].dF_ApR7     = in[i].dF_ApR7;
+    out[i].sF_ApR7     = in[i].sF_ApR7;
+    out[i].fF_ApR7     = in[i].fF_ApR7;
+	          	            
+    out[i].gamma       = in[i].gamma;
+    out[i].E1          = in[i].E1;
+    out[i].E2          = in[i].E2;
+
+    out[i].objID       = in[i].objID;
+    out[i].catID       = in[i].catID;
+
+    out[i].photcode    = in[i].photcode;
+    out[i].Nmeas       = in[i].Nmeas;
+  }
+  return (out);
+}
+
+Lensobj_PS1_V5_LOAD *LensobjInternalTo_PS1_V5_LOAD (Lensobj *in, off_t Nvalues) {
+
+  off_t i;
+  Lensobj_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, Lensobj_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+
+    out[i].X11_sm_obj  = in[i].X11_sm_obj;      
+    out[i].X12_sm_obj  = in[i].X12_sm_obj;      
+    out[i].X22_sm_obj  = in[i].X22_sm_obj;      
+    out[i].E1_sm_obj   = in[i].E1_sm_obj;      
+    out[i].E2_sm_obj   = in[i].E2_sm_obj;      
+	             	                 
+    out[i].X11_sh_obj  = in[i].X11_sh_obj;      
+    out[i].X12_sh_obj  = in[i].X12_sh_obj;      
+    out[i].X22_sh_obj  = in[i].X22_sh_obj;      
+    out[i].E1_sh_obj   = in[i].E1_sh_obj;      
+    out[i].E2_sh_obj   = in[i].E2_sh_obj;     
+	             	                 
+    out[i].X11_sm_psf  = in[i].X11_sm_psf;
+    out[i].X12_sm_psf  = in[i].X12_sm_psf;
+    out[i].X22_sm_psf  = in[i].X22_sm_psf;
+    out[i].E1_sm_psf   = in[i].E1_sm_psf;
+    out[i].E2_sm_psf   = in[i].E2_sm_psf;     
+	             	                 
+    out[i].X11_sh_psf  = in[i].X11_sh_psf;
+    out[i].X12_sh_psf  = in[i].X12_sh_psf;
+    out[i].X22_sh_psf  = in[i].X22_sh_psf;
+    out[i].E1_sh_psf   = in[i].E1_sh_psf;
+    out[i].E2_sh_psf   = in[i].E2_sh_psf;
+
+    out[i].F_ApR5      = in[i].F_ApR5;
+    out[i].dF_ApR5     = in[i].dF_ApR5;
+    out[i].sF_ApR5     = in[i].sF_ApR5;
+    out[i].fF_ApR5     = in[i].fF_ApR5;
+	               	            
+    out[i].F_ApR6      = in[i].F_ApR6;
+    out[i].dF_ApR6     = in[i].dF_ApR6;
+    out[i].sF_ApR6     = in[i].sF_ApR6;
+    out[i].fF_ApR6     = in[i].fF_ApR6;
+	          	            
+    out[i].F_ApR7      = in[i].F_ApR7;
+    out[i].dF_ApR7     = in[i].dF_ApR7;
+    out[i].sF_ApR7     = in[i].sF_ApR7;
+    out[i].fF_ApR7     = in[i].fF_ApR7;
+	          	            
+    out[i].gamma       = in[i].gamma;
+    out[i].E1          = in[i].E1;
+    out[i].E2          = in[i].E2;
+
+    out[i].objID       = in[i].objID;
+    out[i].catID       = in[i].catID;
+
+    out[i].photcode    = in[i].photcode;
+    out[i].Nmeas       = in[i].Nmeas;
+  }
+  return (out);
+}
+
+StarPar *StarPar_PS1_V5_LOAD_ToInternal (StarPar_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  StarPar *out;
+
+  ALLOCATE_ZERO (out, StarPar, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_starpar_init (&out[i]);
+
+    out[i].R  	     = in[i].R;      
+    out[i].D  	     = in[i].D;      
+    out[i].galLat    = in[i].galLat;      
+    out[i].galLon    = in[i].galLon;      
+
+    out[i].Ebv       = in[i].Ebv     ;      
+    out[i].dEbv      = in[i].dEbv    ;      
+    out[i].DistMag   = in[i].DistMag ;      
+    out[i].dDistMag  = in[i].dDistMag;      
+    out[i].M_r       = in[i].M_r     ;      
+    out[i].dM_r      = in[i].dM_r    ;      
+    out[i].FeH       = in[i].FeH     ;      
+    out[i].dFeH      = in[i].dFeH    ;      
+    out[i].uRA       = in[i].uRA     ;      
+    out[i].uDEC      = in[i].uDEC    ;      
+
+    out[i].averef  = in[i].averef;
+    out[i].objID   = in[i].objID ;
+    out[i].catID   = in[i].catID ;
+  }
+  return (out);
+}
+
+StarPar_PS1_V5_LOAD *StarParInternalTo_PS1_V5_LOAD (StarPar *in, off_t Nvalues) {
+
+  off_t i;
+  StarPar_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, StarPar_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+
+    out[i].R  	     = in[i].R;      
+    out[i].D  	     = in[i].D;      
+    out[i].galLat    = in[i].galLat;      
+    out[i].galLon    = in[i].galLon;      
+
+    out[i].Ebv       = in[i].Ebv     ;      
+    out[i].dEbv      = in[i].dEbv    ;      
+    out[i].DistMag   = in[i].DistMag ;      
+    out[i].dDistMag  = in[i].dDistMag;      
+    out[i].M_r       = in[i].M_r     ;      
+    out[i].dM_r      = in[i].dM_r    ;      
+    out[i].FeH       = in[i].FeH     ;      
+    out[i].dFeH      = in[i].dFeH    ;      
+    out[i].uRA       = in[i].uRA     ;      
+    out[i].uDEC      = in[i].uDEC    ;      
+
+    out[i].averef  = in[i].averef;
+    out[i].objID   = in[i].objID ;
+    out[i].catID   = in[i].catID ;
+  }
+  return (out);
+}
+
+GalPhot *GalPhot_PS1_V5_LOAD_ToInternal (GalPhot_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  GalPhot *out;
+
+  ALLOCATE_ZERO (out, GalPhot, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    dvo_galphot_init (&out[i]);
+
+    out[i].Xfit       	 = in[i].Xfit;
+    out[i].Yfit      	 = in[i].Yfit;
+    out[i].mag       	 = in[i].mag;
+    out[i].magErr    	 = in[i].magErr;
+    out[i].majorAxis 	 = in[i].majorAxis;
+    out[i].minorAxis 	 = in[i].minorAxis;
+    out[i].majorAxisErr  = in[i].majorAxisErr;
+    out[i].minorAxisErr  = in[i].minorAxisErr;
+    out[i].theta         = in[i].theta;
+    out[i].thetaErr      = in[i].thetaErr;
+    out[i].index         = in[i].index;
+    out[i].chisq	 = in[i].chisq;
+    out[i].Npix 	 = in[i].Npix;
+    out[i].objID	 = in[i].objID;
+    out[i].catID         = in[i].catID;
+    out[i].detID	 = in[i].detID;
+    out[i].imageID	 = in[i].imageID;
+    out[i].averef	 = in[i].averef;
+    out[i].flags	 = in[i].flags;
+    out[i].photcode	 = in[i].photcode;
+    out[i].modelType	 = in[i].modelType;
+  }
+  return (out);
+}
+
+GalPhot_PS1_V5_LOAD *GalPhotInternalTo_PS1_V5_LOAD (GalPhot *in, off_t Nvalues) {
+
+  off_t i;
+  GalPhot_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, GalPhot_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    out[i].Xfit       	 = in[i].Xfit;
+    out[i].Yfit      	 = in[i].Yfit;
+    out[i].mag       	 = in[i].mag;
+    out[i].magErr    	 = in[i].magErr;
+    out[i].majorAxis 	 = in[i].majorAxis;
+    out[i].minorAxis 	 = in[i].minorAxis;
+    out[i].majorAxisErr  = in[i].majorAxisErr;
+    out[i].minorAxisErr  = in[i].minorAxisErr;
+    out[i].theta         = in[i].theta;
+    out[i].thetaErr      = in[i].thetaErr;
+    out[i].index         = in[i].index;
+    out[i].chisq	 = in[i].chisq;
+    out[i].Npix 	 = in[i].Npix;
+    out[i].objID	 = in[i].objID;
+    out[i].catID         = in[i].catID;
+    out[i].detID	 = in[i].detID;
+    out[i].imageID	 = in[i].imageID;
+    out[i].averef	 = in[i].averef;
+    out[i].flags	 = in[i].flags;
+    out[i].photcode	 = in[i].photcode;
+    out[i].modelType	 = in[i].modelType;
+  }
+  return (out);
+}
+
+# define RAW_IMAGE_NAME_LEN 117
+
+Image *Image_PS1_V5_LOAD_ToInternal (Image_PS1_V5_LOAD *in, off_t Nvalues, off_t Nalloc) {
+
+  off_t i;
+  Image *out;
+
+  char *buffer;
+  ALLOCATE_ZERO (buffer, char, Nalloc);
+  out = (Image *) buffer;
+  // ALLOCATE_ZERO (out, Image, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    // this is only safe because the initial 120 bytes in Coords match CoordsDisk
+    memcpy (&out[i].coords, &in[i].coords, sizeof(CoordsDisk));
+    out[i].coords.mosaic   = NULL;
+    out[i].coords.offsetMap = NULL;
+
+    // RAW_IMAGE_NAME_LEN == DVO_IMAGE_NAME_LEN
+    strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1);
+    out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination
+
+    out[i].tzero    	    = in[i].tzero;
+    out[i].nstar    	    = in[i].nstar;
+    out[i].secz	    	    = in[i].secz;
+    out[i].NX	    	    = in[i].NX;
+    out[i].NY	    	    = in[i].NY;
+    out[i].apmifit  	    = in[i].apmifit;
+    out[i].dapmifit 	    = in[i].dapmifit;
+    out[i].Mcal	    	    = in[i].Mcal;
+    out[i].dMcal    	    = in[i].dMcal;
+    out[i].Xm	    	    = in[i].Xm;
+    out[i].photcode   	    = in[i].photcode;
+    out[i].exptime  	    = in[i].exptime;
+    out[i].sidtime  	    = in[i].sidtime;
+    out[i].latitude  	    = in[i].latitude;
+
+    out[i].RAo  	    = in[i].RAo;
+    out[i].DECo  	    = in[i].DECo;
+    out[i].Radius  	    = in[i].Radius;
+    out[i].refColorBlue	    = in[i].refColorBlue;
+    out[i].refColorRed 	    = in[i].refColorRed;
+
+    out[i].detection_limit  = in[i].detection_limit;
+    out[i].saturation_limit = in[i].saturation_limit;
+    out[i].cerror	    = in[i].cerror;
+    out[i].fwhm_x	    = in[i].fwhm_x;
+    out[i].fwhm_y	    = in[i].fwhm_y;
+    out[i].trate	    = in[i].trate;
+    out[i].ccdnum	    = in[i].ccdnum;
+    out[i].flags	    = in[i].flags;
+    out[i].imageID	    = in[i].imageID;
+    out[i].parentID	    = in[i].parentID;
+    out[i].externID	    = in[i].externID;
+    out[i].sourceID	    = in[i].sourceID;
+
+    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
+    // with the following.  (no real databases used those values -- see
+    // libdvo/doc/dvo-images.txt)
+    out[i].nLinkAstrom	    = in[i].nLinkAstrom;
+    out[i].nLinkPhotom	    = in[i].nLinkPhotom;
+    out[i].ubercalDist	    = in[i].ubercalDist;
+    out[i].dXpixSys	    = in[i].dXpixSys;
+    out[i].dYpixSys	    = in[i].dYpixSys;
+    out[i].dMagSys	    = in[i].dMagSys;
+    out[i].nFitAstrom       = in[i].nFitAstrom;
+    out[i].nFitPhotom       = in[i].nFitPhotom;
+    out[i].photom_map_id    = in[i].photom_map_id;
+    out[i].astrom_map_id    = in[i].astrom_map_id;
+  }
+  return (out);
+}
+
+Image_PS1_V5_LOAD *ImageInternalTo_PS1_V5_LOAD (Image *in, off_t Nvalues) {
+
+  off_t i;
+  Image_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, Image_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    // this is only save because the initial 120 bytes in Coords match CoordsDisk
+    memcpy (&out[i].coords, &in[i].coords, sizeof(CoordsDisk));
+
+    // RAW_IMAGE_NAME_LEN == DVO_IMAGE_NAME_LEN
+    strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1);
+    out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination
+
+    out[i].tzero    	    = in[i].tzero;
+    out[i].nstar    	    = in[i].nstar;
+    out[i].secz	    	    = in[i].secz;
+    out[i].NX	    	    = in[i].NX;
+    out[i].NY	    	    = in[i].NY;
+    out[i].apmifit  	    = in[i].apmifit;
+    out[i].dapmifit 	    = in[i].dapmifit;
+    out[i].Mcal	    	    = in[i].Mcal;
+    out[i].dMcal    	    = in[i].dMcal;
+    out[i].Xm	    	    = in[i].Xm;
+    out[i].photcode   	    = in[i].photcode;
+    out[i].exptime  	    = in[i].exptime;
+    out[i].sidtime  	    = in[i].sidtime;
+    out[i].latitude  	    = in[i].latitude;
+
+    out[i].RAo  	    = in[i].RAo;
+    out[i].DECo  	    = in[i].DECo;
+    out[i].Radius  	    = in[i].Radius;
+    out[i].refColorBlue	    = in[i].refColorBlue;
+    out[i].refColorRed 	    = in[i].refColorRed;
+
+    out[i].detection_limit  = in[i].detection_limit;
+    out[i].saturation_limit = in[i].saturation_limit;
+    out[i].cerror	    = in[i].cerror;
+    out[i].fwhm_x	    = in[i].fwhm_x;
+    out[i].fwhm_y	    = in[i].fwhm_y;
+    out[i].trate	    = in[i].trate;
+    out[i].ccdnum	    = in[i].ccdnum;
+    out[i].flags	    = in[i].flags;
+    out[i].imageID	    = in[i].imageID;
+    out[i].parentID	    = in[i].parentID;
+    out[i].externID	    = in[i].externID;
+    out[i].sourceID	    = in[i].sourceID;
+
+    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
+    // with the following.  (no real databases used those values -- see
+    // libdvo/doc/dvo-images.txt)
+    out[i].nLinkAstrom	    = in[i].nLinkAstrom;
+    out[i].nLinkPhotom	    = in[i].nLinkPhotom;
+    out[i].ubercalDist	    = in[i].ubercalDist;
+    out[i].dXpixSys	    = in[i].dXpixSys;
+    out[i].dYpixSys	    = in[i].dYpixSys;
+    out[i].dMagSys	    = in[i].dMagSys;
+    out[i].nFitAstrom       = in[i].nFitAstrom;
+    out[i].nFitPhotom       = in[i].nFitPhotom;
+    out[i].photom_map_id    = in[i].photom_map_id;
+    out[i].astrom_map_id    = in[i].astrom_map_id;
+  }
+  return (out);
+}
+
+PhotCode *PhotCode_PS1_V5_LOAD_To_Internal (PhotCode_PS1_V5_LOAD *in, off_t Nvalues) {
+
+  off_t i;
+  PhotCode *out;
+
+  ALLOCATE_ZERO (out, PhotCode, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    strncpy (out[i].name, in[i].name, 31); // out[32], in[32]
+    out[i].name[31] = 0; // force termination
+
+    out[i].code  = in[i].code;         
+    out[i].type  = in[i].type;         
+    out[i].C     = in[i].C;            
+    out[i].dC 	 = in[i].dC;           
+    out[i].dX 	 = in[i].dX;           
+    out[i].K  	 = in[i].K;            
+    out[i].c1 	 = in[i].c1;           
+    out[i].c2 	 = in[i].c2;           
+    out[i].equiv = in[i].equiv;        
+    out[i].Nc    = in[i].Nc;           
+    memcpy (out[i].X, in[i].X, 4*sizeof(float));            
+
+    out[i].astromErrSys      = in[i].astromErrSys;
+    out[i].astromErrScale    = in[i].astromErrScale;
+    out[i].astromErrMagScale = in[i].astromErrMagScale;
+    out[i].photomErrSys      = in[i].photomErrSys;
+
+    out[i].photomPoorMask      = in[i].photomPoorMask;
+    out[i].photomBadMask       = in[i].photomBadMask;
+    out[i].astromPoorMask      = in[i].astromPoorMask;
+    out[i].astromBadMask       = in[i].astromBadMask;
+  }
+  return (out);
+}
+
+PhotCode_PS1_V5_LOAD *PhotCode_Internal_To_PS1_V5_LOAD (PhotCode *in, off_t Nvalues) {
+
+  off_t i;
+  PhotCode_PS1_V5_LOAD *out;
+
+  ALLOCATE_ZERO (out, PhotCode_PS1_V5_LOAD, Nvalues);
+
+  for (i = 0; i < Nvalues; i++) {
+    strncpy (out[i].name, in[i].name, 31); // out[32], in[32]
+    out[i].name[31] = 0; // force termination
+
+    out[i].code  = in[i].code;         
+    out[i].type  = in[i].type;         
+    out[i].C     = in[i].C;            
+    out[i].dC 	 = in[i].dC;           
+    out[i].dX 	 = in[i].dX;           
+    out[i].K  	 = in[i].K;            
+    out[i].c1 	 = in[i].c1;           
+    out[i].c2 	 = in[i].c2;           
+    out[i].equiv = in[i].equiv;        
+    out[i].Nc    = in[i].Nc;           
+    memcpy (out[i].X, in[i].X, 4*sizeof(float));            
+
+    out[i].astromErrSys      = in[i].astromErrSys;
+    out[i].astromErrScale    = in[i].astromErrScale;
+    out[i].astromErrMagScale = in[i].astromErrMagScale;
+    out[i].photomErrSys      = in[i].photomErrSys;
+
+    out[i].photomPoorMask      = in[i].photomPoorMask;
+    out[i].photomBadMask       = in[i].photomBadMask;
+    out[i].astromPoorMask      = in[i].astromPoorMask;
+    out[i].astromBadMask       = in[i].astromBadMask;
+  }
+  return (out);
+}
Index: /trunk/Ohana/src/libdvo/src/dvo_image.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_image.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/dvo_image.c	(revision 40063)
@@ -223,4 +223,5 @@
   if (db[0].format == DVO_FORMAT_PS1_V4)          gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_V4");
   if (db[0].format == DVO_FORMAT_PS1_V5)          gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_V5");
+  if (db[0].format == DVO_FORMAT_PS1_V5_LOAD)     gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_V5_LOAD");
   if (db[0].format == DVO_FORMAT_PS1_REF)         gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_REF");
   if (db[0].format == DVO_FORMAT_PS1_SIM)         gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_SIM");
Index: /trunk/Ohana/src/libdvo/src/dvo_image_raw.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/dvo_image_raw.c	(revision 40062)
+++ /trunk/Ohana/src/libdvo/src/dvo_image_raw.c	(revision 40063)
@@ -60,4 +60,5 @@
   if (db[0].format == DVO_FORMAT_PS1_V4)          ImageSize = sizeof(Image_PS1_V4);
   if (db[0].format == DVO_FORMAT_PS1_V5)          ImageSize = sizeof(Image_PS1_V5);
+  if (db[0].format == DVO_FORMAT_PS1_V5_LOAD)     ImageSize = sizeof(Image_PS1_V5_LOAD);
   if (db[0].format == DVO_FORMAT_PS1_REF)         ImageSize = sizeof(Image_PS1_REF);
   if (db[0].format == DVO_FORMAT_PS1_SIM)         ImageSize = sizeof(Image_PS1_SIM);
@@ -92,4 +93,5 @@
   if (db[0].format == DVO_FORMAT_PS1_V4)          gfits_table_mkheader_Image_PS1_V4 (&db[0].theader);
   if (db[0].format == DVO_FORMAT_PS1_V5)          gfits_table_mkheader_Image_PS1_V5 (&db[0].theader);
+  if (db[0].format == DVO_FORMAT_PS1_V5_LOAD)     gfits_table_mkheader_Image_PS1_V5_LOAD (&db[0].theader);
   if (db[0].format == DVO_FORMAT_PS1_REF)         gfits_table_mkheader_Image_PS1_REF (&db[0].theader);
   if (db[0].format == DVO_FORMAT_PS1_SIM)         gfits_table_mkheader_Image_PS1_SIM (&db[0].theader);
