UkidssClass¶
-
class
astroquery.ukidss.UkidssClass(username=None, password=None, community=None, database='UKIDSSDR10PLUS', programme_id='all')[source]¶ Bases:
astroquery.wfau.BaseWFAUClassThe UKIDSSQuery class. Must instantiate this class in order to make any queries. Allows registered users to login, but defaults to using the public UKIDSS data sets.
Attributes Summary
ARCHIVE_URLBASE_URLCROSSID_FORMCROSSID_URLIMAGE_FORMIMAGE_URLLOGIN_URLREGION_URLTIMEOUTall_databasesarchivefiltersframe_typesprogrammes_longprogrammes_shortMethods Summary
__call__(*args, **kwargs)init a fresh copy of self authenticated()extract_urls(html_in)Helper function that uses regexps to extract the image urls from the given HTML. get_image_list(coordinates[, waveband, …])Function that returns a list of urls from which to download the FITS images. get_images(coordinates[, waveband, …])Get an image around a target/ coordinates from a WFAU catalog. get_images_async(coordinates[, waveband, …])Serves the same purpose as get_imagesbut returns a list of file handlers to remote files.list_catalogs([style])Returns a list of available catalogs in WFAU. list_databases()List the databases available from the WFAU archive. logged_in()Determine whether currently logged in. login(username, password, community)Login to non-public data as a known user. query_cross_id(*args, **kwargs)See query_cross_id_asyncquery_cross_id_async(coordinates[, radius, …])Query the crossID server query_region(coordinates[, radius, …])Used to query a region around a known identifier or given coordinates from the catalog. query_region_async(coordinates[, radius, …])Serves the same purpose as query_region.Attributes Documentation
-
ARCHIVE_URL= 'http://surveys.roe.ac.uk:8080/wsa/ImageList'¶
-
BASE_URL= 'http://surveys.roe.ac.uk:8080/wsa/'¶
-
CROSSID_FORM= 'crossID_form.jsp'¶
-
CROSSID_URL= 'http://surveys.roe.ac.uk:8080/wsa/CrossID'¶
-
IMAGE_FORM= 'getImage_form.jsp'¶
-
IMAGE_URL= 'http://surveys.roe.ac.uk:8080/wsa/GetImage'¶
-
LOGIN_URL= 'http://surveys.roe.ac.uk:8080/wsa/DBLogin'¶
-
REGION_URL= 'http://surveys.roe.ac.uk:8080/wsa/WSASQL'¶
-
TIMEOUT= 30¶
-
all_databases= ('UKIDSSDR10PLUS', 'UKIDSSDR9PLUS', 'UKIDSSDR8PLUS', 'UKIDSSDR7PLUS', 'UKIDSSDR6PLUS', 'UKIDSSDR5PLUS', 'UKIDSSDR4PLUS', 'UKIDSSDR3PLUS', 'UKIDSSDR2PLUS', 'UKIDSSDR1PLUS', 'UKIDSSDR1', 'UKIDSSEDRPLUS', 'UKIDSSEDR', 'UKIDSSSV', 'WFCAMCAL08B', 'U09B8v20120403', 'U09B8v20100414')¶
-
archive= None¶
-
filters= {'Br': 7, 'H': 4, 'H2': 6, 'J': 3, 'K': 5, 'Y': 2, 'Z': 1, 'all': 'all'}¶
-
frame_types= {'all': 'all', 'confidence': 'conf', 'deep_stack': 'deep%stack', 'difference': 'diff', 'interleave': 'leav', 'leavstack': 'leavstack', 'normal': 'normal', 'stack': 'stack'}¶
-
programmes_long= {'Deep Extragalactic Survey': 104, 'Galactic Clusters Survey': 103, 'Galactic Plane Survey': 102, 'Large Area Survey': 101, 'Ultra Deep Survey': 105}¶
-
programmes_short= {'DXS': 104, 'GCS': 103, 'GPS': 102, 'LAS': 101, 'UDS': 105}¶
Methods Documentation
-
__call__(*args, **kwargs)¶ init a fresh copy of self
-
authenticated()¶
-
extract_urls(html_in)¶ Helper function that uses regexps to extract the image urls from the given HTML.
Parameters: html_in : str
source from which the urls are to be extracted.
Returns: links : list
The list of URLS extracted from the input.
-
get_image_list(coordinates, waveband='all', frame_type='stack', image_width=<Quantity 1. arcmin>, image_height=None, radius=None, database=None, programme_id=None, get_query_payload=False)¶ Function that returns a list of urls from which to download the FITS images.
Parameters: coordinates : str or
astropy.coordinatesobjectThe target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate
astropy.coordinatesobject. ICRS coordinates may also be entered as strings as specified in theastropy.coordinatesmodule.waveband : str
The color filter to download. Must be one of
'all','J','H','K','H2','Z','Y','Br'].frame_type : str
The type of image. Must be one of
'stack','normal','interleave','deep_stack','confidence','difference','leavstack','all']image_width : str or
Quantityobject, optionalThe image size (along X). Cannot exceed 15 arcmin. If missing, defaults to 1 arcmin.
image_height : str or
Quantityobject, optionalThe image size (along Y). Cannot exceed 90 arcmin. If missing, same as image_width.
radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing only image around the given position rather than multi-frames are retrieved.programme_id : str
The survey or programme in which to search for. See
list_catalogs.database : str
The WFAU database to use.
verbose : bool
get_query_payload : bool, optional
Returns: url_list : list of image urls
-
get_images(coordinates, waveband='all', frame_type='stack', image_width=<Quantity 1. arcmin>, image_height=None, radius=None, database=None, programme_id=None, verbose=True, get_query_payload=False, show_progress=True)¶ Get an image around a target/ coordinates from a WFAU catalog.
Parameters: coordinates : str or
astropy.coordinatesobjectThe target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate
astropy.coordinatesobject. ICRS coordinates may also be entered as strings as specified in theastropy.coordinatesmodule.waveband : str
The color filter to download. Must be one of
'all','J','H','K','H2','Z','Y','Br'].frame_type : str
The type of image. Must be one of
'stack','normal','interleave','deep_stack','confidence','difference','leavstack','all']image_width : str or
Quantityobject, optionalThe image size (along X). Cannot exceed 15 arcmin. If missing, defaults to 1 arcmin.
image_height : str or
Quantityobject, optionalThe image size (along Y). Cannot exceed 90 arcmin. If missing, same as image_width.
radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing only image around the given position rather than multi-frames are retrieved.programme_id : str
The survey or programme in which to search for.
database : str
The WFAU database to use.
verbose : bool
get_query_payload : bool, optional
Returns: list : A list of
HDUListobjects.
-
get_images_async(coordinates, waveband='all', frame_type='stack', image_width=<Quantity 1. arcmin>, image_height=None, radius=None, database=None, programme_id=None, verbose=True, get_query_payload=False, show_progress=True)¶ Serves the same purpose as
get_imagesbut returns a list of file handlers to remote files.Parameters: coordinates : str or
astropy.coordinatesobjectThe target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate
astropy.coordinatesobject. ICRS coordinates may also be entered as strings as specified in theastropy.coordinatesmodule.waveband : str
The color filter to download. Must be one of
'all','J','H','K','H2','Z','Y','Br'].frame_type : str
The type of image. Must be one of
'stack','normal','interleave','deep_stack','confidence','difference','leavstack','all']image_width : str or
Quantityobject, optionalThe image size (along X). Cannot exceed 15 arcmin. If missing, defaults to 1 arcmin.
image_height : str or
Quantityobject, optionalThe image size (along Y). Cannot exceed 90 arcmin. If missing, same as image_width.
radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing only image around the given position rather than multi-frames are retrieved.programme_id : str
The survey or programme in which to search for. See
list_catalogs.database : str
The WFAU database to use.
verbose : bool
get_query_payload : bool, optional
Returns: list : list
A list of context-managers that yield readable file-like objects.
-
list_catalogs(style='short')¶ Returns a list of available catalogs in WFAU. These can be used as
programme_idin queries.Parameters: style : str, optional
Must be one of
'short','long'. Defaults to'short'. Determines whether to print long names or abbreviations for catalogs.Returns: list : list containing catalog name strings in long or short style.
-
list_databases()¶ List the databases available from the WFAU archive.
-
logged_in()¶ Determine whether currently logged in.
-
login(username, password, community)¶ Login to non-public data as a known user.
Parameters: username : str
password : str
community : str
-
query_cross_id(*args, **kwargs)¶
-
query_cross_id_async(coordinates, radius=<Quantity 1. arcsec>, programme_id=None, database=None, table='source', constraints='', attributes='default', pairing='all', system='J2000', get_query_payload=False)¶ Query the crossID server
Parameters: coordinates : astropy.SkyCoord
An array of one or more astropy SkyCoord objects specifying the objects to crossmatch against.
radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing defaults to 1 arcsec.programme_id : str
The survey or programme in which to search for. See
list_catalogs.database : str
The WFAU database to use.
table : str
The table ID, one of: “source”, “detection”, “synopticSource”
constraints : str
SQL constraints. If ‘source’ is selected, this will be expanded automatically
attributes : str
Additional attributes to select from the table. See, e.g., http://horus.roe.ac.uk/vsa/crossID_notes.html
system : ‘J2000’ or ‘Galactic’
The system in which to perform the query. Can affect the output data columns.
get_query_payload : bool, optional
-
query_region(coordinates, radius=<Quantity 1. arcmin>, programme_id=None, database=None, verbose=False, get_query_payload=False, system='J2000', attributes=['default'], constraints='')¶ Used to query a region around a known identifier or given coordinates from the catalog.
Parameters: coordinates : str or
astropy.coordinatesobjectThe target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate
astropy.coordinatesobject. ICRS coordinates may also be entered as strings as specified in theastropy.coordinatesmodule.radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing defaults to 1 arcmin. Cannot exceed 90 arcmin.programme_id : str
The survey or programme in which to search for. See
list_catalogs.database : str
The WFAU database to use.
verbose : bool, optional.
get_query_payload : bool, optional
system : ‘J2000’ or ‘Galactic’
The system in which to perform the query. Can affect the output data columns.
attributes : list, optional.
Attributes to select from the table. See, e.g., http://horus.roe.ac.uk/vsa/crossID_notes.html
constraints : str, optional
SQL constraints to the search. Default is empty (no constrains applied).
Returns: result :
TableQuery result table.
-
query_region_async(coordinates, radius=<Quantity 1. arcmin>, programme_id=None, database=None, get_query_payload=False, system='J2000', attributes=['default'], constraints='')¶ Serves the same purpose as
query_region. But returns the raw HTTP response rather than the parsed result.Parameters: coordinates : str or
astropy.coordinatesobjectThe target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate
astropy.coordinatesobject. ICRS coordinates may also be entered as strings as specified in theastropy.coordinatesmodule.radius : str or
Quantityobject, optionalThe string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. When missing defaults to 1 arcmin. Cannot exceed 90 arcmin.programme_id : str
The survey or programme in which to search for. See
list_catalogs.database : str
The WFAU database to use.
get_query_payload : bool, optional
attributes : list, optional.
Attributes to select from the table. See, e.g., http://horus.roe.ac.uk/vsa/crossID_notes.html
constraints : str, optional
SQL constraints to the search. Default is empty (no constrains applied).
Returns: response :
requests.ResponseThe HTTP response returned from the service.
-