@@ -213,7 +213,7 @@ def get_token(self, *args, **kwargs):
213213 else :
214214 raise Exception ("Unknown MAST Auth mode %s" % self ._auth_mode )
215215
216- def session_info (self , * args , ** kwargs ):
216+ def session_info (self , * args , ** kwargs ): # pragma: no cover
217217 """
218218 Displays information about current MAST user, and returns user info dictionary.
219219
@@ -487,29 +487,32 @@ def _get_col_config(self, service, fetch_name=None):
487487 "Content-type" : "application/x-www-form-urlencoded" ,
488488 "Accept" : "text/plain" }
489489
490- if "Catalogs.All" in fetch_name : # Using the histogram properties instead of columngs config
490+ response = self ._request ("POST" , self ._COLUMNS_CONFIG_URL ,
491+ data = ("colConfigId=" + fetch_name ), headers = headers )
491492
492- mashupRequest = {'service' : fetch_name , 'params' : {}, 'format' : 'extjs' }
493+ self ._column_configs [service ] = response [0 ].json ()
494+
495+ more = False # for some catalogs this is not enough information
496+ if "tess" in fetch_name .lower ():
497+ all_name = "Mast.Catalogs.All.Tic"
498+ more = True
499+ elif "dd." in fetch_name .lower ():
500+ all_name = "Mast.Catalogs.All.DiskDetective"
501+ more = True
502+
503+ if more :
504+ mashupRequest = {'service' : all_name , 'params' : {}, 'format' : 'extjs' }
493505 reqString = _prepare_service_request_string (mashupRequest )
494506 response = self ._request ("POST" , self ._MAST_REQUEST_URL , data = reqString , headers = headers )
495507 jsonResponse = response [0 ].json ()
496508
497- # When using the histogram data to fill to col_config some processing must be done
498- col_config = jsonResponse [ 'data' ][ 'Tables' ][ 0 ][ ' ExtendedProperties' ]['discreteHistogram' ]
499- col_config . update (jsonResponse ['data' ]['Tables' ][0 ][ 'ExtendedProperties' ][ 'continuousHistogram' ])
500-
501- for col , val in col_config .items ():
509+ self . _column_configs [ service ]. update ( jsonResponse [ ' data' ][ 'Tables' ][ 0 ]
510+ [ ' ExtendedProperties' ]['discreteHistogram' ])
511+ self . _column_configs [ service ]. update (jsonResponse ['data' ]['Tables' ][0 ]
512+ [ 'ExtendedProperties' ][ 'continuousHistogram' ])
513+ for col , val in self . _column_configs [ service ] .items ():
502514 val .pop ('hist' , None ) # don't want to save all this unecessary data
503515
504- self ._column_configs [service ] = col_config
505-
506- else :
507-
508- response = self ._request ("POST" , self ._COLUMNS_CONFIG_URL ,
509- data = ("colConfigId=" + fetch_name ), headers = headers )
510-
511- self ._column_configs [service ] = response [0 ].json ()
512-
513516 def _parse_result (self , responses , verbose = False ):
514517 """
515518 Parse the results of a list of ``requests.Response`` objects and returns an `astropy.table.Table` of results.
@@ -1956,17 +1959,17 @@ def query_criteria_async(self, catalog, pagesize=None, page=None, **criteria):
19561959 radius = criteria .pop ('radius' , 0.2 * u .deg )
19571960
19581961 # Build the mashup filter object
1959- if catalog == "Tic " :
1962+ if catalog . lower () == "tic " :
19601963 service = "Mast.Catalogs.Filtered.Tic"
19611964 if coordinates or objectname :
19621965 service += ".Position"
1963- mashupFilters = self ._build_filter_set ("Mast.Catalogs.All.Tic " , service , ** criteria )
1966+ mashupFilters = self ._build_filter_set ("Mast.Catalogs.Tess.Cone " , service , ** criteria )
19641967
1965- elif catalog == "DiskDetective " :
1968+ elif catalog . lower () == "diskdetective " :
19661969 service = "Mast.Catalogs.Filtered.DiskDetective"
19671970 if coordinates or objectname :
19681971 service += ".Position"
1969- mashupFilters = self ._build_filter_set ("Mast.Catalogs.All.DiskDetective " , service , ** criteria )
1972+ mashupFilters = self ._build_filter_set ("Mast.Catalogs.Dd.Cone " , service , ** criteria )
19701973
19711974 else :
19721975 raise InvalidQueryError ("Criteria query not availible for {}" .format (catalog ))
@@ -2000,7 +2003,7 @@ def query_criteria_async(self, catalog, pagesize=None, page=None, **criteria):
20002003
20012004 # TIC needs columns specified
20022005 if catalog == "Tic" :
2003- params ["columns" ] = "c. *"
2006+ params ["columns" ] = "*"
20042007
20052008 return self .service_request_async (service , params , pagesize = pagesize , page = page )
20062009
0 commit comments