dace_query.cheops package

Submodules

dace_query.cheops.cheops module

dace_query.cheops.cheops.Cheops: CheopsClass = <dace_query.cheops.cheops.CheopsClass object>

Cheops instance

class dace_query.cheops.cheops.CheopsClass(dace_instance: DaceClass | None = None)

Bases: object

The cheops class. Use to retrieve data from the cheops module.

A cheops instance is already provided, to use it :

download(file_type: str, filters: dict | None = None, output_directory: str | None = None, output_filename: str | None = None) None

Download CHEOPS products (FITS, PDF,…) for specific visits and save it locally depending on the specified arguments.

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

File types available are [ ‘lightcurves’, ‘images’, ‘reports’, ‘full’, ‘sub’, ‘all’ ].

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

Parameters:
  • file_type (str) – The type of files to download

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

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Returns:

None

>>> from dace_query.cheops import Cheops
>>> filters_to_use = {'file_key': {'contains': 'CH_PR300001_TG000301_V0000'}}
>>> # Cheops.download('all', filters_to_use, output_directory='/tmp', output_filename='cheops.tar.gz')
download_diagnostic_movie(file_key: str, aperture: str | None = 'default', output_directory: str | None = None, output_filename: str | None = None) None

Download diagnostic movie for a Cheops file_key.

Aperture types available are [ ‘default’, ‘optimal, ‘rinf’, ‘rsup’ ].

Parameters:
  • file_key (str) – The cheops visit file key

  • aperture (Optional[str]) – Apertures types

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Returns:

None

>>> from dace_query.cheops import Cheops
>>> # Cheops.download_diagnostic_movie(file_key='CH_PR100018_TG027204_V0200', output_directory='/tmp', output_filename='cheops_movie.mp4')
get_lightcurve(target: str, aperture: str | None = 'default', filters: dict | None = None, sort: dict | None = None, output_format: str | None = None) dict[str, ndarray] | DataFrame | Table | dict

Get the photometry data (from Cheops) in the chosen format for a specified target.

Aperture types available are [ ‘default’, ‘optimal, ‘rinf’, ‘rsup’ ].

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:
  • target (str) – The target to retrieve light curve from

  • aperture (Optional[str]) – Aperture type

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

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

  • output_format (Optional[str]) – The desired data in the chosen output format

Returns:

The desired data in the chosen format

Return type:

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

>>> from dace_query.cheops import Cheops
>>> values = Cheops.get_lightcurve('WASP-8')
query_catalog(catalog: str, 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 cheops, either stellar or planet, catalogs.

Available catalogs are [ ‘planet’, ‘stellar’ ].

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:
  • catalog (str) – The catalog name

  • 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.cheops import Cheops
>>> catalog_to_search = 'planet'
>>> values = Cheops.query_catalog(catalog_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 cheops database to retrieve available visits 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.cheops import Cheops
>>> values = Cheops.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 Cheops database and 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:
  • 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.cheops import Cheops
>>> from astropy.coordinates import SkyCoord, Angle
>>> sky_coord, angle = SkyCoord("22h23m29s", "+32d27m34s", frame='icrs'), Angle('0.045d')
>>> values = Cheops.query_region(sky_coord=sky_coord, angle=angle)

Module contents