@@ -174,7 +174,7 @@ def ephemerides_async(self, airmass_lessthan=99,
174
174
closest_apparition = False , no_fragments = False ,
175
175
quantities = conf .eph_quantities ,
176
176
get_query_payload = False ,
177
- cache = True ,
177
+ get_raw_response = False , cache = True ,
178
178
extra_precision = False ):
179
179
"""
180
180
Query JPL Horizons for ephemerides.
@@ -478,6 +478,10 @@ def ephemerides_async(self, airmass_lessthan=99,
478
478
When set to `True` the method returns the HTTP request parameters as
479
479
a dict, default: False
480
480
481
+ get_raw_response : boolean, optional
482
+ Return raw data as obtained by JPL Horizons without parsing the data
483
+ into a table, default: False
484
+
481
485
extra_precision : boolean, optional
482
486
Enables extra precision in RA and DEC values; default: False
483
487
@@ -610,6 +614,10 @@ def ephemerides_async(self, airmass_lessthan=99,
610
614
if get_query_payload :
611
615
return request_payload
612
616
617
+ # set return_raw flag, if raw response desired
618
+ if get_raw_response :
619
+ self .return_raw = True
620
+
613
621
# query and parse
614
622
response = self ._request ('GET' , URL , params = request_payload ,
615
623
timeout = self .TIMEOUT , cache = cache )
@@ -629,7 +637,7 @@ def elements_async(self, get_query_payload=False,
629
637
refplane = 'ecliptic' ,
630
638
tp_type = 'absolute' ,
631
639
closest_apparition = False , no_fragments = False ,
632
- cache = True ):
640
+ get_raw_response = False , cache = True ):
633
641
"""
634
642
Query JPL Horizons for osculating orbital elements.
635
643
@@ -720,6 +728,10 @@ def elements_async(self, get_query_payload=False,
720
728
When set to ``True`` the method returns the HTTP request parameters
721
729
as a dict, default: False
722
730
731
+ get_raw_response: boolean, optional
732
+ Return raw data as obtained by JPL Horizons without parsing the data
733
+ into a table, default: False
734
+
723
735
724
736
Returns
725
737
-------
@@ -820,6 +832,10 @@ def elements_async(self, get_query_payload=False,
820
832
if get_query_payload :
821
833
return request_payload
822
834
835
+ # set return_raw flag, if raw response desired
836
+ if get_raw_response :
837
+ self .return_raw = True
838
+
823
839
# query and parse
824
840
response = self ._request ('GET' , URL , params = request_payload ,
825
841
timeout = self .TIMEOUT , cache = cache )
@@ -836,7 +852,7 @@ def elements_async(self, get_query_payload=False,
836
852
837
853
def vectors_async (self , get_query_payload = False ,
838
854
closest_apparition = False , no_fragments = False ,
839
- cache = True ,
855
+ get_raw_response = False , cache = True ,
840
856
refplane = 'ecliptic' , aberrations = 'geometric' ,
841
857
delta_T = False ,):
842
858
"""
@@ -919,6 +935,10 @@ def vectors_async(self, get_query_payload=False,
919
935
When set to `True` the method returns the HTTP request parameters as
920
936
a dict, default: False
921
937
938
+ get_raw_response: boolean, optional
939
+ Return raw data as obtained by JPL Horizons without parsing the data
940
+ into a table, default: False
941
+
922
942
refplane : string
923
943
Reference plane for all output quantities: ``'ecliptic'`` (ecliptic
924
944
and mean equinox of reference epoch), ``'earth'`` (Earth mean
@@ -1058,6 +1078,10 @@ def vectors_async(self, get_query_payload=False,
1058
1078
if get_query_payload :
1059
1079
return request_payload
1060
1080
1081
+ # set return_raw flag, if raw response desired
1082
+ if get_raw_response :
1083
+ self .return_raw = True
1084
+
1061
1085
# query and parse
1062
1086
response = self ._request ('GET' , URL , params = request_payload ,
1063
1087
timeout = self .TIMEOUT , cache = cache )
0 commit comments