Index: trunk/ippTools/src/regtool.c
===================================================================
--- trunk/ippTools/src/regtool.c	(revision 9057)
+++ trunk/ippTools/src/regtool.c	(revision 9189)
@@ -794,4 +794,13 @@
         return false;
     }
+    psString obstype = psMetadataLookupStr(&status, config->args, "-obstype");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -obstype");
+        return false;
+    }
+    if (!obstype) {
+        psError(PS_ERR_UNKNOWN, true, "-obstype is required");
+        return false;
+    }
 
     return rawDetrendExpRowAlloc(
@@ -812,5 +821,6 @@
         az,
         ccd_temp,
-        posang
+        posang,
+        obstype
     );
 }
@@ -937,4 +947,13 @@
     if (isnan(posang)) {
         psError(PS_ERR_UNKNOWN, true, "-posang is required");
+        return false;
+    }
+    psString obstype = psMetadataLookupStr(&status, config->args, "-obstype");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -obstype");
+        return false;
+    }
+    if (!obstype) {
+        psError(PS_ERR_UNKNOWN, true, "-obstype is required");
         return false;
     }
@@ -957,5 +976,6 @@
         az,
         ccd_temp,
-        posang
+        posang,
+        obstype
     );
 }
