Skip to main content

Takefits

PyPI version

Takefits is a GUI-based astronomical FITS viewer and analysis tool developed by Shunya Takekawa. ORCID iD

Requirements

  • Python 3.11 or later

Setup

From PyPI:

pip install takefits

For a local checkout:

python -m venv venv
source venv/bin/activate    # On Windows: venv\Scripts\activate
pip install .

Usage

takefits [path/to/fitsfile]

You can also launch it with:

python -m takefits [path/to/fitsfile]

Takefits can also save your current work using workspace files, so you can resume it anytime. To restore a saved workspace, launch Takefits with the workspace file path.

takefits /path/to/yourfile.workspace.json

Features

Takefits provides a comprehensive set of tools for radio astronomy data analysis.

1. Multi-View Cube Visualization

Visualize 3D FITS data cubes with synchronized XY, XZ, and ZY planes.

Main Window

2. Moment Maps & Channel Maps

Calculate moment maps (Integrated Intensity, Velocity Field, Velocity Dispersion) and create tiled channel maps.

Channel Map

3. Interactive P-V Diagram

Interactively draw extraction paths — straight lines, polylines, smooth spline curves, and elliptical arcs — to generate Position-Velocity (P-V) diagrams instantly.

PV Diagram

4. Spectrum Analysis

Extract spectra from a single pixel or calculate the average spectrum within selected regions (Circle, Rectangle, Ellipse, Cube).

Spectrum

5. Publication-Quality Figures

Generate publication-quality figures directly from the GUI.

  • Contours: Overlay customizable contours with adjustable levels. Contours can also be loaded from another FITS file with a live preview; the dialog shows data range/rms, lets you generate linear Min/Max/Steps levels or edit the Levels field directly, and aligns the resulting contours through the source WCS so images on different grids can be compared without regridding. Double-click an imported overlay in the contour panel to re-edit its levels.
  • Markers: Annotate images with symbols, lines, and text.
  • Beam Size: Visualize the HPBW ellipse.
  • Vector Export: Save plots in PDF, EPS, or SVG formats.

Contour Plot

Other Tools

  • Regridding: Resample data to a new grid, different coordinate system, or a FITS template.
  • Smoothing: Apply Gaussian/Boxcar spatial smoothing and Hanning smoothing along the velocity axis.
  • Masking: Apply threshold-based or external masks to data.
  • Cutout: Crop data cubes based on regions or coordinate ranges.
  • Image Arithmetic: Perform mathematical operations between FITS cubes or with constants using numpy-like expressions.
  • Unit Conversion: Convert spectral or intensity units for analysis.
  • Baseline Subtraction: Fit and subtract spectral baselines from data cubes.
  • Clump Finding: Identify structures using ClumpFind, FellWalker, Dendrogram, and SCIMES (dendrogram clustering) algorithms.

Research use

If you use this software in scientific publications, please cite the Zenodo DOI:

https://doi.org/10.5281/zenodo.18328843

For a specific release, cite the version DOI listed on Zenodo.

Algorithm Citations

The tools below implement established analysis algorithms. If you use them for your analysis, please cite the original papers:

Clump Finding

Cite the paper corresponding to the algorithm you used:

  • ClumpFind — Williams, J. P., de Geus, E. J., & Blitz, L. (1994). Determining structure in molecular clouds. The Astrophysical Journal, 428, 693-712. doi:10.1086/174279
  • FellWalker — Berry, D. S. (2015). FellWalker-A clump identification algorithm. Astronomy and Computing, 10, 22-31. doi:10.1016/j.ascom.2014.11.004
  • Dendrogram — Rosolowsky, E. W., Pineda, J. E., Kauffmann, J., & Goodman, A. A. (2008). Structural Analysis of Molecular Clouds: Dendrograms. The Astrophysical Journal, 679(2), 1338-1351. doi:10.1086/587685
  • SCIMES (Dendrogram clustering) — Colombo, D., Rosolowsky, E., Ginsburg, A., Duarte-Cabral, A., & Hughes, A. (2015). Graph-based interpretation of the molecular interstellar medium segmentation. Monthly Notices of the Royal Astronomical Society, 454(2), 2067-2091. doi:10.1093/mnras/stv2063 — a modified copy is bundled under takefits/logic/scimes/ (BSD 3-Clause).

Masking / Moment Analysis

  • Rosolowsky, E., & Leroy, A. (2006). Bias-free Measurement of Giant Molecular Cloud Properties. Publications of the Astronomical Society of the Pacific, 118(842), 590-610. doi:10.1086/502982
  • Dame, T. M. (2011). The Technique of Velocity-Resolved Moment Masking. arXiv e-prints, arXiv:1101.1499. arXiv:1101.1499

Contact

shunya_at_kanagawa-u.ac.jp

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

takefits-0.3.4.tar.gz (848.9 kB view details)

Uploaded Source

Built Distribution

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

takefits-0.3.4-py3-none-any.whl (903.6 kB view details)

Uploaded Python 3

File details

Details for the file takefits-0.3.4.tar.gz.

File metadata

  • Download URL: takefits-0.3.4.tar.gz
  • Upload date:
  • Size: 848.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for takefits-0.3.4.tar.gz
Algorithm Hash digest
SHA256 698fbec8225808038ede4372dd91e68bef2b2c6a642b8affb3964eb2862b16f1
MD5 b71fd2d1e5079ea47ad220e14efa45f3
BLAKE2b-256 de8974b36bdc6f2c8090e08fec400ad5eccad161426e2a8fdbaf28cf2ca2db58

See more details on using hashes here.

Provenance

The following attestation bundles were made for takefits-0.3.4.tar.gz:

Publisher: publish.yml on s-takekawa/takefits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file takefits-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: takefits-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 903.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for takefits-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d66233ef4c46155bf5d73c0a79f61429c14a267b3d3d89bc52a9cabb71ad0be0
MD5 867589c65a23e7b122d12a93409838b1
BLAKE2b-256 d6f241f65a69feb8f3c5b2de67fe5b0117ca6c05cdc51f400c867f32c70bd7cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for takefits-0.3.4-py3-none-any.whl:

Publisher: publish.yml on s-takekawa/takefits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page