Tech Note: Mira's Heliocentric Julian Date Calculation

Copyright © 2009 Mirametrics, Inc., All Rights Reserved.

Overview

Heliocentric Julian Date ("HJD") is a standard method of time measurement referenced to the Sun's position which corrects for the difference in light travel time between the object and the location of the Earth in its orbit, and the light travel time from the object to the fixed Sun. This removes the bias attributable to the object's direction in space, the observing date, and time of day. HJD is used in several areas of astronomy that involve precision timing. The Mira platforms targeted at astronomy and space sciences include this feature in the photometry measurement module.

Determining the HJD involves a complex calculation. For testing, we compared the results of Mira's calculator with with the precision HLD calculator published by Dr. Dan Bruton of Steven F. Austin State University ("SFASU"). To evaluate, several dates and times were chosen for the field of view of the variable star BL Cam (first 5 measurements) and then for an arbitrary selection of celestial coordinates and time. Sky position is measured in units of Right Ascension ("RA") and Declination ("Dec"). The results listed below give the calculated HJD by the two methods and the difference in the sense Mira minus SFASU, all in units of days. Based on 14 tests, the average difference is 10-7 day, or about 0.01 seconds, with a standard deviation of 0.57 seconds (1). The two methods use completely independent code and it is not known which one is more "accurate". Let it suffice to say that the two methods have a 1-sigma consistency of 0.5 second of time over different directions in space, different times of day, and different days of the year. Mira Pro x64 and Mira Pro UE also provide access to Mira's HJD and JD calculations in scripts. A sample script included in the Mira distribution is listed below the table.

RA DEC DATE GMT HJD (Mira) HJD (SFASU) Mira - SFASU
06h 17m 43s 63° 35' 06" 1999 06 17 01 01 59 0.5432640 0.5432654 -0.0000014 day
06h 17m 43s 63° 35' 06" 2008 06 17 01 01 59 0.5432707 0.5432711 -0.0000004
06h 17m 43s 63° 35' 06" 2008 04 17 01 01 59 0.5427403 0.5427400 +0.0000003
06h 17m 43s 63° 35' 06" 2008 10 17 01 01 59 0.5433734 0.5433738 -0.0000004
06h 17m 43s 63° 35' 06" 2008 07 17 01 01 59 0.5434787 0.5434793 -0.0000006
6h 20° 2008 12 18 05 00 00 0.7140888 0.7140880 +0.0000008
10h 20° 2008 12 18 05 00 00 0.7113302 0.7113178 +0.0000124
18h 20° 2008 12 18 05 00 00 0.7041469 0.7041467 +0.0000002
18h 20° 2008 09 18 05 00 00 0.7086511 0.7086597 -0.0000086
18h 20° 2008 4 18 05 00 00 0.7103368 0.7103298 +0.0000070
18h -30° 2008 1 18 05 00 00 0.7032430 0.7032371 +0.0000059
8h 20° 2009 1 22 05 00 00 0.7140924 0.7140935 -0.0000011
16h 50° 2008 5 18 05 00 00 0.7103320 0.7103347 -0.0000027
16h 10° 2008 08 18 07 00 00 0.7916392 0.7916491 -0.0000099
          Average: 0.0000001 day
Std Deviation: 0.0000057 day

 

Sample Script

The script below is included with Mira Pro x64 and Mira Pro UE to show using Mira's JD (Julian Date), MJD (Modified Julian Date), and HJD (Heliocentric Julian Date) functions in a script. Usually one would use these functions in a script for doing astronomical photometry. Here, the script sets values for the date, time, and celestial coordinates (RA, Dec) in as text strings. Then it calculates various types of Julian Date, including JD, MJD, and HJD. Other functions are then used to test the results by inverting the JD values to get the corresponding date and time, which should equal the starting values. Finally, the resulting values are printed in a Mira text editor window using the C-like Printf() function. Text colors are the default colors used by the Mira script editor; for example, green "--" characters precede comments.

--//////////////////////////////////////////////////////////////////////////////
-- Sample script shows how to use JD and HJD functions for Julian Date


sDate =
"2009 1 22"    -- date is GMT
sTime =
"01 01 59"    -- time is GMT
sRa =
"5 00 02.56"     -- Right ascension at J2000 equinox
sDec =
"10 20 30.5"     -- Declination at J2000 equinox

-- calculate the Julian Date Values
JD = CalcJD( sDate, sTime )
    -- ordinary (geocentric) JD
HJD = CalcHJD( sDate, sTime, sRa, sDec )
    -- Heliocentric JD
MJD = CalcMJD( JD )    
-- Modified JD for geocentric JD

-- Invert the calculation to test functions that return date & time from JD.
-- All 6 values returned by ParseJD are used:
nYr, nMo, nDay, nHr, nMin, nSec = ParseJD( JD )
sDate, sTime = JDtoDateTime( JD )

-- print results
Printf(
"\n---------------------\n")
Printf(
"Input Date= '%s', GMT= '%s'\n", sDate, sTime )
Printf(
"Input (J2000) RA= '%s', Dec= '%s'\n", sRa, sDec )
Printf(
"\n")
Printf(
"Caculated JD = %.7lf\n", JD )
Printf(
"Caculated MJD= %.7lf\n", MJD )
Printf(
"Caculated HJD= %.7lf\n", HJD )
Printf(
"\n")
Printf(
"Converting from the calculated JD back to Date, Time:\n")
Printf(
"Y M D = %d %d %d, H M S = %d %d %.4lf\n", nYr, nMo, nDay, nHr, nMin, nSec )
Printf(
"Date, Time = \"%s\" at \"%s\"\n", sDate, sTime )

 


Learn More

Name  *

E-mail  *

Item of Interest

Organization

Telephone

Application

Comments

Verification *