Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions K2ephem/K2ephem.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,20 @@ def jpl2pandas(fileobj):
" Check their response above to understand why.")
raise EphemFailure()
csv.seek(0)

df = pd.read_csv(csv)
# Simplify column names for user-friendlyness;
# 'APmag' is the apparent magnitude which is returned for asteroids;
# 'Tmag' is the total magnitude returned for comets:
df = df.rename(columns={' Date__(UT)__HR:MN':'date',
' ':'junk',
' .1':'junk',
' ':'junk',
' R.A._(ICRF)':'ra',
' DEC_(ICRF)':'dec',
' dRA*cosD':'dra',
' d(DEC)/dt':'ddec',
' APmag':'mag',
' S-brt':'junk'})
' APmag':'mag',
' S-brt':'junk'})

# Add the angular motion column in units arcsec/h
cosdec = np.cos(np.radians(df['dec']))
Expand Down