Index: trunk/pswarp/src/pswarpParseCamera.c
===================================================================
--- trunk/pswarp/src/pswarpParseCamera.c	(revision 10954)
+++ trunk/pswarp/src/pswarpParseCamera.c	(revision 12505)
@@ -4,4 +4,6 @@
 
     bool status;
+    pmFPAfile *skycell = NULL;
+    pmConfig *skyConfig = NULL;
 
     // the input image(s) are required arguments; they define the camera
@@ -13,28 +15,32 @@
     }
 
+    // the input image(s) are required arguments; they define the camera
+    status = false;
+    pmFPAfileDefineFromArgs (&status, config, "PSWARP.ASTROM", "ASTROM");
+    if (status) {
+	fprintf (stderr, "using supplied astrometry\n");
+    } else {
+	fprintf (stderr, "using header astrometry\n");
+    }
+
+    // the mask is not required - but must conform to input camera
+    if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.MASK", "MASK")) {
+	fprintf (stderr, "no mask supplied\n");
+    } 
+
+    if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.WEIGHT", "WEIGHT")) {
+	fprintf (stderr, "no weight supplied\n");
+    } 
+
     // the input skycell is a required argument: it defines the output image
-    status = false;
-    pmFPAfile *skycell = pmFPAfileDefineFromArgs (&status, config, "PSWARP.SKYCELL", "SKYCELL");
-    if (!skycell) {
+    // XXX we may need a different skycell structure here
+    status = pswarpDefineSkycell (&skycell, &skyConfig, config, "PSWARP.SKYCELL", "SKYCELL");
+    if (!status) {
 	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.SKYCELL");
 	return false;
     }
 
-    // the mask is not required; the  skycell is a required argument: it defines the output image
-    status = false;
-    pmFPAfileDefineFromArgs (&status, config, "PSWARP.MASK", "MASK");
-    if (!status) {
-      // build the basic mask concept here
-    }
-
-    // the weight is not required; the  skycell is a required argument: it defines the output image
-    status = false;
-    pmFPAfileDefineFromArgs (&status, config, "PSWARP.WEIGHT", "WEIGHT");
-    if (!status) {
-      // build the basic weight concept here
-    }
-
     // these calls bind the I/O handle to the specified fpa
-    if (!pmFPAfileDefineOutput (config, skycell->fpa, "PSWARP.OUTPUT")) {
+    if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT")) {
 	psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT");
 	return false;
@@ -55,4 +61,5 @@
     }
     psFree (chips);
+    psFree (skyConfig);
 
     psTrace("pswarp", 1, "Done with pswarpParseCamera...\n");
