Index: /trunk/Ohana/src/tools/src/fields.c
===================================================================
--- /trunk/Ohana/src/tools/src/fields.c	(revision 15645)
+++ /trunk/Ohana/src/tools/src/fields.c	(revision 15646)
@@ -22,5 +22,5 @@
   FILE *f;
   Header header;
-  char filename[1000], *Extname, extname[80];
+  char filename[1000], *CCDKeyword, *Extname, extname[80];
   int N, Nbytes, Extnum, Nextend, status, GotFile, GotField, GotExtension;
 
@@ -29,4 +29,14 @@
   if (get_argument (argc, argv, "-h")) usage();
   if (get_argument (argc, argv, "--help")) usage();
+
+  CCDKeyword = NULL;
+  if ((N = get_argument (argc, argv, "-keyword"))) {
+    remove_argument (N, &argc, argv);
+    CCDKeyword = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+  if (CCDKeyword == NULL) {
+    CCDKeyword = strcreate ("EXTNAME");
+  }
 
   Extnum = FALSE;
@@ -71,6 +81,6 @@
       }
       while (gfits_fread_header (f, &header)) {
-	/* extract the EXTNAME for this component (set to PHU for 0th component) */
-	status = gfits_scan (&header, "EXTNAME", "%s", 1, extname);
+	/* extract the EXTNAME (or other CCDKeyword) for this component (set to PHU for 0th component) */
+	status = gfits_scan (&header, CCDKeyword, "%s", 1, extname);
 	if (!status) {
 	  if (Nextend == 0) {
