xmds2tools


Namexmds2tools JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryTools to read .hdf5 and .xsil files generated using XMDS2 and functions to implement Bessel transformations and Bessel quadrature integration
upload_time2023-08-02 20:09:40
maintainer
docs_urlNone
author
requires_python>=3.5
licenseMIT License Copyright (c) 2023 Craig Chisholm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords xmds2 hdf5 bessel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # xmds2-tools
Tools to read .hdf5 and .xsil files generated using [XMDS2](http://xmds.org) 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](https://www.hdfgroup.org/solutions/hdf5/) 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](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.013283) 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](http://xmds.org')

* `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](https://pypi.org/project/xmds2tools/1.0.1/)

* `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](https://www.icfo.eu/) 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*](https://doi.org/10.1016/j.cpc.2012.08.016). 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*](https://doi.org/10.1103/PhysRevResearch.3.013283). Physical Review Research **3**, 013283 (2021).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "xmds2tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "XMDS2,HDF5,Bessel",
    "author": "",
    "author_email": "Craig Chisholm <craig.chisholm@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1f/96/79bbb0657921e3a35f0877ae99ee0f463562c146b204cabf247ee7fcbcdc/xmds2tools-1.0.1.tar.gz",
    "platform": null,
    "description": "# xmds2-tools\nTools to read .hdf5 and .xsil files generated using [XMDS2](http://xmds.org) and functions to implement Bessel transformations and Bessel quadrature integration\n\nThese tools were built to work with the output files generated by XMDS2 but can be used for other purposes.\n\nThe function `reader.ReadH5` reads any [HDF5 file](https://www.hdfgroup.org/solutions/hdf5/) and returns the contents as a Python dictionary. Likewise, `reader.WriteH5` takes a Python dictionary and saves the contents as an HDF5 file.\n\nXMDS2 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.\n\nThe `bessel.py` module is based on [Numerical calculation of dipolar-quantum-droplet stationary states](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.013283) and implements Bessel quadrature integration and numerical radial derivative in cylindrical coordinates.\n\n## Examples\nThe `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.\n\nNone of the examples or any of the XMDS2 source code is reproduced here and the user is instead refered to the [XMDS2 website](http://xmds.org')\n\n* `examples/groundstate_workedexamples.py` corresponds to the continuous renormalisation groundstate example.\n* `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`\n* `examples/bessel_integration.py` compares convergence when integrating using the trapezium method and by Bessel quadrature\n\n## Installation\n\n### Install from [PyPI](https://pypi.org/project/xmds2tools/1.0.1/)\n\n* `python -m pip install xmds2tools`\n\n### Build from source\n* `python -m pip install --upgrade pip setuptools`\n* `python -m pip install build`\n* `git clone https://github.com/CSChisholm/xmds2-tools`\n* `cd xmds2-tools`\n* `python -m build`\n\n## Acknowledgements\n\nThese functions were written and tested during the PhD project of C. S. Chisholm at [ICFO - The Institute of Photonic Sciences](https://www.icfo.eu/) under the supervision of Prof. Dr. Leticia Tarruell and with support from Dr. Ram\u00f3n Ramos.\n\nThanks to Prof. P. B. Blakie, Dr. M. T. Johnsson, and Prof. M. J. Davis for advice.\n\n## References\n\n1. G. R. Dennis, J. J. Hope, and M. T. Johnsson, [*XMDS2: Fast, scalable simulation of coupled stochastic partial differential equations*](https://doi.org/10.1016/j.cpc.2012.08.016). Computer Physics Communications **184**(1), 201-208 (2013).\n2. A.-C. Lee, D. Baillie, and P. B. Blakie, [*Numerical calculation of dipolar-quantum-droplet stationary states*](https://doi.org/10.1103/PhysRevResearch.3.013283). Physical Review Research **3**, 013283 (2021).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Craig Chisholm  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Tools to read .hdf5 and .xsil files generated using XMDS2 and functions to implement Bessel transformations and Bessel quadrature integration",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/CSChisholm/xmds2-tools"
    },
    "split_keywords": [
        "xmds2",
        "hdf5",
        "bessel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43b14f9450d4735472ad0279632a6b1eae44801b1c1049ad71cb58e6090dc2e5",
                "md5": "c75fb3ca97389302c3a0d9ae8f8c150b",
                "sha256": "4c2f6155d5497253c7012339076d4c761fca909465b656f4ad5095ba6787fceb"
            },
            "downloads": -1,
            "filename": "xmds2tools-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c75fb3ca97389302c3a0d9ae8f8c150b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 9810,
            "upload_time": "2023-08-02T20:09:38",
            "upload_time_iso_8601": "2023-08-02T20:09:38.322646Z",
            "url": "https://files.pythonhosted.org/packages/43/b1/4f9450d4735472ad0279632a6b1eae44801b1c1049ad71cb58e6090dc2e5/xmds2tools-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f9679bbb0657921e3a35f0877ae99ee0f463562c146b204cabf247ee7fcbcdc",
                "md5": "f64e2c53ce9f29cdc5a75d9ab475673f",
                "sha256": "a8d7fd737257b1d0909270d6dcb568eea1ef72899953a9b90728eeb191c90c4d"
            },
            "downloads": -1,
            "filename": "xmds2tools-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f64e2c53ce9f29cdc5a75d9ab475673f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 11870,
            "upload_time": "2023-08-02T20:09:40",
            "upload_time_iso_8601": "2023-08-02T20:09:40.069493Z",
            "url": "https://files.pythonhosted.org/packages/1f/96/79bbb0657921e3a35f0877ae99ee0f463562c146b204cabf247ee7fcbcdc/xmds2tools-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-02 20:09:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CSChisholm",
    "github_project": "xmds2-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xmds2tools"
}
        
Elapsed time: 0.10010s