Message Boards Message Boards

0
|
7446 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

TimeSeries interpolation doesn't know about units?

Lets use air pressure as an example: (Mathematica Windows 10.4.1):

ts = AirPressureData["Perth", {DateObject[{2014, 6, 1}, TimeObject[{1, 0}, TimeZone -> 8], TimeZone -> 8], 
   DateObject[{2016, 5, 31}, TimeObject[{23, 0}, TimeZone -> 8], TimeZone -> 8]}]

ts["FirstValue"]
(*Quantity[1018.5, "Millibars"]*)

(no need to have the TimeZone, etc... this was just a direct copy-past of my case...)

Now, lets ask for the pressure at that same first date:

ts[ts["FirstDate"]]
(*$Failed[3610551600]*)

or

ts["PathFunction"][ts["FirstTime"]]
(*TemporalData::pfnmthd: Path function failed to be created with the current setting of ResamplingMethod option. >>*)

Now, lets strip this TimeSeries, from its units:

tsNoUnits = TimeSeriesMap[QuantityMagnitude, ts];

tsNoUnits["FirstValue"]
(*1016.2*)

tsNoUnits[tsNoUnits["FirstDate"]]
(*1016.2*)

tsNoUnits["PathFunction"][tsNoUnits["FirstTime"]]
(*1016.2*)

Without units everything works great.

Is this a well known unfinished functionality, or is this a bug that should be reported?

POSTED BY: Pedro Fonseca

Thanks for the post. Still doesn't work.

POSTED BY: Andrew Krock
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract