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.1.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.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: casa_fits-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a40e58aee5cf2bff8268232a83fef4b21c5730220adf4fad052cfd6e4f823297
MD5 8aae126191ec57842625b639dc161f72
BLAKE2b-256 015a5c6aaff357c9420a3165fbccafe36dbce6163ea829b988f5467590b53cc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casa_fits-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16f30e0bb7cda18dcface57630b1e9686be6973b6dba04de06f8ba9a4c7bbdcb
MD5 6d3a5d41b67d93999b38609d5cf7f2b1
BLAKE2b-256 39f30554ba3b59cbc7b6142ac2fdc3ebac782cbaf3d8d8e60d4890656ba86bfa

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