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.6.tar.gz (14.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.3.6-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: precitec_data_parser-0.3.6.tar.gz
  • Upload date:
  • Size: 14.4 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.6.tar.gz
Algorithm Hash digest
SHA256 e51074b746d9ffe3aebc851d010f7b8731a90ba040007deeda38a352733ddc39
MD5 9daa6f08f37c77886648085fd1fd9c88
BLAKE2b-256 f48ef7bdd0d24947d36103fafbff377bc9044c0f060c82f1a0c6c0cfc0322c0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for precitec_data_parser-0.3.6.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.6-py3-none-any.whl.

File metadata

File hashes

Hashes for precitec_data_parser-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dd58a138db31e372c771190c35d50d1698dc74688650855c381cb8368c4eb689
MD5 478ef9ac5b0c4249b4b6b6bbd8560c22
BLAKE2b-256 e4208591faf451ee8a670ada549233ac98128a95e1ca82787db55b6bde5ac1e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for precitec_data_parser-0.3.6-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

This release

0.3.6 This release

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

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