dace_query.tess package¶
Submodules¶
dace_query.tess.tess module¶
- class dace_query.tess.tess.TessClass(dace_instance: DaceClass | None = None)¶
Bases:
objectThe tess class. Use to retrieve data from the tess module.
A tess instance is already provided, to use it :
>>> from dace_query.tess import Tess
- get_flux(target: str, flux_type: dict | None = 'raw_flux', output_format: str | None = None) dict[str, ndarray] | DataFrame | Table | dict¶
Retrieve tess photometry data for a specified target in the chosen format.
All available formats are defined in this section (see Output formats).
Avalable flux types are [ ‘raw_flux’, ‘corr_flux’ ].
- Parameters:
target (str) – The target to retrieve data from.
flux_type (Optional[str]) – The flux type to use
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.tess import Tess >>> target_to_search = 'TIC381400181' >>> values = Tess.get_flux(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 tess 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]) – The desired data in the chosen output format
- Returns:
A dict containing lists of values for each visit
- Return type:
dict[str, ndarray] or DataFrame or Table or dict
>>> from dace_query.tess import Tess >>> values = Tess.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 tess 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.tess import Tess >>> from astropy.coordinates import SkyCoord, Angle >>> sky, a = SkyCoord('13h50m24s', '-60d21m11s', frame='icrs'), Angle('0.005d') >>> values = Tess.query_region(sky_coord=sky, angle=a)