pyZeeTom - A Python Zeeman Tomography Tool
I’ve developed pyZeeTom, a comprehensive Python-based Zeeman Tomography tool designed for the inversion and forward modeling of 4 Stokes parameters (I, Q, U, V) polarization spectra.
Project Overview
pyZeeTom addresses several key astrophysical scenarios:
- Central Object & Circumstellar Matter: Models a central object surrounded by circumstellar matter (dust clumps, disks, planets, small bodies) in rigid body or differential rotation.
- Phase Observation: Explores different viewing angles through phase changes caused by the object’s rotation.
- Multi-channel Observation: Processes polarization spectra of Stokes I, V, Q, and U components for each observation phase.
- Dual Working Modes: Supports both forward modeling and MEM (Maximum Entropy Method) inversion.
Key Features
The tool provides a robust framework with:
- Multi-format Support: Compatible with various observation data formats (LSD/spec/pol/I/V/Q/U).
- Flexible Line Models: Built-in weak-field Gaussian Zeeman line profiles with support for custom spectral line models.
- Advanced Grid System: Annular/Disk grid supporting both rigid body and differential rotation.
- Velocity Space Integration: Synthesizes global Stokes spectra through velocity space integration.
- Time Evolution: Supports disk structure evolution (e.g., shearing of clumps) due to differential rotation.
- Automatic Phase Calculation: Calculates observation phase automatically based on JD, JD₀, and period.
- Extensible Architecture: Designed for easy extension of inversion and optimization modules.
Technical Foundation
The project is built on the tomography method described by Donati et al. (2001), using the Skilling & Bryan (1984) Maximum Entropy Method (MEM) algorithm as the optimization engine. The Python implementation of the MEM method is developed based on Folsom et al. (2018) implementation in the ZDI code ZDIpy.
An optimized MEM Python module was developed to handle the inversion process efficiently, and it can be easily extended to other inversion problems in astrophysics.
Quick Start
Running Forward Synthesis
from pyzeetom import tomography
# Forward modeling
results = tomography.forward_tomography('input/params_tomog.txt', verbose=1)
Running MEM Inversion
from pyzeetom import tomography
# MEM inversion
result = tomography.inversion_tomography('input/params_tomog.txt', verbose=1)
For detailed examples and tutorials, check the examples/ directory in the repository.
Physical Parameters
The tool gives precise control over:
- Core Stellar Parameters: Rotation rate (vsini), inclination angle, rotation period, and differential rotation properties
- Physical Scale & Grid Definition: Stellar mass, radius, and circumstellar matter distribution
- Line Model Parameters: Stokes component configurations and Zeeman sensitivity
- Instrument Settings: Spectral resolution, line parameters, and velocity grid definitions
- Observation Sequence: Heliocentric Julian Dates and radial velocity corrections
Documentation
For detailed architecture, data flow, and comprehensive module descriptions, please refer to the ARCHITECTURE documentation on GitHub.
Enjoy Reading This Article?
Here are some more articles you might like to read next: