Animating a merge1dset where one set has only one member

Now I can animate simple thunderstorm tracks displayed as ellipses
(using Display.Shape etc), however if any of the tracks have only one point,
I get a visad.SetException as listed below.

I can avoid the exception if either:
* I don't animate the display or
* I only display a single point track (ie don't merge the sets).
However I'd like to do both!

I can replicate the problem in Test03 with the changes below.

Thanks in advance for any help on this,

James

Code changes to Test03.java (original lines commented out):
int ntimes2 = 1;
// int ntimes2 = 6;
....
double[][] times = {{start}};
// double[][] times
//   {{start, start + 600.0, start + 1200.0,
//   start + 1800.0, start + 2400.0, start + 3000.0}};
Set time_hornet = new Gridded1DDoubleSet(time_type, times, ntimes2);
// Set time_hornet = new Gridded1DDoubleSet(time_type, times, 6);
....
image_stinger.setSample(0, tempw);
//
// for (int i=0; i<ntimes2; i++) {
//   image_stinger.setSample(i, tempw);
//   tempw = (FlatField) tempw.add(val);
// }

The resulting exception is:

D:\visad\examples>java Test03
visad.SetException: Gridded1DDoubleSet.valueToGrid: requires all grid dimensions
to be > 1
        at visad.Gridded1DDoubleSet.doubleToGrid(Gridded1DDoubleSet.java:297)
        at visad.Gridded1DDoubleSet.doubleToIndex(Gridded1DDoubleSet.java:225)
        at visad.Set.merge1DSets(Set.java:341)
        at visad.DataShadow.setAnimationSampling(DataShadow.java:72)
        at visad.SimpleSet.setAnimationSampling(SimpleSet.java:107)
        at visad.SampledSet.computeRanges(SampledSet.java:212)
        at visad.FieldImpl.computeRanges(FieldImpl.java:2586)
        at visad.Tuple.computeRanges(Tuple.java:261)
        at visad.DataImpl.computeRanges(DataImpl.java:496)
        at visad.DataRenderer.prepareAction(Compiled Code)
        at visad.DisplayImpl.doAction(Compiled Code)
        at visad.ActionImpl.run(Compiled Code)
        at visad.util.ThreadPool$ThreadMinnow.run(Compiled Code)
visad.VisADError: Action.run: visad.SetException:
Gridded1DDoubleSet.valueToGrid: requires all grid dimensions to be > 1
        at visad.ActionImpl.run(Compiled Code)
        at visad.util.ThreadPool$ThreadMinnow.run(Compiled Code)

James Kelly  
Regional Computing                            Bureau of Meteorology
PO Box 1289K                                  Melbourne 3001, Australia
Phone: 61-3-9669-4724 Fax: 61-3-9669-4128     Email: J.Kelly@xxxxxxxxxx

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