Index: trunk/ippToPsps/src/ippToPspsConfig.c
===================================================================
--- trunk/ippToPsps/src/ippToPspsConfig.c	(revision 28559)
+++ trunk/ippToPsps/src/ippToPspsConfig.c	(revision 29327)
@@ -701,4 +701,29 @@
 }
 
+// gets metadata about a column 
+bool ippToPspsConfig_getFitsColumnMeta(
+        char* name,
+        int* colNum,
+        int* type,
+        long* repeat,
+        fitsfile *fitsIn ) {
+
+    int status = 0;
+    fits_get_colnum(fitsIn, CASESEN, name, colNum, &status);
+    if (status) {
+        psError(PS_ERR_IO, false, "Unable to read col '%s'", name);
+        return false;
+    }
+
+    status = 0;
+    fits_get_eqcoltype(fitsIn, *colNum, type, repeat, NULL, &status);
+    if (status) {
+        psError(PS_ERR_IO, false, "Unable to read type info for '%s'", name);
+        return false;
+    }
+
+    return true;
+}
+
 // populate with data from another FITS table into this one
 static bool ippToPspsConfig_populateTableFromFits(
@@ -730,5 +755,5 @@
     int readStatus = 0;
     int writeStatus = 0;
-   
+
     // first loop round all columns and get IPP col numbers for provided column names TODO only do once, first time in
     if(!fromHeader) {
@@ -737,7 +762,11 @@
 
             if (strlen(table->columns[i].ippName) < 1) continue;
-            readStatus = 0;
-            fits_get_colnum(fitsIn, CASESEN, table->columns[i].ippName, &table->columns[i].ippColNum, &readStatus);
-            if (readStatus) psError(PS_ERR_IO, false, "%d Unable to read col num for '%s' '%s' %d", i, table->columns[i].pspsName, table->columns[i].ippName, table->columns[i].ippColNum);
+
+            if (!ippToPspsConfig_getFitsColumnMeta(
+                    table->columns[i].ippName,
+                    &table->columns[i].ippColNum,
+                    &table->columns[i].ippType,
+                    &table->columns[i].ippRepeat,
+                    fitsIn)) {return false;}
         }
     }
