Skip to content

Commit

Permalink
adding the software docs again...
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbinks committed May 14, 2024
1 parent faf0d16 commit 60e4bb9
Show file tree
Hide file tree
Showing 9 changed files with 252 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
If this package is useful for research leading to publication we would appreciate the following acknowledgement:

"The data from the Transiting Exoplanet Survey Satellite (TESS) was acquired using the tessilator software package (Binks et al. 2023)."
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Alexander Binks and Hans Moritz Günther

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE
include README.md
include pyproject.toml
80 changes: 80 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.. image:: https://github.com/alexbinks/tessilator/blob/main/gif/lc_movie.gif
:width: 500 px
:align: center
:alt: "AB Doradus TESS periods"


|DOI|

.. |DOI| image:: https://zenodo.org/badge/588218536.svg
:target: https://zenodo.org/badge/latestdoi/588218536

|Documentation Status|

.. |Documentation Status| image:: https://readthedocs.org/projects/tessilator/badge/?version=latest
:target: https://tessilator.readthedocs.io/en/latest/?badge=latest


**WELCOME TO THE TESSILATOR**
=============================

**The one-stop shop for measuring TESS rotation periods**

The tessilator is a python program designed to provide an all-in-one module to measure
lightcurves and stellar rotation periods from the Transiting Exoplanet Survey
Satellite (TESS). Whilst there are many useful (and powerful) software tools
available for working with TESS data, they are mostly provided as various steps
in the data reduction process --- to our knowledge there are no programs that
automate the full process from downloading the data (start) to obtaining
rotation period measurements (finish). The software provided here fills this
gap. Using as little information as the name of the target, the tessilator is
capable of providing a robust lightcurve analysis and produces high-quality figures
and tables ready for publication. Sit back and let the tessilator do the hard work!

The steps are:

(1) download photometric time-series data from TESS.

(2) scan the Gaia DR3 catalogue to quantify the level of background
contamination from nearby sources.

(3) clean the lightcurves for poor quality data caused by systematic and
instrumental effects.

(4) normalize and detrend lightcurves over the whole sector of observations.

(5) measure stellar rotation periods using the Lomb-Scargle periodogram method

(6) quantify various data quality metrics from photometric time-series data
which can be used by the user to assess data reliability

Ways to use the tessilator
--------------------------
**Using TESScut to obtain "cutout" images**

In this module, the data is downloaded from `TESSCut (Brasseur et al. 2019) <https://mast.stsci.edu/tesscut/>`_ -- a service which allows the user to acquire a stack of "postage-stamp" image frames ordered in time sequence and centered on the supplied sky coordinate. It uses modules from the `TesscutClass <https://astroquery.readthedocs.io/en/latest/api/astroquery.mast.TesscutClass.html>`_ to download the data, then applies steps 2-6 (above). This software is recommended for users who require a relatively fast extraction for a manageable number of targets. With the correct pre-requisite Python modules and an uninterrupted internet connection, a target with 5 sectors of TESS data takes approximately 1-2 minutes to complete (and approximately 3-4 minutes should the user want to analyse the lightcurves of a few neighbouring contaminants). The user can process a list of targets automatically by calling the ``all_sources_cutout.py`` function

**Analysing full-frame calibrated images**

If the user is interested in conducting a much larger survey, it is faster to run
the tessilator using the calibrated full-frame images. These can be downloaded in
bulk at the `MAST archive <https://archive.stsci.edu/tess/bulk_downloads/bulk_downloads_ffi-tp-lc-dv.html>`_.
This method works much faster than TESS Cutouts because multiple lightcurves can be
extracted simultaneously due to the vectorisation made possible with numpy/C-style
methods. The authors have tested this method for a catalogue of ~1 million targets,
which took less than a week to complete. The user can process a list of targets automatically by calling the ``all_sources_sector.py`` function.

Notes on using the tessilator
-----------------------------
Should there be any problems in using this software please contact Alex Binks
(lead author) at abinks@mit.edu

If this package is useful for research leading to publication we would
appreciate the following acknowledgement:

"The data from the Transiting Exoplanet Survey Satellite (TESS) was acquired
using the tessilator software package (Binks et al. 2024)."

Licence: MIT

Alexander Binks and Moritz Guenther, 2024
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm"]
build-backend = 'setuptools.build_meta'
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
astroquery : conda
pyinputplus : pip
43 changes: 43 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[metadata]
name = tessilator
description = The one-stop shop for measuring TESS rotation periods
long_description = file: README.rst
author = Alex Binks & Moritz Guenther
author_email = abinks@mit.edu
url = https://github.com/alexbinks/tessilator
license = MIT License
copyright = 2024, Alex Binks & Moritz Guenther


[options]
zip_safe = False
packages = find:
install_requires =
numpy
astropy
astroquery
photutils
scipy
matplotlib
pyinputplus

[options.entry_points]
console_scripts =
run_tess_sectors = tessilator.scripts.run_tess_sectors:main
run_tess_cutouts = tessilator.scripts.run_tess_cutouts:main

[options.extras_require]
docs =
sphinx
sphinx-automodapi
sphinx-astropy
numpydoc
test =
pytest-astropy
sphinx-astropy

[options.package_data]
tessilator.tests = ABDor_tests/*, AUMic_tests/*

[tool:pytest]
addopts = -v
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from setuptools import setup
setup(use_scm_version=True)
95 changes: 95 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[tox]
envlist =
py{39,310}-test{,-alldeps,-devdeps}{,-cov}
py{39,310}-test-numpy{117,118}
py{39,310}-test-astropy{51,lts}
build_docs
linkcheck
codestyle
requires =
setuptools < 60.0
pip >= 19.3.1
isolated_build = true
indexserver =
NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple

[testenv]
# Suppress display of matplotlib plots generated during docs build
setenv = MPLBACKEND=agg

# Pass through the following environment variables which may be needed for the CI
# passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI

# Run the tests in a temporary directory to make sure that we don't import
# this package from the source tree
changedir = .tmp/{envname}

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
# will only take effect if that factor is included in the environment name. To
# see a list of example environments that can be run, along with a description,
# run:
#
# tox -l -v
#
description =
run tests
alldeps: with all optional dependencies
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
cov: and test coverage
numpy116: with numpy 1.16.*
numpy117: with numpy 1.17.*
numpy118: with numpy 1.18.*
astropy30: with astropy 3.0.*
astropy40: with astropy 4.0.*
astropylts: with the latest astropy LTS

# The following provides some specific pinnings for key packages
deps =

cov: coverage
numpy116: numpy==1.16.*
numpy117: numpy==1.17.*
numpy118: numpy==1.18.*

astropy30: astropy==3.0.*
astropy40: astropy==4.0.*
astropylts: astropy==4.0.*

devdeps: :NIGHTLY:numpy
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy

# The following indicates which extras_require from setup.cfg will be installed
extras =
test
alldeps: all

commands =
pip freeze
!cov: pytest --pyargs tessilator {toxinidir}/docs {posargs}
cov: pytest --pyargs tessilator {toxinidir}/docs --cov tessilator --cov-config={toxinidir}/setup.cfg {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml

[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b html . _build/html {posargs:-j auto}

[testenv:linkcheck]
changedir = docs
description = check the links in the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b linkcheck . _build/html {posargs:-W}

[testenv:codestyle]
skip_install = true
changedir = .
description = check code style, e.g. with flake8
deps = flake8
commands = flake8 marxs --count --max-line-length=100

0 comments on commit 60e4bb9

Please sign in to comment.