ObservationsClass

class astroquery.gemini.ObservationsClass(*args)[source]

Bases: QueryWithLogin

Query class for observations in the Gemini archive.

This class provides query capabilities against the gemini archive. Queries can be done by cone search, by name, or by a set of criteria.

Attributes Summary

server

url_helper

Methods Summary

get_file(filename, *[, download_dir, timeout])

Download the requested file to the current directory

login(username, password)

Login to the Gemini Archive website.

query_criteria(*rawqueryargs[, coordinates, ...])

search a variety of known parameters against the Gemini observations.

query_object(objectname[, radius])

search for Gemini observations by target on the sky.

query_raw(*args, **kwargs)

perform flexible query against Gemini observations

query_region(coordinates[, radius])

search for Gemini observations by target on the sky.

Attributes Documentation

server = 'https://archive.gemini.edu'
url_helper = <astroquery.gemini.urlhelper.URLHelper object>

Methods Documentation

get_file(filename, *, download_dir='.', timeout=None)[source]

Download the requested file to the current directory

filenamestr

Name of the file to download

download_dirstr, optional

Name of the directory to download to

timeoutint, optional

Timeout of the request in milliseconds

login(username, password)

Login to the Gemini Archive website.

This method will authenticate the session as a particular user. This may give you access to additional information or access based on your credentials

Parameters:
usernamestr

The username to login as

passwordstr

The password for the given account

query_criteria(*rawqueryargs, coordinates=None, radius=None, pi_name=None, program_id=None, utc_date=None, instrument=None, observation_class=None, observation_type=None, mode=None, adaptive_optics=None, program_text=None, objectname=None, raw_reduced=None, orderby=None, **rawquerykwargs)[source]

search a variety of known parameters against the Gemini observations.

Given various criteria, search the Gemini archive for matching observations. Note that rawqueryargs and rawquerykwargs will pick up additional positional and key=value arguments and pass then on to the raw query as is.

Parameters:
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

radiusstr or Quantity object, optional

Default 0.3 degrees if coordinates are set, else None The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.3 deg.

pi_namestr, optional

Default None. Can be used to search for data by the PI’s name.

program_idstr, optional

Default None. Can be used to match on program ID

utc_datedate or (date,date) tuple, optional

Default None. Can be used to search for observations on a particular day or range of days (inclusive).

instrumentstr, optional
Can be used to search for a particular instrument. Valid values are:

‘GMOS’, ‘GMOS-N’, ‘GMOS-S’, ‘GNIRS’, ‘GRACES’, ‘NIRI’, ‘NIFS’, ‘GSAOI’, ‘F2’, ‘GPI’, ‘NICI’, ‘MICHELLE’, ‘TRECS’, ‘BHROS’, ‘HRWFS’, ‘OSCIR’, ‘FLAMINGOS’, ‘HOKUPAA+QUIRC’, ‘PHOENIX’, ‘TEXES’, ‘ABU’, ‘CIRPASS’

observation_classstr, optional
Specifies the class of observations to search for. Valid values are:

‘science’, ‘acq’, ‘progCal’, ‘dayCal’, ‘partnerCal’, ‘acqCal’

observation_typestr, optional
Search for a particular type of observation. Valid values are:

‘OBJECT’, ‘BIAS’, ‘DARK’, ‘FLAT’, ‘ARC’, ‘PINHOLE’, ‘RONCHI’, ‘CAL’, ‘FRINGE’, ‘MASK’

modestr, optional
The mode of the observation. Valid values are:

‘imaging’, ‘spectroscopy’, ‘LS’, ‘MOS’, ‘IFS’

adaptive_opticsstr, optional
Specify the presence of adaptive optics. Valid values are:

‘NOTAO’, ‘AO’, ‘NGS’, ‘LGS’

program_textstr, optional

Specify text in the information about the program. This is free form text.

objectnamestr, optional

Give the name of the target.

raw_reducedstr, optional
Indicate the raw or reduced status of the observations to search for. Valid values are:

‘RAW’, ‘PREPARED’, ‘PROCESSED_BIAS’, ‘PROCESSED_FLAT’, ‘PROCESSED_FRINGE’, ‘PROCESSED_ARC’

orderbystr, optional

Indicates how the results should be sorted. Values should be like the ones used in the archive website when sorting a column. For example, data_label_desc would sort by the data label in descending order.

rawqueryargslist, optional

Additional arguments will be passed down to the raw query. This covers any additional parameters that would end up as ‘/parametervalue/’ in the URL to the archive webservice.

rawquerykwargsdict, optional

Additional key/value arguments will also be passed down to the raw query. This covers any parameters that would end up as ‘/key=value/’ in the URL to the archive webservice.

Returns:
responseTable
Raises:
ValueError: passed value is not recognized for the given field, see message for details
query_object(objectname, radius=<Quantity 0.3 deg>)[source]

search for Gemini observations by target on the sky.

Given an object name and optional radius, returns a Table of Gemini observations.

Parameters:
objectnamestr

The name of an object to search for. This attempts to resolve the object by name and do a search on that area of the sky. This does not handle moving targets.

radiusstr or Quantity object, optional

Default 0.3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.3 deg.

Returns:
responseTable
query_raw(*args, **kwargs)[source]

perform flexible query against Gemini observations

This is a more flexible query method. This method will do special handling for coordinates and radius if present in kwargs. However, for the remaining arguments it assumes all of args are useable as query path elements. For kwargs, it assumes all of the elements can be passed as name=value within the query path to Gemini.

This method does not do any validation checking or attempt to interperet the values being passed, aside from coordinates and radius.

This method is most useful when the query_criteria and query_region do not meet your needs and you can build the appropriate search in the website. When you see the URL that is generated by the archive, you can translate that into an equivalent python call with this method. For example, if the URL in the website is:

https://archive.gemini.edu/searchform/RAW/cols=CTOWEQ/notengineering/GMOS-N/PIname=Hirst/NotFail

You can disregard NotFail, cols=x and notengineering. You would run this query as

query_raw(‘GMOS-N’, PIname=’Hirst’)

Parameters:
args

The list of parameters to be passed via the query path to the webserver

kwargs

The dictionary of parameters to be passed by name=value within the query path to the webserver. The orderby key value pair has a special intepretation and is appended as a query parameter like the one used in the archive website for sorting results.

Returns:
responseTable
query_region(coordinates, radius=<Quantity 0.3 deg>)[source]

search for Gemini observations by target on the sky.

Given a sky position and radius, returns a Table of Gemini observations.

Parameters:
coordinatesstr or coordinates object

The target around which to search. It may be specified as a string or as the appropriate coordinates object.

radiusstr or Quantity object, optional

Default 0.3 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.3 deg.

Returns:
responseTable