IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 16, 2007, 3:19:08 PM (19 years ago)
Author:
eugene
Message:

asserting the use of the libkapa APIs to interface with kapa2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kapa-mods-2007-05/Ohana/src/opihi/lib.data/PlotVectors.c

    r13391 r13402  
    66
    77  if (!GetGraph (NULL, &kapa, NULL)) return (FALSE);
    8  
    9   /* tell kapa to look for the incoming image */
    10   KiiSendCommand (kapa, 4, "PLOT");
    11  
    12   /* send kapa the plot details */
    13   KiiSendMessage (kapa, "%8d %8d %d %d %d %d %d %f %f",
    14                   Npts, graphmode[0].style,
    15                   graphmode[0].ptype, graphmode[0].ltype,
    16                   graphmode[0].etype, graphmode[0].ebar, graphmode[0].color,
    17                   graphmode[0].lweight, graphmode[0].size);
    18   KiiSendMessage (kapa, "%g %g %g %g",
    19                   graphmode[0].xmin, graphmode[0].xmax,
    20                   graphmode[0].ymin, graphmode[0].ymax);
     8  KapaPrepPlot (kapa, Npts, graphmode);
    219  return (TRUE);
    2210}
     
    2412int PlotVector (int Npts, float *values) {
    2513
    26   int Nbytes;
    27 
    28   Nbytes = Npts * sizeof (float);
    29   write (kapa, values, Nbytes);
     14  KapaPlotVector (kapa, Npts, values);
    3015  return (TRUE);
    3116}
     
    3318int PlotVectorPair (int N, float *xValues, float *yValues, Graphdata *graphmode) {
    3419
    35     PrepPlotting (N, graphmode);
    36     PlotVector (N, xValues);
    37     PlotVector (N, yValues);
     20  PrepPlotting (N, graphmode);
     21  PlotVector (N, xValues);
     22  PlotVector (N, yValues);
    3823
    39     return (TRUE);
     24  return (TRUE);
    4025}
    4126
    4227int PlotVectorTriplet (int N, float *xValues, float *yValues, float *zValues, Graphdata *graphmode) {
    4328
    44     PrepPlotting (N, graphmode);
    45     PlotVector (N, xValues);
    46     PlotVector (N, yValues);
    47     PlotVector (N, zValues);
     29  PrepPlotting (N, graphmode);
     30  PlotVector (N, xValues);
     31  PlotVector (N, yValues);
     32  PlotVector (N, zValues);
    4833
    49     return (TRUE);
     34  return (TRUE);
    5035}
    5136
    5237/* we don't use GetGraph in PlotVector because it flushes the connection */
     38/* PlotVector currently operates on the static identified socket
     39   rather than the currently active socket -- must be preceeded by PrepPlotting */
Note: See TracChangeset for help on using the changeset viewer.