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.1.tar.gz (13.4 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.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: precitec_data_parser-0.1.1.tar.gz
  • Upload date:
  • Size: 13.4 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.1.1.tar.gz
Algorithm Hash digest
SHA256 15365c21fadad6c19491ebf497f368e3f4fb9b515b9bb4a31c4f5b5578a4efe0
MD5 2a09835ac5d0a898755da582613ea981
BLAKE2b-256 e34db68731c823c8e8aacc99ac03dfdbe29ed2c07d1bc81732a1fb617daa447a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for precitec_data_parser-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0a5896758a3b98823ff1d98df928a000597826d1f044a0ba89354b2936f171
MD5 f15df1ddd68b29697dd33514fa51c0ec
BLAKE2b-256 31b76eead59cf743000cfac0f4ba283cbf9747559061e499f6f6e7ed1749b5f9

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

This release

0.1.1 This release

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