Skip to main content

A collection of image scripts supporting both FITS and CASA image formats.

Project description

CASA FITS

GitHub

CASA FITS is a Python package for working with astronomical images in both FITS and CASA image formats. It provides tools for loading, analyzing, and visualizing astronomical images, with a focus on ease of use and integration with the scientific Python ecosystem.

Features

  • Support for FITS and CASA image formats
  • Image loading and conversion utilities
  • Visualization: matplotlib-based image display, beam drawing, contour overlays
  • Image analysis tools: radial and azimuthal cuts, radial profiles, peak detection, statistics

Installation

Requires Python 3.11-3.12.

Install via pip (after cloning the repository):

pip install casa-fits

Usage

Import the package and display the image:

from casa_fits import load_fits, load_image, imshow
import matplotlib.pyplot as plt

# Load a FITS image
img = load_fits("example.fits")
# Or CASA format image with specifying size
img = load_image("./example.image.pbcor", width=128, height=128)

# Display the image
fig, ax = plt.subplots(figsize=(6, 4))
# with title
imshow(ax, img, title="TWHya Continuum")
fig.tight_layout()
plt.show()

example image of imshow

See more samples at sample directory (more sample codes will come soon...).

Modules Overview

  • io: Functions for loading FITS and CASA images (load_fits, load_image).
  • imshow, overlay_contour: Visualization utilities for displaying images and contours.
  • radial_profile: Compute radial profiles of images.
  • radial_cut, azimuth_cut: Extract radial and azimuthal cuts from images.
  • detectpeak: Peak detection in images.
  • imstat: Compute image statistics.

Documentation

Full documentation is available at https://akimasanishida.github.io/casa_fits/.

License

MIT License

Repository

https://github.com/akimasanishida/casa_fits

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

casa_fits-1.0.3.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

casa_fits-1.0.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file casa_fits-1.0.3.tar.gz.

File metadata

  • Download URL: casa_fits-1.0.3.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for casa_fits-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e3fc0d690a77c9fe0b98a6ee8d3821bb9f97c2df9ac5f076542d94fa74274298
MD5 02f98619e1fd2789936c4200119685f1
BLAKE2b-256 1b4b4f6198730e316e1679ba03b1a77b8f0a85e721e4f4dd60ed57812251348a

See more details on using hashes here.

File details

Details for the file casa_fits-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: casa_fits-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for casa_fits-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95b089e259053315b4c7aea73683eedfcc17152e7e893a79fdbc8eec27953651
MD5 b6610dd5ffacdce477508986cabccef3
BLAKE2b-256 8988cf0fe2a0a3b4eadf72cbdb5b220ccb0255e56558cbbc31bd707bcd5a4f40

See more details on using hashes here.

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