Skip to main content

Build and Test License: MIT DOI

plot

With this package that builds on lightkurve, you can reduce TESS data while preserving transient signals. You can supply a TPF or give coordinates and sector to construct a TPF with TESScut. The background subtraction accounts for the smooth background and detector straps. Alongisde background subtraction TESSreduce also aligns images, performs difference imaging, and can even detect transient events!

An additional component that is in development is calibration of TESS photometry, and reliably link muti-sector light curves.

TESSreduce can be installed through pip:

pip install git+https://github.com/CheerfulUser/TESSreduce.git

Example reduction for SN 2018fub:

import tessreduce as tr
obs = tr.sn_lookup('sn2018fub')
|   Sector | Covers   |   Time difference  |
|          |          |             (days) |
|----------+----------+--------------------|
|        2 | True     |                  0 |
|       29 | False    |                721 |
tess = tr.tessreduce(obs_list=obs)

plot

OR

import tessreduce as tr
ra = 10.127
dec = -50.687
sector = 2
tess = tr.tessreduce(ra=ra,dec=dec,sector=sector)

If you have a downloaded TPF you can load that directly into tessreduce.

tess = tr.tessreduce(tpf='file')

Photometry method

TESSreduce can perform aperture and PSF photometry. The photometry method used is set by the phot_method option which can either be aperture or psf. In general the PSF method appears to be more robust, however, there are cases where aperture still provides a better lightcurve. The default method is aperture. Using the example above we can use different photometry methods as follows.

tess = tr.tessreduce(obs_list=obs,phot_method='psf') # runs PSF photometry for reduction
tess = tr.tessreduce(obs_list=obs,phot_method='aperture') # runs aperture photometry for reduction

You can also define the photometry method when creating a lightcurve with diff_lc as follows.

lc, sky = tess.diff_lc(phot_method='psf')

The PRF photometry method uses the TESS_PRF package which can be found here: https://github.com/keatonb/TESS_PRF

Flux calibration

TESSreduce can calibrate TESS counts to physical flux, or AB magnitudes, by using PS1 data, If your field is dec >-30, and SkyMapper data for Southern field. IF you want a flux calibrated light curve then use:

tess.to_flux()

OR

tess.to_mag()

Several options are available for flux and are interchangeable, however, mag is currently not reversible. To easily plot the resulting light curve:

tess.plotter()

plot

Extracting key variables

The main variables that TESSreduce assigns during the reduction can be accessed as follows:

  • flux: tess.flux
  • background: tess.bkg
  • reference: tess.ref
  • reference index: tess.ref_ind
  • lightcurve: tess.lc
  • Mask: tess.mask
  • Source catalog: tess.cat

TESS data can be complicated, and there are a lot of other functions burried in TESSreduce, so if you want some guidence on how to do a specific analysis contact me at: ryan.ridden@canterbury.ac.nz

Example reductions

We include a few notebooks for some possible reductions and science cases in the examples folder.

Citing TESSreduce

If you make use of TESSreduce, please cite Ridden-Harper et al. (2021):

@ARTICLE{2021arXiv211115006R,
       author = {{Ridden-Harper}, R. and {Rest}, A. and {Hounsell}, R. and {M{\"u}ller-Bravo}, T.~E. and {Wang}, Q. and {Villar}, V.~A.},
        title = "{TESSreduce: transient focused TESS data reduction pipeline}",
      journal = {arXiv e-prints},
     keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - High Energy Astrophysical Phenomena},
         year = 2021,
        month = nov,
          eid = {arXiv:2111.15006},
        pages = {arXiv:2111.15006},
archivePrefix = {arXiv},
       eprint = {2111.15006},
 primaryClass = {astro-ph.IM},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021arXiv211115006R},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Metadata

Release files for tessreduce 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tessreduce 2.0.0
File Size Uploaded Provenance Actions
tessreduce-2.0.0.tar.gz 230.9 kB Without provenance Details for tessreduce-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tessreduce 2.0.0
File Interpreter ABI Platform Actions
tessreduce-2.0.0-py3-none-any.whl Python 3 none any Details for tessreduce-2.0.0-py3-none-any.whl

Total release size: 454.2 kB

Release files / tessreduce-2.0.0.tar.gz

Download URL tessreduce-2.0.0.tar.gz
Size 230.9 kB
Tags Source
SHA-256 checksum
How to use checksums
942864c36d1a38b968c67b6b1ce642b5dccecb15aff52c756df8a0bda809a3bd
BLAKE2b-256 checksum
How to use checksums
1eba342738cfb551aa8801020034dc48838156d89c3cc5028c66a2371997d79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / tessreduce-2.0.0-py3-none-any.whl

Download URL tessreduce-2.0.0-py3-none-any.whl
Size 223.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661c823ff83c785287c038a6aea382a4a9b28957eba602c6c8b607a1d71513ac
BLAKE2b-256 checksum
How to use checksums
fc915683eb5892cd9c452ad96c33614d8d1b49fd9d85fa453d58ee7cad8f66ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for tessreduce 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page