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.0.tar.gz (2.3 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.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: casa_fits-1.0.0.tar.gz
  • Upload date:
  • Size: 2.3 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.0.tar.gz
Algorithm Hash digest
SHA256 7012d20272b25c7ac2adc79927e67be5ecf1a1bfd3d406c7f69e403597aab583
MD5 ef939a8e612becd112e29aa28cb6d3f9
BLAKE2b-256 14cd77c9e3b3fe827d587b024d26bc2e2c77f5fb1e66278b00f86f4c867765a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casa_fits-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad4ab9f07860c608c2b315467e63a24930aab80db28210be375fe08a80d0097
MD5 46febeed8552fdd6dd6ef4934149db57
BLAKE2b-256 653be95c6485e91c021a918836b60e073828aa22a5c1abb32d87f803b1268d67

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