AITW_microstructures
Port of the AITW microstructure generation code from Matlab to Python.
Install
From EESSI
Check the EESSI documentation to see on which version of EESSI the package is available.
Run on a system with EESSI pre-installed or install EESSI on your own system
Load the package from EESSI:
# Follow instructions of your system to initialize EESSI
# For a local/native installation:
# source /cvmfs/software.eessi.io/versions/2023.06/init/lmod/bash
module load EESSI/2023.06 # Or the latest version that has the package available
module load AITW-microstructures
From PyPI
pip install AITW_wood_microstructure
From source (development version)
Download the source code and install it using pip.
cd <PATH to folder with pyproject.toml>
pip install .
Usage
Progamatically
Example for birch microstructure generation.
from wood_microstructure import BirchMicrostructure, BirchParams
params = BirchParams.from_json('FILE_PATH.json')
for param in params:
birch = BirchMicrostructure(param)
birch.run()
CLI
The installation will make available a wood_ms command line interface.
- Run
wood_ms --helpto see the available commands. - Run
wood_ms generate --helpto see all available options for generating microstructures. - Run
wood_ms generate WOOD_TYPE JSON_FILEto generate a microstructure of typeWOOD_TYPEusing the parameters inJSON_FILE.WOOD_TYPEcan be one of:birch,spruce.JSON_FILEis a path to a json file with the parameters for the microstructure generation.
- Run
wood_ms postproc --helpflag to see all available commands for postprocessing.
Example for birch microstructure generation:
wood_ms generate birch examples/example_birch.json
Tab autocompletion
Enabling tab autocompletion https://click.palletsprojects.com/en/stable/shell-completion/
E.G for bash run the command
eval "$(_WOOD_MS_COMPLETE=bash_source wood_ms)"
You can also add it to either ~/.bashrc or, if you are using a virtual environment, to bin/activate of the virtual environment to avoid running the command for every new shell.
NOTE
- W.R.T the matlab code,
saveSlicein the json file can be alist[int]instead of just anintor"all"to work-on/save all slices. - Most functions have been optimized to have the loop over the Z slices as the outermost one. Since the Z slices are almost always treated independently, we can than run the loops over only the slices of interest.
References
Metadata
Release files for AITW_wood_microstructure 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aitw_wood_microstructure-1.2.1.tar.gz | 52.0 kB | Without provenance | Details for aitw_wood_microstructure-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aitw_wood_microstructure-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for aitw_wood_microstructure-1.2.1-py3-none-any.whl |
Total release size: 110.5 kB
Release files / aitw_wood_microstructure-1.2.1.tar.gz
| Download URL | aitw_wood_microstructure-1.2.1.tar.gz |
|---|---|
| Size | 52.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
297dba4cf85017dc69da5e12793449d3e2582c5131f20153560cc11733ed8aeb
|
|
BLAKE2b-256 checksum How to use checksums |
7dbc0fec5e4ccded5e9cca903f9324d7639d4c92dd3b8ba38b933b31e6a7a53a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / aitw_wood_microstructure-1.2.1-py3-none-any.whl
| Download URL | aitw_wood_microstructure-1.2.1-py3-none-any.whl |
|---|---|
| Size | 58.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8f1e03232ab13c50e687bd152d48ce10c8af54cefdc4666024a08c77bbff50f
|
|
BLAKE2b-256 checksum How to use checksums |
e8cfc250fe23dfb901776839d497277c535500133deef67fee1f37c34da6aff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Security for AITW_wood_microstructure 1.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.