Skip to main content

Rotate a FITS file to put spectral axis first

Project description

PyFITSRotate

Description

A simple Python script to rotate FITS cube axes. It uses the astropy package to read and write FITS files.

The default action is to rotate the spectral axis to be the first axis. This is useful for heavy IO operations on FITS cubes/

Installation

From github:

pip install git+https://github.com/AlecThomson/pyfitsrotate.git

From PyPI:

pip install fitsrotate

Usage

❯ fitsrotate -h
usage: fitsrotate [-h] [-o [OUTFILE]] [-e EXT] [-s SWAP_AX] filename

Rotate a FITS file to put spectral axis first.

positional arguments:
  filename              Input filename.

optional arguments:
  -h, --help            show this help message and exit
  -o [OUTFILE], --outfile [OUTFILE]
                        Output filename. Defaults to input filename with .rot.fits extension.
  -e EXT, --ext EXT     Extension number. Defaults to 0.
  -s SWAP_AX, --swap-ax SWAP_AX
                        Axis to swap with spectral axis (numpy convention). Defaults to -1.

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

fitsrotate-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

fitsrotate-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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