Skip to main content

No project description provided

Project description

Test status PyPI version Documentation

tesscube is a package designed to help you obtain TESS data by cutting it out of the FFI cubes at the Barbara A. Mikulski Archive for Space Telescopes (MAST).

tesscube works with data that is available in the cloud, and will return TESS data in formats similar to the NASA TESS official mission products. You do not need any login credentials to use tesscube, and can use this tool by pip installing either on your local machine or in the cloud.

Quickstart

The easiest way to install tesscube and all of its dependencies is to use the pip command.

To install tesscube, run the following command in a terminal window:

$ python -m pip install tesscube --upgrade

The --upgrade flag is optional, but recommended if you already have tesscube installed and want to upgrade to the latest version.

Depending on the specific Python environment, you may need to replace python with the correct Python interpreter, e.g., python3.

Load an FFI cube

You can work with an FFI cube by loading it using a sector, camera, and CCD number.

from tesscube import TESSCube
cube = TESSCube(sector=1, camera=1, ccd=4)

Obtain an FFI Using tesscube

You can obtain an FFI image by indexing into a cube

from tesscube import TESSCube
cube = TESSCube(sector=1, camera=1, ccd=4)
ffi = cube[300]

This will return an astropy.fits.HDUList

Obtain a TPF

You can obtain a TPF in two ways, either you can either pass a pixel position

from tesscube import TESSCube
from astropy.coordinates import SkyCoord
corner = (1282, 1750)
cube = TESSCube(sector=1, camera=1, ccd=4)
tpf = cube.get_tpf(corner, shape=(10, 11))

Or you can pass an astropy SkyCoord object containing the RA and Dec of the target

from tesscube import TESSCube
from astropy.coordinates import SkyCoord
coord = SkyCoord.from_name("AU Mic")
cube = TESSCube(sector=1, camera=1, ccd=4)
tpf = cube.get_tpf(coord, shape=(10, 11))

Alternatively, you can index into the cube like so:

from tesscube import TESSCube
cube = TESSCube(sector=1, camera=1, ccd=4)
tpf = cube[:, 401:410, 503:510]

Both will return an astropy.fits.HDUList, with a file format similar to the official mission products.

Obtain a time-coadded TPF

TESS data can be coadded in time to increase signal to noise at the expense of time resolution. You can obtain a lower time resolution by either passing in a frame_bin parameter, which will downsample the resultant TPF,

from tesscube import TESSCube
from astropy.coordinates import SkyCoord
corner = (1282, 1750)
cube = TESSCube(sector=1, camera=1, ccd=4)
tpf = cube.get_tpf(corner, shape=(10, 11), frame_bin=10)

Or you can slice the cube, which will return a downsampled TPF

from tesscube import TESSCube
cube = TESSCube(sector=1, camera=1, ccd=4)
tpf = cube[::10, 401:410, 503:510]

Both will return an astropy.fits.HDUList, with a file format similar to the official mission products, with the time resolution reduced by a factor of 10.

Obtain a TICA TPF

TICA data are FFIs produced by MIT with a quick turn around time that are rapidly delivered to MIT to enable quick processing of data for transient events. You can create a TPF out of TICA products, but this functionality is potentially brittle.

TICA FFIs do not always conform to the same standard and sometimes have larger headers. This means they are hard to read in by tesscube, which assumes that there are always the same numbers of bytes. You will have to specify for a given sector how many header blocks each TICA cube has. Usually this is 6, but sometimes it is 7, depending on the sector.

from tesscube import TESSCubes
cube = TESSCube(sector=1, camera=1, ccd=4, tica=True, nhdr_blocks=6)

Once this object is initialized you should be able to work with it to extract a TPF

cube.get_tpf()

TICA FFIs do not have errors. When functions should return errors, these will be filled with zeros.

Currently there is not a way to index into the cube object and get the TICA FFI, because these are not stored in the AWS cloud.

Contributing

tesscube is an open-source, community driven package. We welcome users to contribute and develop new features for lksearch.

For further information, please see the Lightkurve Community guidelines.

Citing

If you find tesscube useful in your research, please cite it and give us a GitHub star!

If you use Lightkurve for work or research presented in a publication, we request the following acknowledgment or citation:

This research made use of Lightkurve, a Python package for Kepler and TESS data analysis (Lightkurve Collaboration, 2018).

See full citation instuctions, including dependencies, in the Lightkurve documentation.

Contact

tesscube is an open source community project created by the TESS Science Support Center. The best way to contact us is to open an issue or to e-mail tesshelp@bigbang.gsfc.nasa.gov.

Please include a self-contained example that fully demonstrates your problem or question.

Changelog:

  • Fixed barycentric timing correction with lkspacecraft package

  • Added from_name method

  • Added ability to use “TICA” FFIs. This is experimental and might be buggy.

  • Patch removes the un-needed fitsio dependency

  • Initial v1.0.0 release of tesscube.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tesscube-1.2.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tesscube-1.2.0-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file tesscube-1.2.0.tar.gz.

File metadata

  • Download URL: tesscube-1.2.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.13 Darwin/23.5.0

File hashes

Hashes for tesscube-1.2.0.tar.gz
Algorithm Hash digest
SHA256 907977eca7d74313d8bf398248e1044d2b32fdad1e50047436e7aa0937a6a54f
MD5 34d29abcaa57e2b6ab30ae68ee064530
BLAKE2b-256 266d1ed0a32c46cb1ec30c11282bdf50a643977b7f32b3e66fabdf21fbcd067f

See more details on using hashes here.

File details

Details for the file tesscube-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: tesscube-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.13 Darwin/23.5.0

File hashes

Hashes for tesscube-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e16d9b6b211073f1d2d68fcefe94f1c73a776dc9d9810ed00efabdf3c64278d3
MD5 77793655030dc03910156cc926b84f5e
BLAKE2b-256 e90ad5d5e18f57cb7690015996d94a72f3b6fc6fa2b779b099f448638b09916a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page