Skip to content

KOLANICH-physics/NTMDTRead.py

Repository files navigation

NTMDTRead

wheel (GHA via nightly.link) wheel (GitLab) PyPi Status GitLab Build Status GitLab Coverage GitHub Actions Libraries.io Status Code style: antiflash

An unofficial set of tools to read the files produced by NT-MDT® software.

Different parts of this module are licensed differently. See ./.reuse/dep5 for more info.

  • .NTMDTReader - Reads .mdt file format. Not very ready: some files are not read at all, some are read incorrectly, some frames are not yet implemented. But for large share of files it works pretty fine. Since it is based on the Kaitai Struct description reverse-engineered from gwyddion implementation, it is licensed on the terms of GNU General Public License v3. I'm sorry for that I'm too lazy to black box reverse engineer it from scratch entirely.

  • .colors - Reads .pal palette files and transforms them into matplotlib colormaps. Also allows transforming matplotlib colormaps into NT-MDT format for using them in the original software. The format parsing code is based on the Kaitai Struct description. This submodule license is Unlicense. Unlicensed work.

  • .palettes - A convenient importer for palettes. You may prefer to use it instead of colors.

from NTMDTRead.palettes.Rainbows import Rainbow1
from NTMDTRead.palettes import Rainbows
import NTMDTRead.palettes.Rainbows

The names under NTMDTRead.palettes. are the names of *.pal files, and the names under them are the names of palettes in files. Its license is Unlicense. Unlicensed work.