label_date precision problem [message #10025] |
Wed, 24 September 1997 00:00 |
mh
Messages: 1 Registered: September 1997
|
Junior Member |
|
|
--------------61511AEF1A9361869068BFE2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello All,
I've got some timeseries data every 15 minutes for a period of a
couple of
days, and I'd like to use the label_date routine to do the time
(x) axis. In order
to use label_date, I am converting my time axis into absolute Julian
Day -
a real number when you convert the time as well. For example,
2450717.5
would be 12:00 on 9/25/1997. If I want 12:15, though, I get
2450717.5104.
But, it appears IDL isn't maintaining the precision of a double when I
plot, and
the .5104 is getting truncated to .5. This makes for an ugly plot,
with 4 or 5
y-values collapsing onto one x-value.
Right now, I'm working around it by pretending I'm in year -4710,
which is
basically the start year for -4713 (1/1/-4713 = Julian Day 1) in order
to keep
enough precision to get down to hours. It works, but, it's a cludge,
and requires
some thinking around leap years.
Anybody have a suggestion how to make this work? Or another easy way
of
doing a time axis in IDL?
Please respond via email.
Thanks,
Mike
________________________________________________________
Michael Hamilton mikeh@pmel.noaa.gov
NOAA/PMEL phone: 206-526-4810
7600 Sand Point Way NE
Seattle, WA 98115 fax: 206-526-6744
--------------------------------------------------------
Mr. Bingley...was lively and unreserved, danced every dance,
was angry that the ball closed so early, and talked of
giving one himself at Netherfield. Such amiable qualities
must speak for themselves.
From "Pride and Prejudice" by Jane Austen
________________________________________________________
--------------61511AEF1A9361869068BFE2
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<P>Hello All,
<P>I've got some timeseries data every 15 minutes for a period of a couple
of
<BR>days, and I'd like to use the label_date routine to do the time (x) axis.
In order
<BR>to use label_date, I am converting my time axis into absolute
Julian Day -
<BR>a real number when you convert the time as well. For example,
2450717.5
<BR>would be 12:00 on 9/25/1997. If I want 12:15, though, I get
2450717.5104.
<BR>But, it appears IDL isn't maintaining the precision of a double when
I plot, and
<BR>the .5104 is getting truncated to .5. This makes for an ugly
plot, with 4 or 5
<BR>y-values collapsing onto one x-value.
<P>Right now, I'm working around it by pretending I'm in year -4710, which
is
<BR>basically the start year for -4713 (1/1/-4713 = Julian Day 1) in order
to keep
<BR>enough precision to get down to hours. It works, but, it's a
cludge, and requires
<BR>some thinking around leap years.
<P>Anybody have a suggestion how to make this work? Or another easy
way of
<BR>doing a time axis in IDL?
<P>Please respond via email.
<P>Thanks,
<BR>Mike
<PRE>________________________________________________________
Michael Hamilton &a mp;nbsp; &a mp;nbsp; mikeh@pmel.noaa.gov
NOAA/PMEL & amp;nbsp; & amp;nbsp; & amp;nbsp; phone: 206-526-4810
7600 Sand Point Way NE
Seattle, WA 98115 & nbsp; & nbsp; fax: 206-526-6744
--------------------------------------------------------
Mr. Bingley...was lively and unreserved, danced every dance,
was angry that the ball closed so early, and talked of
giving one himself at Netherfield. Such amiable qualities
must speak for themselves.
From "Pride and Prejudice" by Jane Austen
________________________________________________________</PRE >
</HTML>
--------------61511AEF1A9361869068BFE2--
|
|
|