astroquery/mast/missions.py
def query_criteria_async(self, *, coordinates=None, objectname=None, radius=3*u.arcmin,
                             limit=5000, offset=0, select_cols=[], **criteria):
        """
        Given a set of search criteria, returns a list of mission metadata.

        Parameters
        ----------
        coordinates : str or `~astropy.coordinates` object
            The target around which to search. It may be specified as a
            string or as the appropriate `~astropy.coordinates` object.
        objectname : str
            The name of the target around which to search.
        radius : str or `~astropy.units.Quantity` object, optional
            Default 3 degrees.
            The string must be parsable by `~astropy.coordinates.Angle`. The
            appropriate `~astropy.units.Quantity` object from
            `~astropy.units` may also be used. Defaults to 3 arcminutes.
        limit : int
            Optional and default is 5000.
            the maximun number of dataset IDs in the results.
        offset : int
            Optional and default is 0.
            the number of records you wish to skip before selecting records.
        select_cols: list
            names of columns that will be included in the astropy table
        **criteria
            Criteria to apply. At least one non-positional criteria must be supplied.
            Valid criteria are coordinates, objectname, radius (as in
            `~astroquery.mast.missions.MastMissionsClass.query_region` and
            `~astroquery.mast.missions.MastMissionsClass.query_object` functions),
            and all fields listed in the column documentation for the mission being queried.
            Any invalid keys passed in criteria are ignored by the API.
            List of all valid fields that can be used to match results on criteria can be retrieved by calling
            `~astroquery.mast.missions.MastMissionsClass.get_column_list` function.

        Returns
        -------
        response : list of `~requests.Response`
        """

        self.limit = limit

        if objectname or coordinates:
            coordinates = utils.parse_input_location(coordinates, objectname)

        # if radius is just a number we assume degrees
        radius = coord.Angle(radius, u.arcmin)

        # build query
        params = {"limit": self.limit, "offset": offset, 'select_cols': select_cols}
        if coordinates:
            params["target"] = [f"{coordinates.ra.deg} {coordinates.dec.deg}"]
            params["radius"] = radius.arcmin
            params["radius_units"] = 'arcminutes'

        if not self._service_api_connection.check_catalogs_criteria_params(criteria):
            raise InvalidQueryError("At least one non-positional criterion must be supplied.")

        params['conditions'] = []
        for prop, value in criteria.items():
            if prop not in self._search_option_fields:
                params['conditions'].append({prop: value})
            else:
                params[prop] = value

        return self._service_api_connection.service_request_async(self.service, params, use_json=True)

        Given a set of search criteria, returns a list of mission metadata.

        Parameters
        ----------
        coordinates : str or `~astropy.coordinates` object
            The target around which to search. It may be specified as a
            string or as the appropriate `~astropy.coordinates` object.
        objectname : str
            The name of the target around which to search.
        radius : str or `~astropy.units.Quantity` object, optional
            Default 3 degrees.
            The string must be parsable by `~astropy.coordinates.Angle`. The
            appropriate `~astropy.units.Quantity` object from
            `~astropy.units` may also be used. Defaults to 3 arcminutes.
        limit : int
            Optional and default is 5000.
            the maximun number of dataset IDs in the results.
        offset : int
            Optional and default is 0.
            the number of records you wish to skip before selecting records.
        select_cols: list
            names of columns that will be included in the astropy table
        **criteria
            Criteria to apply. At least one non-positional criteria must be supplied.
            Valid criteria are coordinates, objectname, radius (as in
            `~astroquery.mast.missions.MastMissionsClass.query_region` and
            `~astroquery.mast.missions.MastMissionsClass.query_object` functions),
            and all fields listed in the column documentation for the mission being queried.
            Any invalid keys passed in criteria are ignored by the API.
            List of all valid fields that can be used to match results on criteria can be retrieved by calling
            `~astroquery.mast.missions.MastMissionsClass.get_column_list` function.

        Returns
        -------
        response : list of `~requests.Response`
        
Given a set of search criteria, returns a list of mission metadata.
Parameters

coordinates : str or `~astropy.coordinates` object
The target around which to search. It may be specified as a
string or as the appropriate `~astropy.coordinates` object.
objectname : str
The name of the target around which to search.
radius : str or `~astropy.units.Quantity` object, optional
Default 3 degrees.
The string must be parsable by `~astropy.coordinates.Angle`. The
appropriate `~astropy.units.Quantity` object from
`~astropy.units` may also be used. Defaults to 3 arcminutes.
limit : int
Optional and default is 5000.
the maximun number of dataset IDs in the results.
offset : int
Optional and default is 0.
the number of records you wish to skip before selecting records.
select_cols: list
names of columns that will be included in the astropy table
criteria
Criteria to apply. At least one non-positional criteria must be supplied.
Valid criteria are coordinates, objectname, radius (as in
`~astroquery.mast.missions.MastMissionsClass.query_region` and
`~astroquery.mast.missions.MastMissionsClass.query_object` functions),
and all fields listed in the column documentation for the mission being queried.
Any invalid keys passed in criteria are ignored by the API.
List of all valid fields that can be used to match results on criteria can be retrieved by calling
`~astroquery.mast.missions.MastMissionsClass.get_column_list` function.

Returns

response : list of `~requests.Response`
Given a set of search criteria returns a list of mission metadata . Parameters coordinates : str or ` ~astropy . coordinates ` object The target around which to search . It may be specified as a string or as the appropriate ` ~astropy . coordinates ` object . objectname : str The name of the target around which to search . radius : str or ` ~astropy . units . Quantity ` object optional Default 3 degrees . The string must be parsable by ` ~astropy . coordinates . Angle ` . The appropriate ` ~astropy . units . Quantity ` object from ` ~astropy . units ` may also be used . Defaults to 3 arcminutes . limit : int Optional and default is 5000 . the maximun number of dataset IDs in the results . offset : int Optional and default is 0 . the number of records you wish to skip before selecting records . select_cols : list names of columns that will be included in the astropy table criteria Criteria to apply . At least one non - positional criteria must be supplied . Valid criteria are coordinates objectname radius ( as in ` ~astroquery . mast . missions . MastMissionsClass . query_region ` and ` ~astroquery . mast . missions . MastMissionsClass . query_object ` functions ) and all fields listed in the column documentation for the mission being queried . Any invalid keys passed in criteria are ignored by the API . List of all valid fields that can be used to match results on criteria can be retrieved by calling ` ~astroquery . mast . missions . MastMissionsClass . get_column_list ` function . Returns response : list of ` ~requests . Response `
def query_criteria_async(self, *, coordinates=None, objectname=None, radius=3*u.arcmin,
                             limit=5000, offset=0, select_cols=[], **criteria):
        self.limit = limit
        if objectname or coordinates:
            coordinates = utils.parse_input_location(coordinates, objectname)
        radius = coord.Angle(radius, u.arcmin)
        params = {"limit": self.limit, "offset": offset, 'select_cols': select_cols}
        if coordinates:
            params["target"] = [f"{coordinates.ra.deg} {coordinates.dec.deg}"]
            params["radius"] = radius.arcmin
            params["radius_units"] = 'arcminutes'
        if not self._service_api_connection.check_catalogs_criteria_params(criteria):
            raise InvalidQueryError("At least one non-positional criterion must be supplied.")
        params['conditions'] = []
        for prop, value in criteria.items():
            if prop not in self._search_option_fields:
                params['conditions'].append({prop: value})
            else:
                params[prop] = value
        return self._service_api_connection.service_request_async(self.service, params, use_json=True)
def query_criteria_async ( self , * , coordinates = None , objectname = None , radius = 3 * u . arcmin , limit = 5000 , offset = 0 , select_cols = [ ] , ** criteria ) : self . limit = limit if objectname or coordinates : coordinates = utils . parse_input_location ( coordinates , objectname ) radius = coord . Angle ( radius , u . arcmin ) params = { "limit" : self . limit , "offset" : offset , 'select_cols' : select_cols } if coordinates : params [ "target" ] = [ f"{coordinates.ra.deg} {coordinates.dec.deg}" ] params [ "radius" ] = radius . arcmin params [ "radius_units" ] = 'arcminutes' if not self . _service_api_connection . check_catalogs_criteria_params ( criteria ) : raise InvalidQueryError ( "At least one non-positional criterion must be supplied." ) params [ 'conditions' ] = [ ] for prop , value in criteria . items ( ) : if prop not in self . _search_option_fields : params [ 'conditions' ] . append ( { prop : value } ) else : params [ prop ] = value return self . _service_api_connection . service_request_async ( self . service , params , use_json = True )
Given a set of search criteria, returns a list of mission metadata.
Given a set of search criteria returns a list of mission metadata .
"""
        Given a set of search criteria, returns a list of mission metadata.

        Parameters
        ----------
        coordinates : str or `~astropy.coordinates` object
            The target around which to search. It may be specified as a
            string or as the appropriate `~astropy.coordinates` object.
        objectname : str
            The name of the target around which to search.
        radius : str or `~astropy.units.Quantity` object, optional
            Default 3 degrees.
            The string must be parsable by `~astropy.coordinates.Angle`. The
            appropriate `~astropy.units.Quantity` object from
            `~astropy.units` may also be used. Defaults to 3 arcminutes.
        limit : int
            Optional and default is 5000.
            the maximun number of dataset IDs in the results.
        offset : int
            Optional and default is 0.
            the number of records you wish to skip before selecting records.
        select_cols: list
            names of columns that will be included in the astropy table
        **criteria
            Criteria to apply. At least one non-positional criteria must be supplied.
            Valid criteria are coordinates, objectname, radius (as in
            `~astroquery.mast.missions.MastMissionsClass.query_region` and
            `~astroquery.mast.missions.MastMissionsClass.query_object` functions),
            and all fields listed in the column documentation for the mission being queried.
            Any invalid keys passed in criteria are ignored by the API.
            List of all valid fields that can be used to match results on criteria can be retrieved by calling
            `~astroquery.mast.missions.MastMissionsClass.get_column_list` function.

        Returns
        -------
        response : list of `~requests.Response`
        """ # if radius is just a number we assume degrees # build query
self
coordinates
objectname
radius
limit
offset
select_cols