Index: trunk/psphot/src/psphot.h
===================================================================
--- trunk/psphot/src/psphot.h	(revision 23229)
+++ trunk/psphot/src/psphot.h	(revision 23242)
@@ -171,5 +171,4 @@
 
 // psphotVisual functions
-bool psphotSetVisual (bool mode);
 bool psphotVisualShowImage (pmReadout *readout);
 bool psphotVisualShowBackground (pmConfig *config, const pmFPAview *view, pmReadout *readout);
Index: trunk/psphot/src/psphotArguments.c
===================================================================
--- trunk/psphot/src/psphotArguments.c	(revision 23229)
+++ trunk/psphot/src/psphotArguments.c	(revision 23242)
@@ -82,6 +82,5 @@
     if ((N = psArgumentGet (argc, argv, "-visual"))) {
         psArgumentRemove (N, &argc, argv);
-        psphotSetVisual (true);
-        // pmSourceSetVisual (true);
+        pmVisualSetVisual(true);
     }
 
Index: trunk/psphot/src/psphotVisual.c
===================================================================
--- trunk/psphot/src/psphotVisual.c	(revision 23229)
+++ trunk/psphot/src/psphotVisual.c	(revision 23242)
@@ -18,14 +18,8 @@
 // these are invoked by the -visual options
 
-static bool isVisual = false;
 static int kapa = -1;
 static int kapa2 = -1;
 static int kapa3 = -1;
 
-bool psphotSetVisual (bool mode) {
-
-    isVisual = mode;
-    return true;
-}
 
 bool psphotVisualShowMask (int kapaFD, psImage *inImage, const char *name, int channel) {
@@ -135,5 +129,5 @@
 bool psphotVisualShowImage (pmReadout *readout) {
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -141,5 +135,5 @@
         if (kapa == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -164,5 +158,5 @@
     pmReadout *backgnd;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -170,5 +164,5 @@
         if (kapa == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -199,5 +193,5 @@
 bool psphotVisualShowSignificance (psImage *image) {
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -205,5 +199,5 @@
         if (kapa == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -228,5 +222,5 @@
     KiiOverlay *overlay;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -306,5 +300,5 @@
     KiiOverlay *overlay;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -423,5 +417,5 @@
     psEllipseAxes axes;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -478,5 +472,5 @@
     Graphdata graphdata;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa3 == -1) {
@@ -484,5 +478,5 @@
         if (kapa3 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -694,5 +688,5 @@
 bool psphotVisualShowRoughClass (psArray *sources) {
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -723,5 +717,5 @@
 bool psphotVisualShowPSFModel (pmReadout *readout, pmPSF *psf) {
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa2 == -1) {
@@ -729,5 +723,5 @@
         if (kapa2 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -801,5 +795,5 @@
     bool status;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa2 == -1) {
@@ -807,5 +801,5 @@
         if (kapa2 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -961,5 +955,5 @@
     bool status;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa2 == -1) {
@@ -967,5 +961,5 @@
         if (kapa2 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -1214,5 +1208,5 @@
     KapaSection section;  // put the positive profile in one and the residuals in another?
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa3 == -1) {
@@ -1220,5 +1214,5 @@
         if (kapa3 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -1286,5 +1280,5 @@
     psEllipseAxes axes;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -1387,5 +1381,5 @@
     KiiOverlay *overlay;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -1464,5 +1458,5 @@
     KapaSection section;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa3 == -1) {
@@ -1470,5 +1464,5 @@
         if (kapa3 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -1604,5 +1598,5 @@
 bool psphotVisualShowResidualImage (pmReadout *readout) {
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa == -1) {
@@ -1610,5 +1604,5 @@
         if (kapa == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -1631,5 +1625,5 @@
     Graphdata graphdata;
 
-    if (!isVisual) return true;
+    if (!pmVisualIsVisual()) return true;
 
     if (kapa3 == -1) {
@@ -1637,5 +1631,5 @@
         if (kapa3 == -1) {
             fprintf (stderr, "failure to open kapa; visual mode disabled\n");
-            isVisual = false;
+            pmVisualSetVisual(false);
             return false;
         }
@@ -1712,5 +1706,4 @@
 # else
 
-bool psphotSetVisual (bool mode){}
 bool psphotVisualShowImage (pmConfig *config, pmReadout *readout) { return true; }
 bool psphotVisualShowBackground (pmConfig *config, const pmFPAview *view, pmReadout *readout) { return true; }
