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.3.tar.gz (14.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.3.3-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for precitec_data_parser-0.3.3.tar.gz
Algorithm Hash digest
SHA256 6f1b34aa6e01b3aca2650a59965c8ad888e4a4a8db34339b635127a461a93d49
MD5 74df79a10290f92be73f654f730c5103
BLAKE2b-256 945f1c3ec0a2b02319e7d23440f18aca359edcb12933dde3fe4f2878d7dc7fe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for precitec_data_parser-0.3.3.tar.gz:

Publisher: publish-to-pypi.yml on MaxLeurquin-commscope/precitec_data_parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for precitec_data_parser-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fd8cb5fd8d43d359fd22b954cd9ce8cbfa925f0069098c731b0c0ca04a4baed2
MD5 68e50396f6148d59347258bf41b71ea2
BLAKE2b-256 1ac9800ed6177e434afb8dc096f8a3b9431a7dc55735fb1743d28514546d855a

See more details on using hashes here.

Provenance

The following attestation bundles were made for precitec_data_parser-0.3.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on MaxLeurquin-commscope/precitec_data_parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

This release

0.3.3 This release

2 files

0.3.2

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