Skip to main content

Cutout tools for astronomical images

Project description

Cutout tools for astronomical images

Powered by Astropy Badge PyPi Status Documentation Status

Astrocut provides tools for making cutouts from sets of astronomical images with shared footprints. It is under active development.

Three main areas of functionality are included:

  • Solving the specific problem of creating image cutouts from sectors of Transiting Exoplanet Survey Satellite (TESS) full-frame images.

  • General fits file cutouts including from single images and sets of images with the shared WCS/pixel scale.

  • Cutout post-processing functionality, including centering cutouts along a path (for moving targets) and combining cutouts.

Documentation is at https://astrocut.readthedocs.io.

Project Status

Github actions CI status Codecov coverage status

Developer Documentation

Installation

$ git clone https://github.com/spacetelescope/astrocut.git
$ cd astrocut
$ pip install .

For active development install in develop mode

$ pip install -e .

Testing

Testing is now run with tox (pip install tox). Tests can be found in astrocut/tests/.

$ tox -e test

Tests can also be run directly with pytest:

$ pip install -e .[test]
$ pytest

Documentation

Documentation files are found in docs/.

We now build the documentation with tox (pip install tox):

$ tox -e build_docs

You can also build the documentation with Sphinx directly using:

$ pip install -e .[docs]
$ cd docs
$ make html

The built docs will be in docs/_build/html/, to view them go to file:///path/to/astrocut/repo/docs/_build/html/index.html in the browser of your choice.

Release Protocol

GitHub Action Releases

The pypi-package.yml GitHub workflow creates a PyPI release. The job in this workflow is triggered when a tag is pushed or a GH release (+tag) is created, and uses OpenAstronomy’s GitHub action workflow for publishing pure Python packages (see here for documentation).

Manual Releases

For making releases manually, follow the Astropy template release instructions.

Requirements:

  • build (pip install build)

  • twine (pip install twine)

Notes:

  • Astrocut uses setuptools_scm to manage version numbers.

  • Astrocut does have a pyproject.toml file

  • If the given twine command doesn’t work you likely need python -m twine upload dist/*

  • You shouldn’t have to trigger a readthedocs build manually, it should run on its own in ~20 min.

Contributing

We love contributions! Astrocut is open source, built on open source, and we’d love to have you hang out in our community.

Imposter syndrome disclaimer: We want your help. No, really.

There may be a little voice inside your head that is telling you that you’re not ready to be an open source contributor; that your skills aren’t nearly good enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one’s coding skills. Writing perfect code isn’t the measure of a good developer (that would disqualify all of us!); it’s trying to create something, making mistakes, and learning from those mistakes. That’s how we all improve, and we are happy to help others learn.

Being an open source contributor doesn’t just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you’re coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.

Note: This disclaimer was originally written by Adrienne Lowe for a PyCon talk, and was adapted by Astrocut based on its use in the README file for the MetPy project.

License

This project is Copyright (c) MAST Archive Developers and licensed under the terms of the BSD 3-Clause license. This package is based upon the Astropy package template which is licensed under the BSD 3-clause license. See the licenses folder for more information.

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

astrocut-1.2.0.tar.gz (280.0 kB view details)

Uploaded Source

Built Distribution

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

astrocut-1.2.0-py3-none-any.whl (123.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astrocut-1.2.0.tar.gz
  • Upload date:
  • Size: 280.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astrocut-1.2.0.tar.gz
Algorithm Hash digest
SHA256 488011b003ff0bfe7544d85bc24152180563a48cc5d6a654ddffdbe825df08d7
MD5 edda5c492874e92f81d3bd55bf94dac1
BLAKE2b-256 9c8c109a55f138a6fe08300c737c3a2594941104f8a9b7f0607c11ce98c1525f

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrocut-1.2.0.tar.gz:

Publisher: pypi-package.yml on spacetelescope/astrocut

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: astrocut-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 123.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astrocut-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 168bac2846565847150cd2a93fdb67250da3f9a3f55eecfb05940d29a7480fa6
MD5 7191d775cecff0e1c1336b7b73fb4c30
BLAKE2b-256 da41b4a3a41534d79891ef5078792e2a88993d50af82517540971e6acdb0c8c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for astrocut-1.2.0-py3-none-any.whl:

Publisher: pypi-package.yml on spacetelescope/astrocut

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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