Skip to main content

Set of utilities to work with PLM record files.

Project description

Charles Javerliat, Sophie Villenave, Pierre Raimbaud, Guillaume Lavoué
IEEE Conference on Virtual Reality and 3D User Interfaces (Journal Track)
Video »Paper »Explore the docs »

PLUME Python is a Python package that allows you to load and extract data from PLUME record files. The package also comes with a set of utilities to simplify the conversion of the data into more commonly used formats in data analysis like pandas dataframe or CSV files. Embedded data such as LabStreamingLayer's samples can be exported to XDF files for external use in tools such as SigViewer, EEGLAB or MoBILAB.

Getting Started

PLUME Python can be installed directly from PyPI (requires Python >= 3.10) using the following command:

pip install plume-python

Basic CLI commands are available for simple operations:

Usage: plume-python [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  export-csv               Export samples from the record to CSV files.
  export-world-transforms  Export world transforms of a GameObject with the given GUID to a CSV file.
  export-xdf               Export a XDF file including LSL samples and markers.
  find-guid                Find the GUID(s) of a GameObject by the given name.
  find-name                Find the name(s) of a GameObject with the given GUID in the record.

For more advanced usage, the package can be imported in a Python script:

import plume_python as plm
from plume_python.utils.dataframe import samples_to_dataframe, record_to_dataframes
from plume_python.samples.unity import transform_pb2
from plume_python.export import xdf_exporter
from plume_python.utils.game_object import find_names_by_guid, find_first_identifier_by_name

# Load a record file
record = plm.parser.parse_record_from_file("path/to/record.plm")

# Find the name(s) of a game object by its GUID
names = find_names_by_guid(record, "4a3f40e37eaf4c0a9d5d88ac993c0ebc")

# Find the identifier (go + transform GUID) of a game object by its name
identifier = find_first_identifier_by_name(record, "MyGameObjectName")

# Get samples of a given type
transform_updates = record.get_samples_by_type(transform_pb2.TransformUpdate)

# Get samples in a given time range (in nanoseconds)
record.get_samples_in_time_range(0, 10_000)

# Get samples of a given type in a given time range (in nanoseconds)
record.get_samples_by_type_in_time_range(transform_pb2.TransformUpdate, 0, 10_000)

# Get sample absolute timestamp (in nanoseconds) since epoch
record.get_sample_timestamp_since_epoch(transform_updates[0])

# Convert samples to a pandas dataframe
transform_updates_df = samples_to_dataframe(transform_updates)

# Convert all samples to pandas dataframes
dataframes = record_to_dataframes(record)
transform_updates_df_2 = dataframes[transform_pb2.TransformUpdate]

# Export samples to a XDF file
with open("path/to/output.xdf", "wb") as xdf_file:
    xdf_exporter.export_xdf_from_record(xdf_file, record)

Please refer to the getting started guide for more information on getting started with PLUME.

Documentation

The full documentation is available at liris-xr.github.io/PLUME/. It includes a detailed description of the installation process, the file format specifications, the usage of the different tools, etc.

Button Docs

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. You can open an issue to report a bug, request a feature, or submit a pull request.

Development setup

Use the following commands to install the package in dev mode and run tests:

# Install the package with dev dependencies
make install
# Running tests locally with pytest
make tests

Contact

Discord server (Recommended) Discord badge

Charles JAVERLIAT - charles.javerliat@gmail.com

Sophie VILLENAVE - sophie.villenave@ec-lyon.fr

Citation

@article{javerliat_plume_2024,
	title = {{PLUME}: {Record}, {Replay}, {Analyze} and {Share} {User} {Behavior} in {6DoF} {XR} {Experiences}},
	url = {https://ieeexplore.ieee.org/document/10458415},
	doi = {10.1109/TVCG.2024.3372107},
	journal = {IEEE Transactions on Visualization and Computer Graphics},
	author = {Javerliat, Charles and Villenave, Sophie and Raimbaud, Pierre and Lavoué, Guillaume},
	year = {2024},
	note = {Conference Name: IEEE Transactions on Visualization and Computer Graphics},
	pages = {1--11}
}

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

plume_python-0.1.14.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

plume_python-0.1.14-py3-none-any.whl (130.5 kB view details)

Uploaded Python 3

File details

Details for the file plume_python-0.1.14.tar.gz.

File metadata

  • Download URL: plume_python-0.1.14.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1022-azure

File hashes

Hashes for plume_python-0.1.14.tar.gz
Algorithm Hash digest
SHA256 b681e029a7fa18e0e23a2f2cdf4665cb410ce0a72e91ca6990cd51740ea01060
MD5 b5322f953ba54e2f9504993391987c25
BLAKE2b-256 999286cd4519079016a2ba0ceb1a4dee81686cec9d46c0cd3d769174b7ea41f7

See more details on using hashes here.

File details

Details for the file plume_python-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: plume_python-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 130.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1022-azure

File hashes

Hashes for plume_python-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 72b51b9720f7933ef68501fa5601e5357b0c92ff1639eabcd9cfd44b88a052e5
MD5 7468e0ed4bd13b639943b9aed068f0e2
BLAKE2b-256 03cf31b81c10506c7222de1d3d41e68a75ce7868a23497e76d7896b7f9c624ab

See more details on using hashes here.

Supported by

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