Index: /trunk/ippTools/src/disttool.c
===================================================================
--- /trunk/ippTools/src/disttool.c	(revision 35192)
+++ /trunk/ippTools/src/disttool.c	(revision 35193)
@@ -143,5 +143,5 @@
     // optional
     PXOPT_LOOKUP_BOOL(use_alternate, config->args, "-use_alternate", false);
-    PXOPT_LOOKUP_BOOL(no_magic, config->args, "-no_magic", false);
+    PXOPT_LOOKUP_BOOL(magic, config->args, "-magic", false);
     PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false);
     PXOPT_LOOKUP_STR(set_data_group, config->args, "-set_data_group", false, false);
@@ -175,5 +175,5 @@
             return false;
         }
-        if (no_magic) {
+        if (!magic) {
             psError(PXTOOLS_ERR_SYS, true, "no_magic forbidden with alternate inputs");
             return false;
@@ -187,5 +187,5 @@
     // an interest)
     // and exp_id to be supplied. We could add -exp_type and dateobs cuts to make it easier
-    if (!strcmp(stage, "raw") && no_magic && !(exp_id && dist_group && exp_type)) {
+    if (!strcmp(stage, "raw") && !magic && !(exp_id && dist_group && exp_type)) {
         psError(PXTOOLS_ERR_SYS, true, "exp_id, exp_type, and dist_group are required for raw stage if no_magic");
         return false;
@@ -204,5 +204,5 @@
             runJoinStr = "camRun.exp_id";
         }
-        if (!no_magic) {
+        if (magic) {
             query = pxDataGet("disttool_definebyquery_raw.sql");
         } else {
@@ -215,5 +215,5 @@
         }
 
-        if (!no_magic) {
+        if (magic) {
             if (label) {
                 psStringAppend(&query, " AND (magicDSRun.label = '%s')", label);
@@ -289,5 +289,5 @@
         }
         // fake stage doesn't require magic
-        no_magic = true;
+        magic = false;
     } else if (!strcmp(stage, "warp")) {
         magicRunType = "warpRun";
@@ -357,5 +357,5 @@
         }
         // stack stage doesn't require magic
-        no_magic = true;
+        magic = false;
     } else if (!strcmp(stage, "sky")) {
         magicRunType = "staticskyRun";
@@ -378,5 +378,5 @@
         }
         // (static)sky stage doesn't require magic
-        no_magic = true;
+        magic = false;
     } else if (!strcmp(stage, "SSdiff")) {
       magicRunType = "diffRun";
@@ -396,5 +396,5 @@
       }
 
-      no_magic = true;
+      magic = false;
     } else {
         psError(PS_ERR_UNKNOWN, true, "unknown value for stage: %s", stage);
@@ -408,5 +408,5 @@
 
     if (!strcmp(stage, "raw")) {
-        if (!no_magic) {
+        if (magic) {
             psStringAppend(&query, " AND (magicDSRun.re_place = %d)", !use_alternate);
             psStringAppend(&query, " AND (camRun.state = 'full')");
@@ -426,5 +426,5 @@
     psString joinHook = NULL;
 
-    if (!no_magic) {
+    if (magic) {
         psStringAppend(&query, " AND (%s.magicked > 0)", magicRunType);
     }
@@ -517,5 +517,5 @@
                 NULL,     // outdir
                 clean,
-                no_magic,
+                !magic,
                 use_alternate,
                 "new",
Index: /trunk/ippTools/src/disttoolConfig.c
===================================================================
--- /trunk/ippTools/src/disttoolConfig.c	(revision 35192)
+++ /trunk/ippTools/src/disttoolConfig.c	(revision 35193)
@@ -48,5 +48,6 @@
     psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-workdir",   0, "define workdir (required)", NULL);
 
-    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed", false);
+    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed (ignored)", false);
+    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-magic", 0, "magic is needed", false);
     psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-use_alternate", 0, "use alternate inputs", false);
     psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label",    0, "define label for run", NULL);
