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

Home » Public Forums » archive » TIME2JD
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
TIME2JD [message #92684] Mon, 08 February 2016 02:03 Go to next message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
Hello everyone,
I have a time t='18:57:06.65' how can I use it to calculate JD.
i don't have any information about date. i used anytim2jd.pro but it is saying wrong format of time.
Kindly anyone suggest me with format or with another .pro file.
Re: TIME2JD [message #92685 is a reply to message #92684] Mon, 08 February 2016 02:44 Go to previous messageGo to next message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
You can't get a JD without knowing which date you are referring to. This must be the problem.

cheers,
Greg
Re: TIME2JD [message #92686 is a reply to message #92684] Mon, 08 February 2016 03:00 Go to previous messageGo to next message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
Even if I know UT('18:57:06.65' ), I can't get JD or MJD using some routines?
Re: TIME2JD [message #92687 is a reply to message #92686] Mon, 08 February 2016 03:46 Go to previous messageGo to next message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
If you don't care about the day (e.g. if all your times come from the same day), then pick an arbitrary month, day, year, and use this:

Result = JULDAY(Month, Day, Year, Hour, Minute, Second)
Re: TIME2JD [message #92689 is a reply to message #92687] Mon, 08 February 2016 09:41 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/8/16 4:46 AM, greg.addr@googlemail.com wrote:
>
> If you don't care about the day (e.g. if all your times come from the
> same day), then pick an arbitrary month, day, year, and use this:
>
> Result = JULDAY(Month, Day, Year, Hour, Minute, Second)
>

Just to be clear about this, you could calculate a Julian day given an
arbitrary date, but then only the fractional part of that Julian day
would be useful (and you would probably want to subtract 0.5 as well).

I'm not sure why any of that would be useful though. The Julian day is a
number of days from a specific time in the past. Are you just trying to
calculate the fractional day for a given time?

In any case, for a basic explanation, check the IDL documentation for
JULDAY and Wikipedia:

https://en.wikipedia.org/wiki/Julian_day

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Re: TIME2JD [message #92693 is a reply to message #92684] Mon, 08 February 2016 21:19 Go to previous messageGo to next message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
Yeah Mike,
I am actually interested in the fractional part. I am dealing with fits file of the same date having different UT, actually I want to extract UT of each file and calculate JD, which I was expecting to be different for each files(talking about fractional part). But all the routines in IDL (including julday.pro) are giving me JD upto one decimal place which is almost similar for each file.
Can any one suggest me any routine which can provide me JD upto high precision (like upto 4-5 decimal place)
Also I want to ask can anyone tell how to deal with float variables in unix shell scripts???
Re: TIME2JD [message #92694 is a reply to message #92693] Mon, 08 February 2016 21:31 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Monday, February 8, 2016 at 10:19:56 PM UTC-7, Sapna Mishra wrote:
> Yeah Mike,
> I am actually interested in the fractional part. I am dealing with fits file of the same date having different UT, actually I want to extract UT of each file and calculate JD, which I was expecting to be different for each files(talking about fractional part). But all the routines in IDL (including julday.pro) are giving me JD upto one decimal place which is almost similar for each file.
> Can any one suggest me any routine which can provide me JD upto high precision (like upto 4-5 decimal place)
> Also I want to ask can anyone tell how to deal with float variables in unix shell scripts???

Are you confusing the printed output format with the actual precision of the data? The JULDAY() function returns a double-precision number. If you're simply looking at the output from PRINT, that's only going to display 8 digits. But if you use a better FORMAT statement with PRINT, or you use implied print, you'll see many more digits.

IDL> print, julday()
2457427.4
IDL> help, julday()
<Expression> DOUBLE = 2457427.4
IDL> julday()
2457427.4363425933
And a little later in elapsed time...
IDL> print, julday(), format = '(d)'
2457427.4374884265000000

Jim P.
Re: TIME2JD [message #92695 is a reply to message #92684] Tue, 09 February 2016 02:26 Go to previous message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
It worked with format='(d)'....Thanks Jim.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Removing lib/obsolete directory from one's !PATH
Next Topic: AIRMASS

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

Current Time: Wed Oct 08 09:11:58 PDT 2025

Total time taken to generate the page: 0.00469 seconds