coconut_tools.tomography

Compare Coconut Tomography with Tomographic Inversion

This script provides functions to compare a 3D MHD simulation result from COCONUT with tomography-based electron density maps. It reads a .vtu simulation file and a tomography .dat file, performs interpolation, identifies the current sheet, and generates comparative visual plots.

Usage:

python tomography.py

Note

Please cite these papers if you plan to use the images or data for your own work.

Morgan 2015: https://iopscience.iop.org/article/10.1088/0067-0049/219/2/23/meta Morgan 2019: https://iopscience.iop.org/article/10.3847/1538-4365/ab125d/meta Morgan 2020: https://iopscience.iop.org/article/10.3847/1538-4357/ab7e32/meta

Functions

compare_tomography_with_simulation(vtufile, ...)

Compare electron density between a COCONUT MHD simulation and a tomographic reconstruction.

line(dens, clt, lon)

Identify the current sheet location based on maximum density per longitude.

coconut_tools.tomography.compare_tomography_with_simulation(vtufile, datfile, output)[source]

Compare electron density between a COCONUT MHD simulation and a tomographic reconstruction.

Parameters:
  • vtufile (str) – Path to the COCONUT output (.vtu).

  • datfile (str) – Path to the tomography .dat file.

  • output (str) – Path to save the output figure.

Return type:

None

Returns:

None

coconut_tools.tomography.line(dens, clt, lon)[source]

Identify the current sheet location based on maximum density per longitude.

Parameters:
  • dens (np.ndarray) – The density map.

  • clt (np.ndarray) – Colatitude array.

  • lon (np.ndarray) – Longitude array.

Returns:

Latitudes where the density peaks for each longitude.

Return type:

list