[kepler-dev] [Bug 3203] New: - Add dateType

bugzilla-daemon@ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Wed Apr 2 11:13:46 PDT 2008


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3203

           Summary: Add dateType
           Product: Kepler
           Version: 1.0.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: REAP
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: barseghian at nceas.ucsb.edu
        ReportedBy: barseghian at nceas.ucsb.edu
         QAContact: kepler-dev at ecoinformatics.org


Add a date type to Kepler; being able to pass date tokens between a variety of
actors would be nice. My original motivation was to feed them to plot and other
display actors.

Here a response from Christopher Brooks Sep 24,2007 on the original
dateType/plotting topic:
--------
Hi Derik,
You could use the ptolemy.data.ObjectToken to encapsulate a Date.
See ptolemy.actor.lib.security.KeyToken for an example of a Token.

In the type hierarchy, the Date type would be convertable to String,
but probably nothing would be convertable to Date.

Adding date support to Ptplot would appear to be easy, but doing a
complete job would be very difficult.

The easy part is that one can easily specify ticks that consist of
a label and value.  Thus, you could specify "January 1, 1970 00:00:00"
as 0 and then specify times in seconds since then. 

See
http://ptolemy.eecs.berkeley.edu/java/ptplot5.6/ptolemy/plot/demo/Marks.htm
for an example that uses ticks.

The hard part is: given a set of arbitrary Java Dates, label the axes
nicely, where nicely is defined as:
 - text does not overlap.  
 - text displays meaningful values. 
     For example, if we are just looking at 15 seconds, do we
     care about the day, month and year.

The code that labels the axes has lots of art in it.  That code was
written a very long time ago - before many of the layout managers were
present.

There is also this entire question of the provenance of data.  Perhaps
we would like to be able to attach metadata, such as the date, to
data points.  The tricky part here would be to not make the Token
classes too large.  Also, I'm not sure what you would do with the
metadata.

If you have data streams that have irregular time stamps, then you
might want to look at timed domains such Discrete Event.  It is
possible to use SDF and have each iteration represent a tick of the
clock, but if you have data streams that have times associated with
them, then SDF is probably not what you want.

_Christopher

--------


More information about the Kepler-dev mailing list