Skip to main content

This is a simple script to convert FITS images to stamps.

Usage

usage: fits-to-stamps [-h] [--trimsec TRIMSEC] [--fitsext FITSEXT]
                      [--stampsize STAMPSIZE]
                      [--separatorwidth SEPARATORWIDTH] [--fitsglob FITSGLOB]
                      [--workers WORKERS]
                      target

convert a FITS to 3 x 3 stamps.

positional arguments:
  target                path to a single FITS file or a directory of FITS
                        files to convert

optional arguments:
  -h, --help            show this help message and exit
  --trimsec TRIMSEC     the FITS header keys containing the TRIMSEC section.
                        All of the keys in the CSV list provided will be
                        tried. default: TRIMSEC,DATASEC,TRIMSEC0
  --fitsext FITSEXT     the FITS extension number containing the image to work
                        on. default: automatic detection for normal and
                        .fits.fz files
  --stampsize STAMPSIZE
                        the individual stamp size in pixels. default: 256
  --separatorwidth SEPARATORWIDTH
                        the width of the separator lines between stamps in
                        pixels. default: 1
  --fitsglob FITSGLOB   the file glob to use to recognize FITS files in a
                        directory. default: *.fits*
  --workers WORKERS     number of parallel workers to operate on multiple FITS
                        files default: 8

Installation

This requires:

  • numpy
  • astropy
  • Pillow

Install it with pip from PyPI (preferably in a virtualenv, or use the --user flag):

pip [--user] install fits-to-stamps

Or to install the latest version.

pip [--user] install git+https://github.com/waqasbhatti/fits-to-stamps

Once the installation is done, you'll be able to execute the script as fits-to-stamps if the virtualenv is active (or ~/.local/bin for pip --user installs is in your $PATH).

To use it without needing the virtualenv active all the time, add an alias to your ~/.bashrc:

alias fits-to-stamps="/path/to/your/virtualenv/bin/fits-to-stamps"

That should make it run with the correct Python interpreter in the virtualenv.

License

This is provided under the MIT license. See the LICENSE file for the full text.

Metadata

Release files for fits-to-stamps 0.0.4

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

Source distribution (sdist)

Source distribution for fits-to-stamps 0.0.4
File Size Uploaded Provenance Actions
fits_to_stamps-0.0.4.tar.gz 6.7 kB Without provenance Details for fits_to_stamps-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fits-to-stamps 0.0.4
File Interpreter ABI Platform Actions
fits_to_stamps-0.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for fits_to_stamps-0.0.4-py2.py3-none-any.whl

Total release size: 14.0 kB

Release files / fits_to_stamps-0.0.4.tar.gz

Download URL fits_to_stamps-0.0.4.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
88a9ef340fbfd9769baae145afe3d0d9782ba123b309e4c21c41474cedc59ecc
BLAKE2b-256 checksum
How to use checksums
7942371d5c550f2a8a8bdbc857f19d550bf5484e6d163e48b15cd085ab97ddca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Release files / fits_to_stamps-0.0.4-py2.py3-none-any.whl

Download URL fits_to_stamps-0.0.4-py2.py3-none-any.whl
Size 7.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4b4564c019ebec87e85bcd5ae621940222d4b4d06ba45af498782a4c8d9e41f5
BLAKE2b-256 checksum
How to use checksums
0200d67c67bdd3047386f28524a924b991cdaa948d58c096c06101c4d34dab15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

Security for fits-to-stamps 0.0.4

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.

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