NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Which "Set"?


Greetings!

I have a rather convoluted relationship between the following variables

independent: range r
dependent: height h, slantRange s
"quasi-independent" elevation e (user input)


h = f(r, e) or in VisAD notation: ( (r, e) -> h )

s = g(r, e, h), i.e. ( (r,e,h) -> s)
[so technically, s = g(r, e, f(r, e)) or ( (r, e, (r, e)) -> s )]


If you are still following this...

I am using r as any 1D Set and e is user input.

I want to plot h (YAxis) vs. s (XAxis).

When the user changes e, I want to recalculate h and s and update the 2-Dimensional output (a curve)

Currently I am able to do everything but update h using the following:

    r = RealType.getRealType("R", SI.meter, null);
    (^^^ Just realized that I don't use this, but instead I use:)
    r_set = new Linear1DSet(0.0, 400.0, LENGTH);

    h = RealType.getRealType("Height", SI.meter, null);
    s = RealType.getRealType("SlantRange", SI.meter, null);
    double e;
    float[][] h_vals = new float[1][LENGTH];
    float[][] s_vals = new float[1][LENGTH];
    (h_vals and s_vals are calculated by r_set)


    func_h_s = new FunctionType(h, s);
    h_setI = new Irregular1DSet(h, h_vals );
    vals_ff_I = new FlatField(func_h_s, h_setI);
    vals_ff_I.setSamples(s_vals);

    xMap = new ScalarMap(s, Display.XAxis);
    yMap = new ScalarMap(h, Display.YAxis);


These are snippets from my code that hopefully shows he relationship. I can provide more if it would help clear up what I am trying to do.

Should I arrange my data into Tuples? Should I use a 2D set - and if I do, can I plot it as a curve? (the examples in the tutorial seem to show most things in a 2D set as contours of one type or another)

Thank you very much for your help!!

-kevin.

--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD]               (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

"My opinions are my own and not representative of CIMMS, NSSL,
 NOAA or any affiliates"
+------------------------------------------------------------+


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: