Photometry#

dace_query.photometry.photometry.Photometry: PhotometryClass = <dace_query.photometry.photometry.PhotometryClass object>#

This is a singleton instance of the PhotometryClass class.

To use it, simply import it :

from dace_query.photometry import Photometry
class dace_query.photometry.photometry.PhotometryClass(dace_instance=None)#

Bases: object

The photometry class. Use to retrieve data from the photometry database.

Tip

A photometry instance is already provided, to use it:

from dace_query.photometry import Photometry
get_timeseries(target)#

Retrieve photometry timeseries for a specified target.

Parameters:

target (str) – The target to retrieve data from

Returns:

The desired data

Return type:

list

Getting photometry timeseries for a target
from dace_query.photometry import Photometry
target_to_search = "EPIC201750173"
values = Photometry.get_timeseries(target=target_to_search)
query_database(limit=10000, filters=None, sort=None, output_format=None)#

Query the photometry database to retrieve data in the chosen format.

Filters and sorting order can be applied to the query via named arguments (see Filtering and sorting).

All available formats are defined in this section (see Output formats).

Parameters:
  • limit (Optional[int]) – Maximum number of rows to return

  • filters (Optional[dict]) – Filters to apply to the query

  • sort (Optional[dict]) – Sort order to apply to the query

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting all photometry data
from dace_query.photometry import Photometry
values =  Photometry.query_database()
query_region(sky_coord, angle, limit=10000, filters=None, output_format=None)#

Query a region, based on SkyCoord and Angle objects, in the photometry database and retrieve data in the chosen format.

Filters can be applied to the query via named arguments (see Filtering and sorting).

All available formats are defined in this section (see Output formats).

Parameters:
  • sky_coord (SkyCoord) – Sky coordinates object from the astropy module

  • angle (Angle) – Angle object from the astropy module

  • limit (Optional[int]) – Maximum number of rows to return

  • filters (Optional[dict]) – Filters to apply to the query

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Searching for photometry data using a cone search
from dace_query.photometry import Photometry
from astropy.coordinates import SkyCoord, Angle
sky_coord, angle = SkyCoord("11h01m04s", "+04d29m10s", frame='icrs'), Angle('0.045d')
values = Photometry.query_region(sky_coord=sky_coord, angle=angle)