Skip to main content

Precitec Data Parser

Python Version License: MIT

Parse and analyze height-map exports from Precitec CLS2 sensors (.csv and .bcrf), with tools for 3D surface and profile analysis.

⚠️ Disclaimer

This package is NOT officially supported by Precitec. It is an independent project. Please do not contact Precitec for support or questions about this library. For issues, feature requests, or questions, please use the GitHub Issues on this repository instead.

Features

  • PrecitecData - parses .csv and .bcrf exports into height (z) and coordinate (x, y) arrays plus metadata, transparently handling multi-line tile stitching and reversed sweep lines.
    • plot_data() - 2D height-map plot with a colorbar.
    • to_surface() - converts to a surfalize.Surface, filling non-measured points.
  • PrecitecSurfaceAnalyzer - 3D surface and profile analysis on top of PrecitecData, backed by surfalize.
    • roughness_parameters() / height_parameters() - ISO 25178 areal parameters (Sa, Sq, Sz, Sdr, ...).
    • horizontal_profile() / vertical_profile() / oblique_profile() - extract 1D profile cuts (with a bug fix for oblique profiles on anisotropic pixel grids) and their ISO 4287 parameters (Ra, Rq, Rz, ...).
    • filter_profile() - Gaussian low/high/bandpass smoothing or Hampel outlier removal on a profile.
    • plot_3d(), plot_2d(), plot_profile() - shaded 3D rendering, top-down 2D map, and profile plots (with the cut line overlaid on the 2D map).

Installation

Install from PyPI:

pip install precitec-data-parser

Or from source:

git clone https://github.com/yourusername/precitec-data-parser.git
cd precitec-data-parser
pip install -e .

Requires Python >=3.13.

Quick Start

from precitec_data_parser import PrecitecData, PrecitecSurfaceAnalyzer

# Load and visualize a measurement
with PrecitecData("measurement.csv") as data:
    data.plot_data(show=True)
    
    # Analyze surface topology
    analyzer = PrecitecSurfaceAnalyzer(data)
    print(analyzer.height_parameters())
    
    # Extract and filter profiles
    profile = analyzer.horizontal_profile(y=data.y[len(data.y) // 2])
    filtered = analyzer.filter_profile(profile, filter_args={"cutoff": 50})
    analyzer.plot_profile(profile, filtered=filtered, show=True)

Examples

See tests/test_parser.py for a comprehensive demo of profile extraction, filtering, and 3D visualization.

Supported Formats

  • .csv - Precitec CLS2 CSV exports (text-based, supports multi-line stitching)
  • .bcrf - Precitec binary height-map format (faster parsing)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Maxime Leurquin (maxime.leurquin@gmail.com)

Download files

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

Source Distribution

precitec_data_parser-0.3.2.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.

precitec_data_parser-0.3.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file precitec_data_parser-0.3.2.tar.gz.

File metadata

  • Download URL: precitec_data_parser-0.3.2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for precitec_data_parser-0.3.2.tar.gz
Algorithm Hash digest
SHA256 cd98448fd9b2ff3167ea4c95df666a151790739500cc38a4d767566b813d2563
MD5 5dfa27f59872d8ff6ee4eec4da743b0b
BLAKE2b-256 04568e1df7636dc17a5659b27a1ae9cb4acc763a04c4a10d396d94e1a9c54d1d

See more details on using hashes here.

File details

Details for the file precitec_data_parser-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for precitec_data_parser-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d8728a6fee0d3eb5ebf280a40d905fca9b721625f1305d4149d583a990e185e
MD5 81319791207be00eb1dd21cbbf94129b
BLAKE2b-256 dd289826450a2991b3a2682f04bfe3369ee355d06630f1f29c401ad0ffcb9287

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.10

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

This release

0.3.2 This release

2 files

0.3.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page