@@ -111,8 +111,11 @@ def query_object_maps(self, position, missions=__ALL_STRING,
111111 query_object_maps("265.05, 69.0", "Herschel")
112112 query_object_maps("265.05, 69.0", ["Herschel", "HST"])
113113 """
114- return self .query_region_maps (position , self .__ZERO_ARCMIN_STRING , missions ,
115- get_query_payload , cache )
114+ return self .query_region_maps (position = position ,
115+ radius = self .__ZERO_ARCMIN_STRING ,
116+ missions = missions ,
117+ get_query_payload = get_query_payload ,
118+ cache = cache )
116119
117120 def query_object_catalogs (self , position , catalogs = __ALL_STRING ,
118121 row_limit = DEFAULT_ROW_LIMIT ,
@@ -136,7 +139,7 @@ def query_object_catalogs(self, position, catalogs=__ALL_STRING,
136139 row_limit : int, optional
137140 Determines how many rows that will be fetched from the database
138141 for each mission. Can be -1 to select maximum (currently 100 000).
139- Defaults to 2000 .
142+ Defaults to 10000 .
140143 get_query_payload : bool, optional
141144 When set to True the method returns the HTTP request parameters.
142145 Defaults to False.
@@ -160,9 +163,12 @@ def query_object_catalogs(self, position, catalogs=__ALL_STRING,
160163 query_object_catalogs("265.05, 69.0", "Gaia DR1 TGA")
161164 query_object_catalogs("265.05, 69.0", ["Gaia DR1 TGA", "HSC"])
162165 """
163- return self .query_region_catalogs (position , self .__ZERO_ARCMIN_STRING ,
164- row_limit , catalogs ,
165- get_query_payload , cache )
166+ return self .query_region_catalogs (position = position ,
167+ radius = self .__ZERO_ARCMIN_STRING ,
168+ catalogs = catalogs ,
169+ row_limit = row_limit ,
170+ get_query_payload = get_query_payload ,
171+ cache = cache )
166172
167173 def query_region_maps (self , position , radius , missions = __ALL_STRING ,
168174 get_query_payload = False , cache = True ):
@@ -246,7 +252,7 @@ def query_region_catalogs(self, position, radius, catalogs=__ALL_STRING,
246252 row_limit : int, optional
247253 Determines how many rows that will be fetched from the database
248254 for each mission. Can be -1 to select maximum (currently 100 000).
249- Defaults to 2000 .
255+ Defaults to 10000 .
250256 get_query_payload : bool, optional
251257 When set to True the method returns the HTTP request parameters.
252258 Defaults to False.
@@ -325,7 +331,7 @@ def get_maps(self, query_table_list, missions=__ALL_STRING,
325331 filter is the key and the HDUList is the value.
326332 It is structured in a dictionary like this:
327333 dict: {
328- 'HERSCHEL': [{'70': [HDUList], ' 160': [HDUList]}, {'70': [HDUList], ' 160': [HDUList]}, ...],
334+ 'HERSCHEL': [{'70': [HDUList], '160': [HDUList]}, {'70': [HDUList], '160': [HDUList]}, ...],
329335 'HST':[[HDUList], HDUList], HDUList], HDUList], HDUList], ...],
330336 'XMM-EPIC' : [HDUList], HDUList], HDUList], HDUList], ...]
331337 ...
@@ -398,7 +404,7 @@ def get_images(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRIN
398404 filter is the key and the HDUList is the value.
399405 It is structured in a dictionary like this:
400406 dict: {
401- 'HERSCHEL': [{'70': [HDUList], ' 160': [HDUList]}, {'70': [HDUList], ' 160': [HDUList]}, ...],
407+ 'HERSCHEL': [{'70': [HDUList], '160': [HDUList]}, {'70': [HDUList], '160': [HDUList]}, ...],
402408 'HST':[[HDUList], HDUList], HDUList], HDUList], HDUList], ...],
403409 'XMM-EPIC' : [HDUList], HDUList], HDUList], HDUList], ...]
404410 ...
@@ -504,7 +510,7 @@ def _get_maps_for_mission(self, maps_table, mission, download_dir, cache):
504510 directory_path = mission_directory + "/"
505511 if (mission .lower () == self .__HERSCHEL_STRING ):
506512 herschel_filter = (maps_table [self .__FILTER_STRING ][index ]
507- .decode ('utf-8' ).split ("," ))
513+ .decode ('utf-8' ).split (", " ))
508514 maps .append (self ._get_herschel_observation (product_url ,
509515 directory_path ,
510516 herschel_filter ,
@@ -641,8 +647,8 @@ def _build_observation_query(self, coordinates, radius, json):
641647 area_or_point_string = "pos"
642648 else :
643649 area_or_point_string = "fov"
644- where_query = (" WHERE 1=CONTAINS(%s, CIRCLE('ICRS', %f, %f, %f));"
645- % (area_or_point_string , ra , dec , radiusDeg ))
650+ where_query = (" WHERE 1=INTERSECTS( CIRCLE('ICRS', %f, %f, %f), %s );"
651+ % (ra , dec , radiusDeg , area_or_point_string ))
646652 else :
647653 area_or_point_string = "fov"
648654 where_query = (" WHERE 1=CONTAINS(POINT('ICRS', %f, %f), %s);"
0 commit comments