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.1.0.tar.gz (13.6 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.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for precitec_data_parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76dcb0c5ab490a6a7bc3a49324313dda73f1244dd7c76acae99bbb53133005c6
MD5 01b8efb41011e4338b2fc7f6fc8e7d59
BLAKE2b-256 4d88256fcf0a31b47d9652a1ce2f9513d66d55a2fca006d6cbf9f599f69977fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for precitec_data_parser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 716953fd685953f7aeee290ffd6bb725be966ec0bb38f59d4ef202976bf2060b
MD5 bd3769308128169f29a9b9731445324e
BLAKE2b-256 4371c80d9fbe44fddf88f9d52a9c6a83139a05e8f6bdb608cd160fa6887e1ad2

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

0.3.2

2 files

0.3.0

2 files

0.1.1

2 files

This release

0.1.0 This release

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