NedClass#
- class astroquery.ipac.ned.NedClass[source]#
Bases:
BaseQueryClass for querying the NED (NASA/IPAC Extragalactic Database) system.
Attributes Summary
Methods Summary
get_image_list(object_name, *[, item, ...])Return a list of URLs from which to download the FITS images.
get_images(object_name, *[, ...])Query function to fetch FITS images for a given identifier.
get_images_async(object_name, *[, ...])Query function to fetch FITS images for a given identifier.
get_spectra(object_name, *[, ...])Query function to fetch FITS files of spectra for a given identifier.
get_spectra_async(object_name, *[, ...])Query function to fetch FITS files of spectra for a given identifier.
get_table(object_name, *[, table, ...])Fetch the specified data table for the object from NED DBR service.
get_table_async(object_name, *[, table, ...])Fetch the specified data table for the object from NED DBR service.
query_object(object_name, *[, ...])Query object by name from the NED DBR Service and returns the Main Source Table.
query_object_async(object_name, *[, ...])Query objects by name from the NED DBR Service and returns the raw HTTP response.
query_refcode(refcode, *[, ...])Query to retrieve all objects contained in a particular reference.
query_refcode_async(refcode, *[, ...])Query to retrieve all objects contained in a particular reference.
query_region(coordinates, *[, radius, ...])Query the objects in a region around a known identifier or given coordinates.
query_region_async(coordinates, *[, radius, ...])Query the objects in a region around a known identifier or given coordinates.
query_region_iau(iau_name, *[, equinox, ...])Query the Ned service to do cone search via the IAU name in the equatorial coordinate system.
query_region_iau_async(iau_name, *[, ...])Query the NED services to do cone search via the IAU name in the equatorial coordinate system.
Attributes Documentation
- BASE_URL = 'https://ned.ipac.caltech.edu/cgi-bin/'#
- CONESEARCH_IAU = 'ConeSearchByIAUstyle'#
- CONESEARCH_POSITION = 'ConeSearchByPosition'#
- CONESEARCH_TARGET = 'ConeSearchByTarget'#
- DBR_BASE_URL = 'https://ned.ipac.caltech.edu/NED::API/'#
- DBR_CSYS = 'CSYS'#
- DBR_EQUINOX = 'EQUINOX'#
- DBR_IAU = 'IAU_NAME'#
- DBR_ISLINE = 'SPECLINES'#
- DBR_LAT = 'LAT'#
- DBR_LON = 'LON'#
- DBR_MAXREC = 'MAXREC'#
- DBR_RADIUS = 'RADIUS'#
- DBR_REFCODE = 'REFCODE'#
- DBR_TARGET = 'TARGET'#
- IMG_DATA_URL = 'https://ned.ipac.caltech.edu/cgi-bin/imgdata'#
- OBJSEARCH_CROSSIDS = 'CrossidsOfObject'#
- OBJSEARCH_DIAMETERS = 'DiametersOfObject'#
- OBJSEARCH_DISTANCES = 'DistancesOfObject'#
- OBJSEARCH_EXTINCTION = 'ExtinctionAtTarget'#
- OBJSEARCH_INREFCODE = 'ObjectsInRefcode'#
- OBJSEARCH_NOTES = 'NotesOfObject'#
- OBJSEARCH_PHOTOMETRY = 'PhotometryOfObject'#
- OBJSEARCH_POSITIONS = 'PositionsOfObject'#
- OBJSEARCH_REDSHIFTS = 'RedshiftsOfObject'#
- OBJSEARCH_REFERENCES = 'ReferencesOfObject'#
- SEARCH_TYPE = ''#
- SPECTRA_URL = 'https://ned.ipac.caltech.edu/cgi-bin/NEDspectra'#
- TIMEOUT = 60#
Methods Documentation
- get_image_list(object_name, *, item='image', file_format='fits', get_query_payload=False)[source]#
Return a list of URLs from which to download the FITS images.
- Parameters:
- object_namestr
name of the identifier to query.
- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse- itemstr, optional
Can be either
imageorspectra. Defaults toimage. Required to decide the right URL to query.- file_formatstr, optional
Format of images/spectra to return. Defaults to
fits. Other options available:author-ascii,NED-ascii,VO-table.
- Returns:
- list of image urls
- get_images(object_name, *, get_query_payload=False, show_progress=True)[source]#
Query function to fetch FITS images for a given identifier.
- get_images_async(object_name, *, get_query_payload=False, show_progress=True)[source]#
Query function to fetch FITS images for a given identifier.
Serves the same purpose as
get_imagesbut returns file-handlers to the remote files rather than downloading them.
- get_spectra(object_name, *, get_query_payload=False, show_progress=True)[source]#
Query function to fetch FITS files of spectra for a given identifier.
- get_spectra_async(object_name, *, get_query_payload=False, show_progress=True)[source]#
Query function to fetch FITS files of spectra for a given identifier.
Serves the same purpose as
get_spectrabut returns file-handlers to the remote fits files rather than downloading them.
- get_table(object_name, *, table='photometry', get_query_payload=False, verbose=False, maxrec=None, is_line=False, output_table_format=None, from_year=None, to_year=None, extended_search=None)[source]#
Fetch the specified data table for the object from NED DBR service.
The returned table is in the form of
Table.- Parameters:
- object_namestr
name of the identifier to query.
- tablestr, optional
Must be one of
crossids,positions,redshifts,distances,photometry,extinctions,notes(orobject_notes),diameters, andreferences. Specifies the type of data-table that must be fetched for the given object. Defaults tophotometry.- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- verbosebool, optional.
When set to
Truedisplays warnings if the returned VOTable does not conform to the standard. Defaults toFalse.- maxrec: int, optional
Maximum records to return from the query.
- is_line: bool, optional for photometry service
If set to
Truethen gets photometry data of line component. Defaults toFalse.
- Returns:
- get_table_async(object_name, *, table='photometry', get_query_payload=False, maxrec=None, is_line=False, output_table_format=None, from_year=None, to_year=None, extended_search=None)[source]#
Fetch the specified data table for the object from NED DBR service.
Serves the same purpose as
get_tablebut returns the raw HTTP response rather than theTableobject.- Parameters:
- object_namestr
name of the identifier to query.
- tablestr, optional
Must be one of
crossids,positions,redshifts,distances,photometry,extinctions,notes(orobject_notes),diameters, andreferences. Specifies the type of data-table that must be fetched for the given object. Defaults tophotometry.- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- maxrec: int, optional
Maximum records to return from the query.
- is_line: bool, optional for photometry service
If set to
Truethen gets photometry data of line component. Defaults toFalse.
- Returns:
- Raises:
- InvalidQueryErrorif there is error in the specified table service.
- query_object(object_name, *, get_query_payload=False, verbose=False)[source]#
Query object by name from the NED DBR Service and returns the Main Source Table.
- Parameters:
- Returns:
- query_object_async(object_name, *, get_query_payload=False)[source]#
Query objects by name from the NED DBR Service and returns the raw HTTP response.
Serves the same purpose as
query_objectbut returns the raw HTTP response rather than theTableobject.- Parameters:
- Returns:
- query_refcode(refcode, *, get_query_payload=False, verbose=False, maxrec=None)[source]#
Query to retrieve all objects contained in a particular reference.
Equivalent to by refcode queries of the web interface.
- Parameters:
- refcodestr
19 digit reference code. Example:
1997A&A...323...31K.- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- verbosebool, optional.
When set to
Truedisplays warnings if the returned VOTable does not conform to the standard. Defaults toFalse.- maxrec: int, optional
Maximum records to return from the query. Defaults to all records if not specified.
- Returns:
- query_refcode_async(refcode, *, get_query_payload=False, maxrec=None)[source]#
Query to retrieve all objects contained in a particular reference.
Serves the same purpose as
query_refcodebut returns the raw HTTP response rather than theTableobject.- Parameters:
- Returns:
- query_region(coordinates, *, radius=<Quantity 1. arcmin>, get_query_payload=False, verbose=False, equinox='J2000.0', z_constraint=None, z_value1=None, z_value2=None, z_unit=None, maxrec=None)[source]#
Query the objects in a region around a known identifier or given coordinates.
Equivalent to the near position and near name queries from the NED web interface.
- Parameters:
- coordinatesstr or
coordinatesobject The 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
coordinatesobject. ICRS coordinates may also be entered as strings as specified in thecoordinatesmodule.- radiusstr or
Quantityobject, optional The string must be parsable by
Angle. The appropriateQuantityobject fromunitsmay also be used. Defaults to 1 arcmin. ex: “3.0 arcmin” (str) or 2.0 * u.arcmin (Quantity)- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- verbosebool, optional.
When set to
Truedisplays warnings if the returned VOTable does not conform to the standard. Defaults toFalse.- equinoxstr, optional
The equinox may be either
J2000.0orB1950.0. Defaults toJ2000.0. For string-formatted coordinates (for example, “12h30m00s +12d30m00s”), this value is used to determine the request equinox. If the value is not recognized as J2000/B1950, the query raises an input error. For coordinate-object inputs, this argument is ignored and the equinox is derived from the coordinate frame. Accepted NED equatorial pairs are FK4/B1950 and FK5/J2000; otherwise, the coordinate is normalized to FK5/J2000.- z_constraint: str, optional
The redshift constraint may be
Unconstrained,Available,Unavailable,Larger Than,Less ThanorBetween.- z_value1, z_value2: float, optional.
z_value1 is the redshift bound for the constraint
Larger Than,Less Than, or the minimum value within a range forBetween. z_value2 is the maximum value within a range forBetween.- z_unit: str, optional
The redshift value unit may be
zorkm/s. Defaults toNone, in which case the NED service treats it asz.- maxrec: int, optional
Maximum records to return from the query. Defaults to all records if not specified.
- coordinatesstr or
- Returns:
- query_region_async(coordinates, *, radius=<Quantity 1. arcmin>, get_query_payload=False, equinox='J2000.0', z_constraint=None, z_value1=None, z_value2=None, z_unit=None, maxrec=None)[source]#
Query the objects in a region around a known identifier or given coordinates.
Serves the same purpose as
query_regionbut returns the raw HTTP response rather than theTableobject.- Parameters:
- coordinatesstr or
coordinatesobject The 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
coordinatesobject. ICRS coordinates may also be entered as strings as specified in thecoordinatesmodule.- radiusstr or
Quantityobject, optional The string must be parsable by
Angle. The appropriateQuantityobject fromunitsmay also be used. Defaults to 1 arcmin. ex: “3.0 arcmin” (str) or 2.0 * u.arcmin (Quantity)- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- equinoxstr, optional
The equinox may be either
J2000.0orB1950.0. Defaults toJ2000.0. For string-formatted coordinates (for example, “12h30m00s +12d30m00s”), this value is used to determine the request equinox. If the value is not recognized as J2000/B1950, the query raises an input error. For coordinate-object inputs, this argument is ignored and the equinox is derived from the coordinate frame. Accepted NED equatorial pairs are FK4/B1950 and FK5/J2000; otherwise, the coordinate is normalized to FK5/J2000.- z_constraint: str, optional
The redshift constraint may be
Unconstrained,Available,Unavailable,Larger Than,Less ThanorBetween.- z_value1, z_value2: float, optional.
z_value1 is the redshift bound for the constraint
Larger Than,Less Than, or the minimum value within a range forBetween. z_value2 is the maximum value within a range forBetween.- z_unit: str, optional
The redshift value unit may be
zorkm/s. Defaults toNone, in which case the NED service treats it asz.- maxrec: int, optional
Maximum records to return from the query. Defaults to all records if not specified.
- coordinatesstr or
- Returns:
- Raises:
- TypeErrorif there is type error in the coordinate.
- InvalidQueryErrorif there is error in the redshift constraint.
- query_region_iau(iau_name, *, equinox='B1950.0', get_query_payload=False, verbose=False, z_constraint=None, z_value1=None, z_value2=None, z_unit=None, maxrec=None)[source]#
Query the Ned service to do cone search via the IAU name in the equatorial coordinate system.
Equivalent to the IAU format queries of the Web interface.
- Parameters:
- iau_namestr
IAU coordinate-based name of target on which search is centered. Definition of IAU coordinates at https://cds.unistra.fr/Dic/iau-spec.html.
- equinoxstr, optional
The equinox may be one of
J2000.0orB1950.0. Defaults toB1950.0.- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse- verbosebool, optional.
When set to
Truedisplays warnings if the returned VOTable does not conform to the standard. Defaults toFalse.- z_constraint: str, optional
redshift constraint may be
Unconstrained,Available,Unavailable,Larger Than,Less ThanorBetween.- z_value1, z_value2: float, optional.
The redshift values for the constraint. z_value1 is for
Larger Than,Less Than, or the minimum ofBetween. z_value2 is for the maximum ofBetween.- z_unit: str, optional
The redshift value unit may be
zorkm/s. Defaults toNone, in which case the NED service treats it asz.- maxrec: int, optional
Maximum records to return from the query.
- Returns:
- query_region_iau_async(iau_name, *, equinox='B1950.0', get_query_payload=False, z_constraint=None, z_value1=None, z_value2=None, z_unit=None, maxrec=None)[source]#
Query the NED services to do cone search via the IAU name in the equatorial coordinate system.
Serves the same purpose as
query_region_iaubut returns the raw HTTP response rather than theTableobject.- Parameters:
- iau_namestr
IAU coordinate-based name of target on which search is centered. Definition of IAU coordinates at https://cds.unistra.fr/Dic/iau-spec.html.
- equinoxstr, optional
The equinox may be one of
J2000.0orB1950.0. Defaults toB1950.0.- get_query_payloadbool, optional
If set to
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse- z_constraint: str, optional
redshift constraint may be
Unconstrained,Available,Unavailable,Larger Than,Less ThanorBetween.- z_value1, z_value2: float, optional.
The redshift values for the constraint. z_value1 is for
Larger Than,Less Than, or the minimum ofBetween. z_value2 is for the maximum ofBetween.- z_unit: str, optional
The redshift value unit may be
zorkm/s. Defaults toNone, in which case the NED service treats it asz.- maxrec: int, optional
Maximum records to return from the query. Defaults to all records if not specified.
- Returns:
- Raises:
- InvalidQueryErrorif there is error in redshift constraint.