Skip to main content

A TUI for browsing Analyzer4D data stream files

Project description

Spectr

A terminal user interface (TUI) for browsing, previewing, and managing data files created by QASS Analyzer4D software.

Demo recording showing file preview functionality

Demo using the catppuccin-mocha theme

Features

  • Browse and preview Analyzer4D data files directly in your terminal
  • Customizable table columns and sorting
  • Multiple plot marker styles with configurable downsampling
  • Flexible file filtering with glob and regex patterns
  • Theming support

Installation

Install Spectr as a standalone tool using uv:

uv tool install spectr

Or run it directly without installing:

uvx spectr --help

Usage

By default, Spectr scans the current working directory recursively for files matching Analyzer4D's standard naming conventions:

spectr

To scan a specific directory:

spectr --path /path/to/data

To use custom file patterns:

spectr --glob-pattern "*.dat" --regex-pattern "your_pattern"

Note: Scanning directories with many files may take some time.

Configuration

Spectr uses a TOML configuration file located at ~/.config/spectr/config.toml.

Example Configuration

[table]
columns = ["process", "compression_time", "compression_frq", "avg_time", "avg_frq"]
build_batch_size = 1000

[table.sort]
attribute = "process"
order = "ASC"  # or "DESC"

[plot]
marker = "braille"           # options: "braille", "fhd", "hd", "dot"
displayed_datapoints = 1000
downsampling = "lttb"        # options: "lttb", "max_bucket"

[stats]
attributes = [
  "project_id", "directory_path", "filename", "process", "channel",
  "datamode", "datakind", "datatype", "process_time", "process_date_time",
  "db_header_size", "bytes_per_sample", "db_count", "full_blocks",
  "db_size", "db_sample_count", "frq_bands", "db_spec_count",
  "compression_frq", "compression_time", "avg_time", "avg_frq",
  "spec_duration", "frq_start", "frq_end", "frq_per_band",
  "sample_count", "spec_count", "adc_type", "bit_resolution",
  "fft_log_shift", "streamno", "preamp_gain", "analyzer_version", "partnumber"
]

[metadata_cache]
sync_recursive = true   # currently unused
persist_cache = false

[display]
filesize_unit = "binary"    # options: "binary", "decimal"

All table.columns and stats.attributes values correspond to attributes from the qass.tools.analyzer.buffer_metadata.BufferMetadata object.

Contributing

Contributions are welcome! The current focus is on improving core features—preview, filtering, and copying—to make them more user-friendly and robust. If you have ideas for improving the user experience, please open an issue.

Roadmap

  • Async or paginated table creation (large query results currently cause temporary unresponsiveness)
  • Improved copy screen UX
    • Text input for path entry
    • Preselect current working directory in directory tree
    • Async conflict calculation
  • Persist selected theme

License

GNU Lesser General Public License v3.0

Acknowledgments

Built on top of qass-tools-analyzer by QASS GmbH, which provides the core functionality for reading and organizing Analyzer4D files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectr-0.6.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectr-0.6.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file spectr-0.6.0.tar.gz.

File metadata

  • Download URL: spectr-0.6.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spectr-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8b585f180dd1063886f95e3ca91a3654ead69f33fea0cd563cd631aaf8c2c244
MD5 5a152a0a3af74ade8a1371571b4db46b
BLAKE2b-256 dd677f33d2626ca393f16f5384c28d47835a4a26a997f5fb2dec18bd03a52d93

See more details on using hashes here.

File details

Details for the file spectr-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: spectr-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for spectr-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a84284d23d12a710d1558b5e470913f46cd1fffdb58dae97613f77092f1991
MD5 8581572055def28d148eb70429789b00
BLAKE2b-256 7d8d6df1a33beb847330b35c3e5748341a9731b0a4ae4a99a262b711cfef1770

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page