etta.php_wrappers module

Python wrappers for PHP functions that are documented here: https://exofop.ipac.caltech.edu/tess/Introduction_to_ExoFOP_php_functions.php

Note that this module can also be accessed directly from the etta package. That is, the functions in this module can be imported as

from etta.php_wrappers import func_name

or as

from etta import func_name
download_imaging(target=None, sort=None, output='pandas', path=None)

Accesses all imaging observation summaries.

Parameters
  • target (str, optional) – Target’s TIC ID, TOI name (including TOI prefix), or a planet name recognized by the Exoplanet Archive. Accepted formats: (nnnnnnnnn|TOInnn|TOInnn.nn|name).

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, inst, filt, pix, imagetype, psf, cont, date, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_nearbytarget(tic, sort=None, output='pandas', path=None)

Accesses nearby targets for a given TIC ID.

Parameters
  • tic (int) – TIC ID.

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), toi, ra, dec, pmra, pmdec, tmag, distance, separation. If sort is None, the result will be sorted by separation. If sort is an invalid column name, sort order is undefined.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with index column set to TICs.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_obsnotes(tag=None, tic=None, row_id=None, output='pandas', path=None)

Accesses observing notes for the given TIC ID, tag, or row ID.

Parameters
  • tag (str or int) – Data tag (see https://exofop.ipac.caltech.edu/tess/tag_help.php for more information). Tag can be string or associated number.

  • tic (int) – TIC ID.

  • row_id (int) – Row ID associated with note.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_spect(target=None, sort=None, output='pandas', path=None)

Accesses all spectroscopic observation summaries.

Parameters
  • target (str, optional) – Target’s TIC ID, TOI name (including TOI prefix), or a planet name recognized by the Exoplanet Archive. Accepted formats: (nnnnnnnnn|TOInnn|TOInnn.nn|name).

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, inst, res, cov, snrres, snrwave, prv, date, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_stellarcomp(target=None, sort=None, output='pandas', path=None)

Accesses all user-reported stellar companions.

Parameters
  • target (str, optional) – Target’s TIC ID, TOI name (including TOI prefix), or a planet name recognized by the Exoplanet Archive. Accepted formats: (nnnnnnnnn|TOInnn|TOInnn.nn|name).

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), lastmod (descending). If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_tag_imaging(tag, sort=None, output='pandas', path=None)

Accesses all imaging observation summaries for a given tag.

Parameters
  • tag (str or int) – Data tag (see https://exofop.ipac.caltech.edu/tess/tag_help.php for more information). Tag can be string or associated number.

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, inst, filt, pix, imagetype, psf, cont, date, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_tag_spect(tag, sort=None, output='pandas', path=None)

Accesses all spectroscopic observation summaries for a given tag.

Parameters
  • tag (str or int) – Data tag (see https://exofop.ipac.caltech.edu/tess/tag_help.php for more information). Tag can be string or associated number.

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, inst, res, cov, snrres, snrwave, prv, date, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_tag_tseries(tag, sort=None, output='pandas', path=None)

Accesses all time series observation summaries for a given tag.

Parameters
  • tag (str or int) – Data tag (see https://exofop.ipac.caltech.edu/tess/tag_help.php for more information). Tag can be string or associated number.

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, camera, filt, pix, psf, photaprad, date, transcov, deltamag, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_toi(toi=None, sort=None, output='pandas', path=None)

Accesses the full TOI table from https://exofop.ipac.caltech.edu/tess/view_toi.php

Parameters
  • toi (str or int, optional) – Access table information for a specific TOI. Defaults to None.

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: tid, toidesc, toi, toiasc, master, sg1a, sg1b, sg2, sg3, sg4, sg5, acwg, tmag, planetrad, planetname, planetnum, planetinsol, planetteq, planetsnr, disposition, tfopwgdisp, source, ra, dec, pmra, pmdec, epoch, period, duration, depth, distance, teff, logg, rad, metallicity, sectors, toi_alerted, toi_edited. If sort is None or the provided sort column name is invalid, the result will be sorted by last modified time.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with index column set to TOIs.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_tseries(target=None, sort=None, output='pandas', path=None)

Accesses all time series observation summaries.

Parameters
  • target (str, optional) – Target’s TIC ID, TOI name (including TOI prefix), or a planet name recognized by the Exoplanet Archive. Accepted formats: (nnnnnnnnn|TOInnn|TOInnn.nn|name).

  • sort (str, optional) – Column to sort by. Defaults to None. Available columns are: id (TIC ID), tel, camera, filt, pix, psf, photaprad, date, transcov, deltamag, tag, notes, user, group. If sort is None or is an invalid column name, the result will be sorted by id.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_uploads(target=None, sort=None, output='pandas', path=None)

Download number of user-uploaded contributions in each contribution category: Time Series Observations, Spectroscopy Observations, Imaging Observations, Files, Observation Notes, Stellar Parameters, Stellar Companion Parameters, and Planet Parameters. If a given target has multiple TIC IDs associated with it, then data will be provided for each TIC.

Parameters
  • target (str, optional) – Target’s TIC ID, TOI name (including TOI prefix), or star name. Accepted formats: (nnnnnnnnn|TOInnn|star_name).

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    • ’text’: save text file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None

download_user_tags(username=None, output='pandas', path=None)

Accesses list of user tags made by username.

Parameters
  • username (str, optional) – username to search. If username is None, search is conducted on logged-in user’s username.

  • output (str, optional) –

    Output of result. Available formats are:

    • ’pandas’: returns pandas.DataFrame object with default index column.

    • ’astropy’: returns astropy.table.Table object.

    • ’csv’: save csv file to path.

    • ’pipe’: save pipe-delimited file to path.

    Defaults to ‘pandas’.

  • path (str, optional) –

    Path to save the result file to. Only relevant if result output is csv, pipe or text.

    • If path provided is a file, the result will be written to that file.

    • If path provided is a directory, the file will be saved in the given directory with a default filename.

    • If path is None, the file will be saved in the current directory with a default filename.

    Defaults to None.

Returns

if output=’pandas’, a pandas.DataFrame object is returned. If output=’astropy’, a astropy.table.Table object is returned. Else the result is saved to file and the function returns None.

Return type

pandas.DataFrame or astropy.table.Table or None