Skip to content

Commit c05ce70

Browse files
committed
resolving liens
1 parent ed1adc6 commit c05ce70

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

astroquery/jplhorizons/core.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
# 2. third party imports
99
from requests.exceptions import HTTPError
10+
from numpy import nan
11+
from numpy import isnan
12+
from numpy import ndarray
1013
from astropy.table import Table, Column
1114
from astropy.io import ascii
1215
from astropy.time import Time
1316
from astropy.utils.exceptions import AstropyDeprecationWarning
1417
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
1818

1919
# 3. local imports - use relative imports
2020
# commonly required local imports shown below as example
@@ -601,9 +601,7 @@ def ephemerides_async(self, *, airmass_lessthan=99,
601601
('EXTRA_PREC', {True: 'YES', False: 'NO'}[extra_precision])])
602602

603603
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))
607605
else:
608606
request_payload['CENTER'] = "'" + str(self.location) + "'"
609607

@@ -1047,10 +1045,7 @@ def vectors_async(self, *, get_query_payload=False,
10471045
if self.id is None:
10481046
raise ValueError("'id' parameter not set. Query aborted.")
10491047
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']}"
10541049
else:
10551050
commandline = str(self.id)
10561051
if self.location is None:
@@ -1075,12 +1070,7 @@ def vectors_async(self, *, get_query_payload=False,
10751070
commandline += ' CAP{:s};'.format(closest_apparition)
10761071
if no_fragments:
10771072
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
10841074
request_payload = OrderedDict([
10851075
('format', 'text'),
10861076
('EPHEM_TYPE', 'VECTORS'),
@@ -1236,9 +1226,7 @@ def _parse_result(self, response, verbose=None):
12361226
else:
12371227
headerline[3] = 'interfering_body'
12381228
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:'):
12421230
headerline[4] = 'nearside_flag'
12431231
headerline[5] = 'illumination_flag'
12441232
# read in elements header line

0 commit comments

Comments
 (0)