7
7
8
8
# 2. third party imports
9
9
from requests .exceptions import HTTPError
10
+ from numpy import nan
11
+ from numpy import isnan
12
+ from numpy import ndarray
10
13
from astropy .table import Table , Column
11
14
from astropy .io import ascii
12
15
from astropy .time import Time
13
16
from astropy .utils .exceptions import AstropyDeprecationWarning
14
17
from astropy .utils .decorators import deprecated_renamed_argument , deprecated_attribute
15
- from numpy import nan
16
- from numpy import isnan
17
- from numpy import ndarray
18
18
19
19
# 3. local imports - use relative imports
20
20
# commonly required local imports shown below as example
@@ -601,9 +601,7 @@ def ephemerides_async(self, *, airmass_lessthan=99,
601
601
('EXTRA_PREC' , {True : 'YES' , False : 'NO' }[extra_precision ])])
602
602
603
603
if isinstance (self .location , dict ):
604
- request_payload = dict (
605
- ** request_payload , ** self ._location_to_params (self .location )
606
- )
604
+ request_payload = dict (** request_payload , ** self ._location_to_params (self .location ))
607
605
else :
608
606
request_payload ['CENTER' ] = "'" + str (self .location ) + "'"
609
607
@@ -1047,10 +1045,7 @@ def vectors_async(self, *, get_query_payload=False,
1047
1045
if self .id is None :
1048
1046
raise ValueError ("'id' parameter not set. Query aborted." )
1049
1047
elif isinstance (self .id , dict ):
1050
- commandline = (
1051
- f"g:{ self .id ['lon' ]} ,{ self .id ['lat' ]} ,"
1052
- f"{ self .id ['elevation' ]} @{ self .id ['body' ]} "
1053
- )
1048
+ commandline = f"g:{ self .id ['lon' ]} ,{ self .id ['lat' ]} ,{ self .id ['elevation' ]} @{ self .id ['body' ]} "
1054
1049
else :
1055
1050
commandline = str (self .id )
1056
1051
if self .location is None :
@@ -1075,12 +1070,7 @@ def vectors_async(self, *, get_query_payload=False,
1075
1070
commandline += ' CAP{:s};' .format (closest_apparition )
1076
1071
if no_fragments :
1077
1072
commandline += ' NOFRAG;'
1078
- #
1079
- # if isinstance(self.location, dict):
1080
- # raise ValueError(('cannot use topographic position in state'
1081
- # 'vectors query'))
1082
-
1083
- # configure request_payload for ephemerides query
1073
+ # configure request_payload for vectors query
1084
1074
request_payload = OrderedDict ([
1085
1075
('format' , 'text' ),
1086
1076
('EPHEM_TYPE' , 'VECTORS' ),
@@ -1236,9 +1226,7 @@ def _parse_result(self, response, verbose=None):
1236
1226
else :
1237
1227
headerline [3 ] = 'interfering_body'
1238
1228
headerline [- 1 ] = '_dump'
1239
- if (
1240
- isinstance (self .id , dict ) or str (self .id ).startswith ('g:' )
1241
- ):
1229
+ if isinstance (self .id , dict ) or str (self .id ).startswith ('g:' ):
1242
1230
headerline [4 ] = 'nearside_flag'
1243
1231
headerline [5 ] = 'illumination_flag'
1244
1232
# read in elements header line
0 commit comments