Skip to main content

libpyvinyl - The python APIs for Virtual Neutron and x-raY Laboratory

CI Documentation Status DOI

Overview

GitHub repository

Installation instructions here

Requires:

python >= 3.8

Simulations provide invaluable insights to plan (before) and understand (after) experiments at neutron and X-ray facilities. A wide set of libraries and programs is already available to simulate neutron and X-ray beams, propagate them through the beamlines, interact with the sample and get data acquired by detectors.

The aim of libpyvinyl is to provide a high level neutron and X-ray simulation API. With this harmonized user interface we achieve seamless interoperability of individual simulations thereby facilitating the concatenation of simulation steps into a simulation pipeline. The vast differences with respect to parameter names, unit conventions, configuration syntax, i.e. the user interface, is, hence, overcome creating a libpyvinyl compliant API for each simulation software.

Software specific APIs based on libpyvinyl

The python package libpyvinyl provides a way to harmonize the user interfaces of such simulation codes. It is an object oriented library; its classes define the user interface to simulation codes, simulation parameters and simulation data.

For a given simulation code, e.g. propagation of neutron or photon beams through a beamline, a new class would have to be defined that derives from the libpyvinyl classes. This derived class requires the implementation of certain methods meant to configure a simulation, launch the simulation code, and retrieve the output data. Since the interplay between parametrization, execution, and IO is already taken care of at the level of libpyvinyl's base classes, the effort to define a specialized interface (parameters, backengine and data object) for a new simulation code is rather minimal. This structure allows integrating simulation codes into simulation pipelines in the above sense.

What the libpyvinyl API offers

This API offers a homogeneous interface to:

  • Configure a simulation.
  • Launch the simulation run.
  • Collect the simulation output data.
  • Construct a Data instance that represents the simulation output data.
  • Snapshoot a simulation by dumping the object to disk.
  • Reload a simulation run from disk and continue the run with optionally modified parameters.

Who should use this library

Three kind of users are the target of this package:

  1. developers of packages based on libpyvinyl offering new calculators for simulations
  2. users wishing to run a simulation giving some inputs and retrieving the results
  3. research facility experts that what to implement detailed simulation of existing instruments at their facility or willing to design new ones

libpyvinyl projects

There are currently two projects based on libpyvinyl:

Documentation

Documentation can be generated as follows using sphinx:

cd doc/
pip install requirements.txt
make html

Development guide

Please find the development guide here.

Acknowledgement

This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 823852.

Release files for libpyvinyl 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libpyvinyl 1.4.0
File Size Uploaded
libpyvinyl-1.4.0.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libpyvinyl 1.4.0
File Interpreter ABI Platform
libpyvinyl-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.0 kB

Release files / libpyvinyl-1.4.0.tar.gz

Download URL libpyvinyl-1.4.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8e3f05590705ad5a0ac1c671517fc68ba99036a8cb70edecb207eab20b98fd0d
BLAKE2b-256 checksum
How to use checksums
706fc55000add9d9577e921c8a755f9b6556a462fb2b86318f60b7d0f90f6986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.

Transparency log

Release files / libpyvinyl-1.4.0-py3-none-any.whl

Download URL libpyvinyl-1.4.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ca6eefbe390c3a9dbcca15796260178e6915103c8c9348424351c01fedd6fb3
BLAKE2b-256 checksum
How to use checksums
61bd44972d30e20590a1dac095e4c282a885aa871d283a092a81c762dfbe4202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.0

2 release files

0.1.0

2 release files

0.0.2

1 release file

0.0.1

1 release file

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