Skip to main content

xmds2-tools

Tools to read .hdf5 and .xsil files generated using XMDS2 and functions to implement Bessel transformations and Bessel quadrature integration

These tools were built to work with the output files generated by XMDS2 but can be used for other purposes.

The function reader.ReadH5 reads any HDF5 file and returns the contents as a Python dictionary. Likewise, reader.WriteH5 takes a Python dictionary and saves the contents as an HDF5 file.

XMDS2 simulations generate a text file with extension .xsil as well as the HDF5 data. The function reader.ParseXSIL reads the XML data from the text file and returns a dictionary with simulation parameters including global variables, command line variables, and variables derived from global and command line variables. If the Bessel transform is used on an axis a variable called "axis name"Outer is added where "axis name" is the name of the axis defined in XMDS and the value of the variable is the outer radius of the interval defining the grid.

The bessel.py module is based on Numerical calculation of dipolar-quantum-droplet stationary states and implements Bessel quadrature integration and numerical radial derivative in cylindrical coordinates.

Examples

The examples/ folder contains Python scripts demonstrating the use of the reader and bessel modules to analyse the output of some of the XMDS2 examples. The bessel module is also used for quadrature integration and compared to the trapezium method.

None of the examples or any of the XMDS2 source code is reproduced here and the user is instead refered to the XMDS2 website

  • examples/groundstate_workedexamples.py corresponds to the continuous renormalisation groundstate example.
  • examples/bc_groundstate.py corresponds to the imaginary time evolution example using DCT and Bessel transform in the XMDS directory examples/bessel_cosine_groundstate.xmds
  • examples/bessel_integration.py compares convergence when integrating using the trapezium method and by Bessel quadrature

Installation

Install from PyPI

  • python -m pip install xmds2tools

Build from source

  • python -m pip install --upgrade pip setuptools
  • python -m pip install build
  • git clone https://github.com/CSChisholm/xmds2-tools
  • cd xmds2-tools
  • python -m build

Acknowledgements

These functions were written and tested during the PhD project of C. S. Chisholm at ICFO - The Institute of Photonic Sciences under the supervision of Prof. Dr. Leticia Tarruell and with support from Dr. Ramón Ramos.

Thanks to Prof. P. B. Blakie, Dr. M. T. Johnsson, and Prof. M. J. Davis for advice.

References

  1. G. R. Dennis, J. J. Hope, and M. T. Johnsson, XMDS2: Fast, scalable simulation of coupled stochastic partial differential equations. Computer Physics Communications 184(1), 201-208 (2013).
  2. A.-C. Lee, D. Baillie, and P. B. Blakie, Numerical calculation of dipolar-quantum-droplet stationary states. Physical Review Research 3, 013283 (2021).

Metadata

Release files for xmds2tools 1.0.1

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

Source distribution (sdist)

Source distribution for xmds2tools 1.0.1
File Size Uploaded
xmds2tools-1.0.1.tar.gz 11.9 kB Details

Built distribution (wheel)

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

Total release size: 21.7 kB

Release files / xmds2tools-1.0.1.tar.gz

Download URL xmds2tools-1.0.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a8d7fd737257b1d0909270d6dcb568eea1ef72899953a9b90728eeb191c90c4d
BLAKE2b-256 checksum
How to use checksums
1f9679bbb0657921e3a35f0877ae99ee0f463562c146b204cabf247ee7fcbcdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / xmds2tools-1.0.1-py3-none-any.whl

Download URL xmds2tools-1.0.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c2f6155d5497253c7012339076d4c761fca909465b656f4ad5095ba6787fceb
BLAKE2b-256 checksum
How to use checksums
43b14f9450d4735472ad0279632a6b1eae44801b1c1049ad71cb58e6090dc2e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release 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