Re: VisAD and Time-series data

Hi Eric,
 
> Has anyone used the VisAd classes for displaying simple time-series data? If
> so I'd appreciate a pointer to a simple example (and maybe a comment or two
> on how to format the data for VisAD injest) . Just to be clear I'm looking
> to plot say temp vs time etc for a group of stations. I also have gridded
> data types so I know I can already make use of VisAd for that part of the
> equation.
 
I've done a few things with time series of images, but not data like
you describe.  Hopefully someone who has will respond.
 
There are many possibilities.
 
1. You could organize your data as a FieldImpl with the MathType:
 
  (station_index -> (lat, lon, (time -> temperature)))
 
and display it with the mappings:
 
  lat -> YAxis
  lon -> XAxis
  time -> ZAxis
  temperature -> ZAxisOffset
  temperature -> RGB
 
If your stations aren't too dense and you set the right values in a
call to setRange on the mapping to ZAxisOffset, you may get a sort of
2-D field of little time series.
 
2. If you want to select one station's time series at a time, then
display the FieldImpl in two Displays.  One with the mappings:
 
  lat -> YAxis
  lon -> XAxis
 
the second with the mappings:
 
  lat -> SelectRange
  lon -> SelectRange
  time -> XAxis
  temperature -> YAxis
 
Then create a custom cursor in the first Display that you use to
select a station, and use the selection to set narrow ranges in lat
and lon to select just the time series for that station.  A little
tricky perhaps.
 
3. Or you could create some other mechanism for selecting stations,
then call getSample() on the FieldImpl with MathType:
 
  (station_index -> (lat, lon, (time -> temperature)))
 
to get a station data object with MathType:
 
  (lat, lon, (time -> temperature)
 
and just Display it with the mappings:
 
  time -> XAxis
  temperature -> YAxis
 
If this seems confusing, please feel free to ask for clarification.
 
> #2) In trying to run "VerySimple" I get the following error. I've got the
> spreadsheet working fine (Implying VisAd Classes are located) , and I
> believe all my CLASSPATH variables are set up ok. I'm running NT 4.0,java
> version "1.2"
> Classic VM (build JDK-1.2-V, native threads)
>
> D:\JavaCode\misc\VisAD\visad\examples>I like VisAD am not familiar with the
> "promiscuous" Unit but would be willing to learn ;).
 
The PromiscuousUnit exists for constants like Real(1.0) that need to be
arithmetically compatible within any Unit.  Note that Unit = null means
something different: that the value has no Unit is not compatible with
non-null Units.
 
> D:\JavaCode\misc\VisAD\visad\examples>java -ms64m VerySimple
> Couldn't decode attribute y:units="promiscuous": Unit not in database
> Couldn't decode attribute x:units="promiscuous": Unit not in database
> Exception in thread "main" java.lang.NullPointerException
>         at visad.util.DataUtility.makeSimpleDisplay(Compiled Code)
>         at VerySimple.main(VerySimple.java:24)
 
This is puzzling.  When I run 'java -ms64m VerySimple' I get:
 
  Incompatible initial and maximum heap sizes specified:
 
      initial size: 67108864 bytes, maximum size: 25165824 bytes
 
  The initial heap size must be less than or equal to the maximum heap size.
  The default initial and maximum heap sizes are 8388608 and 25165824 bytes.
  Could not create the Java virtual machine.
 
Please try running 'java VerySimple' (and please make sure you're in
the examples directory).  If that still gives the NullPointerException,
then please run:
 
  jdb VerySimple
  Initializing jdb...
  0xc6:class(VerySimple)
  > run VerySimple
 
and send me the stack dump from that, which will include line numbers
to help me figure it out.
 
Thanks,
Bill
 
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
whibbard@xxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html
 

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