Python Forum
Library (julian), lack of usage information
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Library (julian), lack of usage information
#13
Slight amendment of one of my previous posts. Cheers
# ------- jul1bis.py --------
import julian
import datetime
mjd = 58370.5084722222
dt = julian.from_jd(mjd, fmt='mjd')
print(dt)
#
mjd2 = julian.to_jd(dt + datetime.timedelta(hours=0), fmt='jd') - 2400000.5
print(mjd2)

# ------- OUTPUTS -----------
# C:\Training>python jul1bis.py
# 2018-09-09 12:12:12.000012
# 58370.50847222237
# My comments: line 8 been amended with (hours=0, scaletime of MJD),
# so the back calculated (mjd2) fully matches (mjd) of line 4
# -------------------------------------------------------------------
Reply


Messages In This Thread
RE: Library (julian), lack of usage information - by samsonite - Mar-04-2019, 06:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Questions regarding usage of pandas library Pala 5 2,107 Apr-26-2023, 10:21 PM
Last Post: deanhystad
  Lack of understanding "graphX, = ax.plot" easayed 1 2,793 Dec-21-2018, 11:08 PM
Last Post: micseydel
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 5,684 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020