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

Uploaded Python 3

File details

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

File metadata

  • Download URL: casa_fits-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7c8b77c5b28c1ebaa0fc15695d3283b626dfa5b4645f0281574e93c657234a74
MD5 31f315b1bc498708205c627b8dd2824e
BLAKE2b-256 6424b4c4a4243d0c8c7409396da82c801432e2e1d191c9fc2fdf94a7c83a1da0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: casa_fits-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b96b94dd3724c35fe41d44b31b2a285933d33e3e87bd1a16fd48e481bef2da03
MD5 5ec2c06486b7d22455bfd23bf36c3f47
BLAKE2b-256 bd03b98d08febf038a3e874a4bc46ed2658f150c6a08e91c128842d18af519e1

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