Skip to content

Commit

Permalink
updated MPC API error handling; spacecraft ADES codes; stn covariance…
Browse files Browse the repository at this point in the history
… ADES fields
  • Loading branch information
rahil-makadia committed Dec 20, 2024
1 parent ec2e2ad commit c27907c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions grss/fit/fit_ades.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
'rmsDelay': 'float', 'rmsDoppler': 'float', 'com': 'Int64', 'frq': 'float',
'raStar': 'float', 'decStar': 'float', 'deltaRA': 'float', 'deltaDec': 'float',
'sys': 'str', 'ctr': 'Int64', 'pos1': 'float', 'pos2': 'float', 'pos3': 'float',
'vel1': 'float', 'vel2': 'float', 'vel3': 'float',
'vel1': 'float', 'vel2': 'float', 'vel3': 'float', 'posCov11': 'float', 'posCov12': 'float',
'posCov13': 'float', 'posCov22': 'float', 'posCov23': 'float', 'posCov33': 'float'
}
ades_add_columns = {
'resRA': 'float', 'resDec': 'float', 'selAst': 'str',
Expand Down Expand Up @@ -110,7 +111,7 @@
special_codes = {
'gaia': {'258'},
'occultation': {'275'},
'spacecraft': {'S/C', '245', '249', '250', '274', 'C49', 'C50', 'C51',
'spacecraft': {'S/C', 'S_C', '245', '249', '250', '274', 'C49', 'C50', 'C51',
'C52', 'C53', 'C54', 'C55', 'C56', 'C57', 'C59', },
'roving': {'247', '270'},
}
4 changes: 3 additions & 1 deletion grss/fit/fit_optical.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def get_mpc_raw_data(tdes):
if response.ok:
obs_data = response.json()[0]["XML"]
else:
print("Error getting MPC XML data: ", response.status_code, response.content)
print(f"Error {response.status_code}:")
print(response.content.decode(encoding='utf-8'))
raise ValueError("Error getting MPC XML data.")
return StringIO(obs_data)

def _ades_mode_check(df):
Expand Down

0 comments on commit c27907c

Please sign in to comment.