SourcesCatalog#

class astropop.catalogs.SourcesCatalog(*args, ids=None, mag=None, query_table=None, **kwargs)#

Bases: object

Manage and query a catalog of point sources objects.

This catalog wraps around SkyCoord and it’s query mechanism, extending it to include sources id or names, magnitudes or other informtions that user may want. It’s initialization accept all initialization arguments from this class. Other informations are stored according the following arguments.

Currently, it is designed to contain only magnitudes for photometric data.

Parameters:
ids: array

Names or ids of the objects in the catalog.

mag: `dict` (optional)

Dictionary of photometric magnitudes for each available filter. The keys are the names of the filters and the values are the photometric magnitudes of the object in a QFloat array. Photometry will be only available if this argument is set.

ra, dec: array (optional)

RA and DEC coordinates of the object. Conflicts with coords argument. If floats, are interpreted as decimal degrees.

pm_ra_cosdec, pm_dec: `~astropy.units.Quantity` (optional)

Proper motion of both coordinates.

unit: `~astropy.units.Unit`, string, or tuple

Units for supplied coordinate values.

obstime: time-like (optional)

Time of observation of the values. Used to compute proper motion on a target observation time.

frame: str (optional)

Celestial frame of coordinates. Default is ‘ICRS’

query_table: `~astropy.table.Table` (optional)

Optional table containing additional informations you may want to use for the sources. It must have the same number and order of the sources in the catalog.

*args, **kwargs:

Arguments to be passed to SkyCoord initialization. See SkyCoord docs for more details.

Attributes Summary

filters

Get the list of all active available filters in the query.

query_colnames

Get column names from query

query_table

The query table.

Methods Summary

copy()

Copy the current catalog to a new instance.

dec()

Get the sources declination in degrees.

get_coordinates([obstime])

Get the skycoord positions from the catalog.

mag_list(band)

Get the sources photometric mag in [(mag, mag_error)] format.

magnitude(band)

Get the sources magnitude in QFloat format.

match_objects(ra, dec, limit_angle[, obstime])

Find catalog objects matching the given coordinates.

ra()

Get the sources right ascension in degrees.

ra_dec_list()

Get the sources coordinates in [(ra, dec)] format.

skycoord()

Get the sources coordinates in SkyCoord format.

sources_id()

Get the list of sources id in catalog.

table()

This catalog in a Table instance.

Attributes Documentation

filters#

Get the list of all active available filters in the query.

query_colnames#

Get column names from query

query_table#

The query table.

Methods Documentation

copy()#

Copy the current catalog to a new instance.

dec()#

Get the sources declination in degrees.

get_coordinates(obstime=None)#

Get the skycoord positions from the catalog.

mag_list(band)#

Get the sources photometric mag in [(mag, mag_error)] format.

Parameters:
bandstr

The band name.

Returns:
mag_listlist

List of tuples of (mag, mag_error).

magnitude(band)#

Get the sources magnitude in QFloat format.

Parameters:
bandstr

The band name.

Returns:
magfloat

The sources magnitude in QFloat format.

match_objects(ra, dec, limit_angle, obstime=None)#

Find catalog objects matching the given coordinates.

The matching is performed by getting the nearest catalog object from the ra, dec coordinate within the limit angle. No additional matching criteria is used.

Parameters:
ra, dec: float or array-like

RA and Dec coordinates of the objects to be matched to this catalog. All coordinates in decimal degree format.

limit_angle: string, float, `~astropy.coordinates.Angle`

Angle limit for matching indexes. If string, if must be Angle compatible. If float, it will be interpreted as a decimal degree.

obstime: `~astropy.time.Time` (optional)

Observation time. If passed, it will be used to apply the proper motion to the coordinates, if available. Default: None

ra()#

Get the sources right ascension in degrees.

ra_dec_list()#

Get the sources coordinates in [(ra, dec)] format.

skycoord()#

Get the sources coordinates in SkyCoord format.

sources_id()#

Get the list of sources id in catalog.

table()#

This catalog in a Table instance.