Skip to content

Instantly share code, notes, and snippets.

@MarcvdSluys
Created April 19, 2020 08:24
Show Gist options
  • Save MarcvdSluys/d35e317441ed21b6fbc31018752e527a to your computer and use it in GitHub Desktop.
Save MarcvdSluys/d35e317441ed21b6fbc31018752e527a to your computer and use it in GitHub Desktop.
HistAstro/Ptolemaios: loop over dates
# MvdS: use a loop:
year = [-103,-102,-101,-100, -99, -98, -97, -96, -94, -93, -92]
month = [ 5, 6, 7, 8, 9,10,11,12, 1, 2, 3]
day = [ 2, 7,13,18,24,28,27,27,26,26,30]
Mod = np.zeros(len(year)) # Create array with zeros to collect modern positions
for iDat in range(len(year)):
JD = julianDay(year[iDat],month[iDat],day[iDat])
Lpl,Bpl,Rpl = computeLBR(JUP,JD)
Lea,Bea,Rea = computeLBR(EAR,JD)
l,b,r = hc2gc(Lpl,Bpl,Rpl,Lea,Bea,Rea)
Mod[iDat] = (l*r2d) % 360
print(Mod[iDat])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment