comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » label_date precision problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
label_date precision problem [message #10025] Wed, 24 September 1997 00:00
mh is currently offline  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)&nbsp;axis.&nbsp;
In order
<BR>to use label_date, I&nbsp;am converting my time axis into absolute
Julian Day&nbsp; -
<BR>a real number when you convert the time as well.&nbsp; For example,
2450717.5
<BR>would be 12:00 on 9/25/1997.&nbsp; If I&nbsp;want 12:15, though, I&nbsp;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.&nbsp; 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.&nbsp; 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?&nbsp; Or another easy
way of
<BR>doing a time axis in IDL?

<P>Please respond via email.

<P>Thanks,
<BR>Mike
<PRE>________________________________________________________
Michael Hamilton&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp; mikeh@pmel.noaa.gov
NOAA/PMEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phone:&nbsp; 206-526-4810
7600 Sand Point Way NE
Seattle, WA&nbsp; 98115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp; fax:&nbsp;&nbsp;&nbsp; 206-526-6744
--------------------------------------------------------
Mr. Bingley...was lively and unreserved, danced every dance,
was angry that the ball closed so early, and talked of&nbsp;
giving one himself at Netherfield. Such amiable qualities&nbsp;
must speak for themselves.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; From "Pride and Prejudice" by Jane Austen
________________________________________________________</PRE >
&nbsp;</HTML>

--------------61511AEF1A9361869068BFE2--
[Message index]
 
Read Message
Previous Topic: Widget Flakiness
Next Topic: IDL (Interactive Data Language) FAQ

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:38:21 PDT 2025

Total time taken to generate the page: 0.72453 seconds