Skip to content

Commit

Permalink
reformatted utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Athish Thiruvengadam committed Jul 31, 2024
1 parent 3129002 commit 984ca27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gcn_classic_to_json/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from astropy.time import Time
import numpy as np

# Zero point for Truncated Julian Day according to
# https://en.wikipedia.org/wiki/Julian_day.
TJD0 = (2440000, 0.5)


# Date must be in Truncated Julian Date format
# Time must be in Seconds of Day format
def tjd_to_jd(date, time):
return Time(date + TJD0[0], time / 8640000 + TJD0[1], format="jd").iso+"Z"
return Time(date + TJD0[0], time / 8640000 + TJD0[1], format="jd").iso + "Z"

0 comments on commit 984ca27

Please sign in to comment.