Fără Descriere

LiuYang b3c12c3169 Initial commit 5 luni în urmă
examples b3c12c3169 Initial commit 5 luni în urmă
scripts b3c12c3169 Initial commit 5 luni în urmă
src b3c12c3169 Initial commit 5 luni în urmă
tests b3c12c3169 Initial commit 5 luni în urmă
.gitignore b3c12c3169 Initial commit 5 luni în urmă
README.md b3c12c3169 Initial commit 5 luni în urmă
RELEASE.md b3c12c3169 Initial commit 5 luni în urmă
mlog_tool_qt.spec b3c12c3169 Initial commit 5 luni în urmă
pyproject.toml b3c12c3169 Initial commit 5 luni în urmă

README.md

Python MLog Tool

Python desktop and CLI tool for parsing Firmament mlog binary files, exporting each bus to CSV, and plotting signals in a Qt GUI.

Features

  • Parse binary mlog files into structured bus data.
  • Export each bus group to an individual CSV file.
  • Inspect and compare signals in a PySide6 + PyQtGraph desktop GUI.
  • Build a platform-native single-file executable with PyInstaller.

Project Layout

python_mlog_tool/
├── README.md
├── pyproject.toml
├── mlog_tool_qt.spec
├── scripts/
│   └── build_qt_exe.sh
│   └── build_qt_exe.ps1
├── examples/
│   └── example_usage.py
├── src/
│   ├── qt_gui_entry.py
│   └── mlog_tool/
│       ├── __init__.py
│       ├── __main__.py
│       ├── cli.py
│       ├── constants.py
│       ├── exporters.py
│       ├── models.py
│       ├── parser.py
│       ├── plotting.py
│       ├── qt_gui.py
│       ├── qt_plot_widget.py
│       ├── services.py
│       └── utils.py
└── tests/
    └── test_parser.py

MATLAB Mapping

  • mlog_parser(logfile) -> MLogParser.parse(log_path)
  • generate_MAT(...) -> CsvExporter.export_all(parsed_log, output_dir)
  • get_param_val(...) -> ParsedLog.get_parameter(group_name, param_name)

Install

Install the base dependencies into the local virtual environment:

uv pip install --python ./.venv/bin/python -e .

Install the Qt GUI dependencies:

uv pip install --python ./.venv/bin/python ".[qt]"

Install the packaging dependency:

uv pip install --python ./.venv/bin/python ".[bundle]"

Run From Source

CLI:

PYTHONPATH=src ./.venv/bin/python -m mlog_tool parse ../mlog16.bin
PYTHONPATH=src ./.venv/bin/python -m mlog_tool export ../mlog16.bin ./csv_output

Qt GUI:

PYTHONPATH=src ./.venv/bin/python -m mlog_tool.qt_gui

Build Executable

Build the Qt GUI into a single executable:

Linux:

./scripts/build_qt_exe.sh

Windows PowerShell:

.\scripts\build_qt_exe.ps1

Output:

dist/mlog-tool-qt
dist/mlog-tool-qt-v0.1.0-linux-x86_64
dist/mlog-tool-qt.exe
dist/mlog-tool-qt-v0.1.0-windows-x86_64.exe

Run it with:

./dist/mlog-tool-qt

Windows:

.\dist\mlog-tool-qt.exe

On first launch, PyInstaller will unpack its runtime files into a temporary directory automatically.

The build script also creates a versioned copy that is convenient for release delivery.

Notes

  • The Qt GUI parses the selected log immediately after opening the file.
  • The generated CSV files are organized one bus per file.
  • src/qt_gui_entry.py exists only as a PyInstaller-friendly GUI entry point for the onefile build.

Release Checklist

  1. Update project.version in pyproject.toml.
  2. Rebuild with ./scripts/build_qt_exe.sh on Linux or .\scripts\build_qt_exe.ps1 on Windows.
  3. Deliver the versioned file from dist/.
  4. Keep the unversioned dist/mlog-tool-qt as the latest local convenience build.