@@ -1045,7 +1045,7 @@ def vectors_async(self, *, get_query_payload=False,
1045
1045
if self .id is None :
1046
1046
raise ValueError ("'id' parameter not set. Query aborted." )
1047
1047
elif isinstance (self .id , dict ):
1048
- commandline = f "g:{ self . id [ ' lon' ] } ,{ self . id [ ' lat' ] } ,{ self . id [ ' elevation' ] } @{ self . id [ ' body' ] } "
1048
+ commandline = "g:{lon},{lat},{elevation}@{body}" . format ( ** self . id )
1049
1049
else :
1050
1050
commandline = str (self .id )
1051
1051
if self .location is None :
@@ -1144,7 +1144,7 @@ def vectors_async(self, *, get_query_payload=False,
1144
1144
@staticmethod
1145
1145
def _prep_loc_dict (loc_dict , attr_name ):
1146
1146
"""prepare coord specification dict for 'location' or 'id'"""
1147
- if {'lat' , 'lon' , 'elevation' } - set ( loc_dict .keys ()) != set ():
1147
+ if {'lat' , 'lon' , 'elevation' } - loc_dict .keys ():
1148
1148
raise ValueError (
1149
1149
f"dict values for '{ attr_name } ' must contain 'lat', 'lon', "
1150
1150
"'elevation' (and optionally 'body')"
@@ -1221,10 +1221,7 @@ def _parse_result(self, response, verbose=None):
1221
1221
"Date__(UT)__HR:MN" in line ):
1222
1222
headerline = str (line ).split (',' )
1223
1223
headerline [2 ] = 'solar_presence'
1224
- if 'Earth' in centername :
1225
- headerline [3 ] = 'lunar_presence'
1226
- else :
1227
- headerline [3 ] = 'interfering_body'
1224
+ headerline [3 ] = "lunar_presence" if "Earth" in centername else "interfering_body"
1228
1225
headerline [- 1 ] = '_dump'
1229
1226
if isinstance (self .id , dict ) or str (self .id ).startswith ('g:' ):
1230
1227
headerline [4 ] = 'nearside_flag'
0 commit comments