dace_query.photometry package

Submodules

dace_query.photometry.photometry module

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

A photometry instance

class dace_query.photometry.photometry.PhotometryClass(dace_instance: DaceClass | None = None)

Bases: object

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

A photometry instance is already provided, to use it:

>>> from dace_query.photometry import Photometry
get_timeseries(target: str) list

Retrieve photometry timeseries for a specified target.

Parameters:

target (str) – The target to retrieve data from

Returns:

The desired data

Return type:

list

>>> from dace_query.photometry import Photometry
>>> target_to_search = "EPIC201750173"
>>> values = Photometry.get_timeseries(target=target_to_search)
query_database(limit: int | None = 10000, filters: dict | None = None, sort: dict | None = None, output_format: str | None = None) dict[str, ndarray] | DataFrame | Table | dict

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

>>> from dace_query.photometry import Photometry
>>> values =  Photometry.query_database()
query_region(sky_coord: SkyCoord, angle: Angle, limit: int | None = 10000, filters: dict | None = None, output_format: str | None = None) dict[str, ndarray] | DataFrame | Table | dict

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

>>> 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)

Module contents