IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2009, 4:19:37 PM (17 years ago)
Author:
beaumont
Message:

merging from cnb_branch_20090215

Location:
trunk/psModules
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/psModules

  • trunk/psModules/src/objects/pmSourceVisual.c

    r22752 r23242  
    99#if (HAVE_KAPA)
    1010#include <kapa.h>
     11#include "pmVisual.h"
    1112
    1213// functions used to visualize the analysis as it goes
    1314// these are invoked by the -visual options
    1415
    15 static bool isVisual = false;
    1616static int kapa1 = -1;
     17static bool plotPSF = true;
    1718// static int kapa2 = -1;
    1819// static int kapa3 = -1;
    1920
     21bool pmSourceVisualClose() {
     22    if (kapa1 != -1)
     23        KiiClose(kapa1);
     24    return true;
     25}
     26
    2027bool pmSourcePlotPoints3D (int myKapa, Graphdata *graphdata, psVector *xn, psVector *yn, psVector *zn, float theta, float phi);
    2128
    22 bool pmSourceSetVisual (bool mode) {
    23 
    24     isVisual = mode;
    25     return true;
    26 }
    2729
    2830bool pmSourceVisualPSFModelResid (pmTrend2D *trend, psVector *x, psVector *y, psVector *param, psVector *mask) {
     
    3234    Graphdata graphdata;
    3335
    34     if (!isVisual) return true;
     36    if (!pmVisualIsVisual() || !plotPSF) return true;
    3537
    3638    if (kapa1 == -1) {
     
    3840        if (kapa1 == -1) {
    3941            fprintf (stderr, "failure to open kapa; visual mode disabled\n");
    40             isVisual = false;
     42            pmVisualSetVisual(false);
    4143            return false;
    4244        }
     
    152154    // pause and wait for user input:
    153155    // continue, save (provide name), ??
    154     char key[10];
    155     fprintf (stdout, "[c]ontinue? ");
    156     if (!fgets(key, 8, stdin)) {
    157         psWarning("Unable to read option");
    158     }
     156    pmVisualAskUser(&plotPSF);
     157
    159158    return true;
    160159}
  • trunk/psModules/src/objects/pmSourceVisual.h

    r20582 r23242  
    11/* @file  pmKapaPlots.h
    2  * @brief functions to make plots with the external program 'kapa' 
     2 * @brief functions to make plots with the external program 'kapa'
    33 *
    44 * @author EAM, IfA
    55 *
    6  * @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-11-08 01:52:34 $
     6 * @version $Revision: 1.1.16.1 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2009-02-19 17:59:50 $
    88 * Copyright 2006 Institute for Astronomy, University of Hawaii
    99 */
     
    1212#define PM_SOURCE_VISUAL_H
    1313
     14bool pmSourceVisualClose(void);
     15
    1416/// @addtogroup Extras Miscellaneous Funtions
    1517/// @{
    1618
    17 bool pmSourceSetVisual (bool mode);
    1819bool pmSourceVisualPSFModelResid (pmTrend2D *trend, psVector *x, psVector *y, psVector *param, psVector *mask);
    1920
Note: See TracChangeset for help on using the changeset viewer.