Skip to main content

A Python library for working with the pivmeta ontology.

Project description

pivmetalib

Tests Codecov Python Versions PyPI Version License: MIT Documentation

A Python library and high-level interface to work with the pivmeta ontology. It allows you to describe PIV recordings, software, hardware and other related entities in a state-of-the-art and scientifically compliant way.

The library depends on ontolutils, which provides the object-oriented interface to the ontology and the JSON-LD serialization.

🚀 Quick Start

Install the package and create your first PIV metadata in minutes:

pip install pivmetalib
from pivmetalib import pivmeta, prov

# Describe PIV software
software = pivmeta.PIVSoftware(
    author=prov.Organization(
        name='OpenPIV',
        url='https://github.com/OpenPIV/openpiv-python',
    ),
    description='OpenPIV is an open source Particle Image Velocimetry analysis software',
    softwareVersion="0.26.0a0",
    hasDocumentation='https://openpiv.readthedocs.io/en/latest/',
)

# Export to JSON-LD for FAIR data sharing
print(software.serialize("jsonld"))

**📚 Want to learn more? ** → Complete User Guide | Examples | API Reference


📖 Table of Contents


🎯 What You Can Do with pivmetalib

For Researchers

  • Document PIV Experiments: Create comprehensive metadata for your recordings, setups, and processing steps
  • FAIR Data Compliance: Export standardized metadata that makes your data findable, accessible, interoperable, and reusable
  • Reproducible Research: Capture complete experimental configurations for scientific reproducibility
  • Data Processing Pipelines: Document complex PIV processing workflows with provenance
  • Tool Interoperability: Enable metadata exchange between different PIV tools
  • Long-term Preservation: Store metadata in standards-compliant formats (JSON-LD, TTL)

💻 Installation

Basic Installation

The package is available on PyPI and can be installed via pip:

pip install pivmetalib

Development Installation

For development or to access additional dependencies:

# Install with test dependencies
pip install pivmetalib[test]

# Install with all optional dependencies
pip install pivmetalib[complete]

# Install from source for development
git clone https://github.com/matthiasprobst/pivmetalib.git
cd pivmetalib
pip install -e .[test]

Verify Installation

import pivmetalib
print(f"pivmetalib version: {pivmetalib.__version__}")

🗺️ User Guide

Choose your path based on your background and goals:

New to PIV Metadata?

  1. Start with Getting Started Tutorial - Learn basic concepts
  2. Describe Your First Recording - Complete dataset workflow
  3. PIV Processing with OpenPIV - Processing pipeline documentation
  4. Result File Documentation - Publishing your results

Key Features

Comprehensive PIV Metadata

  • Hardware Description: Digital cameras, lasers, optical components, objectives
  • Software Documentation: PIV analysis tools, processing parameters, version control
  • Experimental Setups: Virtual and experimental configurations
  • Processing Pipelines: Complete PIV analysis workflows with provenance

Data Quality Management

  • Flag Schemes: Flexible flag system for data quality indicators
  • Validation: Built-in type checking and constraint validation
  • Standard Names: Integration with PIV standard name tables for consistent terminology

Format Flexibility

  • Multiple Exports: JSON-LD, Turtle (TTL), XML serialization
  • Namespace Support: Integration with schema.org, PROV, DCAT, M4I ontologies
  • Query Capabilities: SPARQL queries and data retrieval from JSON-LD files

FAIR Compliance

  • Findable: Rich metadata with standardized identifiers
  • Accessible: Multiple export formats for different tools
  • Interoperable: Ontology-based approach for data exchange
  • Reusable: Complete provenance and documentation

💡 Examples

🚀 Quick Examples

Describe PIV Software:

from pivmetalib import pivmeta, prov

software = pivmeta.PIVSoftware(
    author=prov.Organization(name='OpenPIV'),
    softwareVersion="0.26.0a0",
    description='Open source Particle Image Velocimetry analysis software'
)

Export to Different Formats:

# JSON-LD
jsonld_data = software.serialize("jsonld")

# Turtle (TTL)  
ttl_data = software.serialize("ttl")

# XML
xml_data = software.serialize("xml")

Query Existing Metadata:

from ontolutils import query
from pivmetalib.pivmeta import PIVSoftware

# Find all PIV software in a file
software_list = query(cls=PIVSoftware, source='metadata.jsonld')

📄 License

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


🙏 Acknowledgments

Project details


Download files

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

Source Distribution

pivmetalib-3.1.0.1.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pivmetalib-3.1.0.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file pivmetalib-3.1.0.1.tar.gz.

File metadata

  • Download URL: pivmetalib-3.1.0.1.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for pivmetalib-3.1.0.1.tar.gz
Algorithm Hash digest
SHA256 640b1ca3605977d753e9d8e5f9fd28cf5da40c13919ef418ac7f48971f47f15d
MD5 a4009a2ab6cf12c87f3c1cff39b69134
BLAKE2b-256 ff6261cfa2e0b883fd2ab8c0cd0f033c2184f8348345a133331b6913745711f3

See more details on using hashes here.

File details

Details for the file pivmetalib-3.1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pivmetalib-3.1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for pivmetalib-3.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e48fe4dd6a4494de7977b8c114654b6d5f2e4f46ddcb35e9e7545c0bde62be76
MD5 68abdf85d3425e8d0fd419aab63188e2
BLAKE2b-256 474cfc5a337c76c62de4a57d9dc3bcf737db65aee20cc98aba7a885c70dd0f65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page