mmt_dipole_cuboid_inversion.tools#

Submodules#

Package Contents#

Functions#

CuboidDecomposition(fn, fnout[, format_output])

Perform cuboid aggregation decomposition of pixel data from a text file

mmt_dipole_cuboid_inversion.tools.CuboidDecomposition(fn, fnout, format_output=False)#

Perform cuboid aggregation decomposition of pixel data from a text file

Parameters:
fn

Text file with 4 columns: index, x, y, z. First row is skipped. The data is in integer format, which represent the index and pixel coordinates. Column headers can have any name but should be in order.

fnout

File name for output CSV text file with cuboid decomposition.

format_output

If False, the output file contains the lower and upper corners defining the cuboids in pixel coordinates (pixel centers). If True, the output contains the center coordinates of every cuboid, half the cuboid lenghts in every spatial dimension and the indexes as x, y, z, dx, dy, dz, index