Repository navigation
FAQ
Short answers to common install, runtime, and “why doesn’t this work?” questions. For concepts (LFI, time slices, pxt), see Key Concepts. For package lists, see Dependencies.
Python ≥ 3.13 (requires-python in the package). Python 3.14 is also tested. On 3.12 or older pip stops with "requires a different Python".
- Windows is what the development team tests day to day (including full local pytest with PyVista/VTK).
- Linux x86_64 runs the test suite in CI (Ubuntu, Python 3.13) without OpenGL/VTK-heavy paths.
-
Linux aarch64 (ARM):
gmshhas no wheel, sopip install upxo[mesh]andupxo[all]fail there.pip install upxo,upxo[viz]andupxo[ebsd]work. - macOS was not run. Every dependency has a wheel for macOS arm64 and x86_64.
The PyPI classifier says “OS Independent,” but treat Windows as the reference platform.
pip install upxoOptional extras:
| Extra | When you need it |
|---|---|
upxo[ebsd] |
DefDAP EBSD import (.ctf / .crc) |
upxo[mesh] |
tetgen / gmsh stack for some mesh paths |
upxo[viz] |
Plotly only — not required for matplotlib/PyVista |
upxo[all] |
All of the above |
Developer / editable:
git clone https://github.com/Design-By-Fundamentals-UKAEA/UPXO.git
cd UPXO
pip install -e .
# or: pip install -e ".[all]"- Confirm the active interpreter:
python -c "import sys; print(sys.executable, sys.version)" - Confirm install:
python -c "import upxo; print(upxo.__version__)" - If you use multiple envs (conda + venv + IDE), the notebook kernel may not match the shell where you
pip installed. - For editable installs, ensure you cloned the repo and installed from its root (
pip install -e .).
Windows limits paths to 260 characters unless long paths are enabled. A file inside the jedi dependency has a long name, so an environment whose site-packages path is about 150 characters or more fails. Create the environment in a shorter path (for example C:\envs\upxo) or enable Windows long paths.
A pip-installed UPXO writes reports, raw exports and Abaqus files under ./data in the working directory. A source checkout writes to <checkout>/data.
netlsd is published only as a source distribution. pip builds it automatically. With --no-build-isolation, install setuptools first.
Use a clean 3.13 venv, upgrade pip, then reinstall:
python -m pip install -U pip setuptools wheel
pip install upxoIf a dependency fails to build from source, prefer official wheels for your platform or a conda-forge stack for binary-heavy packages, then pip install upxo into that env.
Not in the pip package. Clone the repository:
git clone https://github.com/Design-By-Fundamentals-UKAEA/UPXO.git --depth=1Notebooks are in the separate UPXO-demos repository (e.g. gsgen/monte_carlo_2d_01.ipynb). Start there after install — see Getting Started.
MCGS expects a path to a real .xls dashboard:
pxt = mcgs(input_dashboard=r'C:\full\path\to\input_dashboard.xls')- Templates ship under
src/upxo/interfaces/user_inputs/in the git clone (and as package data when installed). - Relative paths depend on the process working directory (notebook cwd ≠ repo root is a common failure). Use an absolute path while debugging.
- Classic dashboards use
xlrd(.xls). Saving as.xlsxonly and pointingmcgsat it may not work with the currentload_uidatapath.
Some notebooks pair with a local .xls dashboard. Open the notebook from that folder or set input_dashboard to the full path of that file.
There is one main MCGS class: from upxo.ggrowth.mcgs import mcgs.
Set dim in the Excel dashboard (2 or 3). Do not look for a separate mcgs3d class for the standard pipeline.
Typical order:
mcgs(...) → simulate() → detect_grains() → then char_morph / export
If you characterise or plot before detect_grains(), the LFI may be missing or stale. After detection, properties come from char_morph_2d (2D) or the 3D morphology APIs — see Key Concepts.
- Domain size and MCS count dominate cost (especially 3D).
- Start with small dashboards (
demo_3d_06_20x20x20…, 50×50 2D test sheets). - Algorithm choice (
mcalg200/201/202 or 300a/300b/…) and Q also matter. - First Numba call can JIT-compile and look “stuck”; later runs are faster.
Multi-algorithm “hops” in the dashboard are not a fully supported 2D path (start_algo2d_with_hops is not implemented). Prefer a single mcalg for production runs. See generation wiki pages.
-
Canonical name going forward:
LFI/lfi(labelled feature image). -
lgi(labelled grain image) is deprecated but still used on many objects (gs.lgi). - Other historical/case names include
cfi(cell feature index).
New code and docs should prefer LFI. Details: Key Concepts.
- Install the extra:
pip install upxo[ebsd](pinsdefdap==0.93.6). - Supported formats: Oxford
.ctfand.crcviaEBSDReader— not a general “any CIF/HDF5” importer. - DefDAP often wants the path without forcing a double extension; follow
EBSDReader.from_file/loaddocs. - Without DefDAP installed, import errors are expected at first EBSD use.
See Data I/O.
- PyVista (VTK) is a core dependency; it needs a working OpenGL/display stack.
- Headless Linux CI does not run full VTK paths; local Windows is the reference.
- In Jupyter, ensure a backend that can show interactive widgets if you use notebook plotting.
- For 2D, fall back to
matplotlib/gsviz.see_mapif 3D display is broken.
No for standard UPXO plots. Core includes matplotlib and PyVista.
[viz] only adds Plotly, which is not the main upxo.viz path today.
3D conformal tet pipeline uses gmsh (and related stack). Install gmsh for your platform and ensure the Python gmsh module is importable. See Meshing.
Twin / FM / conformal exporters write partitioned INP files. 07_interactions and 08_steps_output (or equivalents) are often stubs — you must edit BCs, steps, and outputs before submitting a job. Warnings at export time are intentional. See Data I/O.
Package directories under interfaces/damask, moose, dream3d are empty stubs. Do not expect working exporters there. Use NumPy/VTK/Abaqus paths that are implemented.
ArrExp2d can write .h5 / .hdf5 if h5py is installed. It is not a declared UPXO optional extra — install h5py yourself if needed.
Correct entry: FMSteel3DBase (chainable pipeline). See FM Steels.
Full twin insertion (introduce_primary_twins, etc.) is meant to be driven by measured twin thickness / volume fraction (and related) targets from EBSD workflows — not arbitrary placeholders. Use demos under. See CuCrZr & OFHC-Cu.
UPXO does not ship alloy-specific calibrated dashboard packs for Eurofer97, F82H, T91, CuCrZr, or OFHC-Cu. You supply parameters from literature, EBSD, or internal calibration.
pytest tests/ -v
# headless subset (skip display-dependent tests):
pytest tests/ -v -m "not gui"See Testing for CI vs Windows skips (VTK, display).
Sphinx: https://design-by-fundamentals-ukaea.github.io/UPXO/
- Default distribution: GPL-3.0 for open-source / academic use.
- Commercial / proprietary use may need a separate licence — see repo
COMMERCIAL.md/ contact maintainers.
- GitHub Issues: https://github.com/Design-By-Fundamentals-UKAEA/UPXO/issues
- Academic onboarding contact (from project docs): Dr. Sunil Anandatheertha — vaasu.anandatheertha@ukaea.uk
- Videos: https://www.youtube.com/@UPXODBF
When filing a bug, include: OS, Python version, upxo.__version__, install method (pip / editable), minimal snippet, and full traceback.
SoftwareX paper (see README / Home):
Anandatheertha et al., UKAEA Poly-XTAL operations (UPXO V1.0), SoftwareX 34 (2026) 102736. https://doi.org/10.1016/j.softx.2026.102736
- Python 3.13+ active?
- Installed into this interpreter?
- Using a git clone for demos/dashboards, not only
pip? -
Absolute path to
.xlsdashboard? - MCGS order: simulate → detect_grains → characterise?
- Right extra for EBSD/mesh (
upxo[ebsd], etc.)? - PyVista: real display / OpenGL available?
- Prefer LFI naming; ignore outdated
lgi-only docs outside this wiki.
Still blocked → open a GitHub issue with environment + traceback.
Home | Getting Started | API Reference | PyPI | YouTube | GitHub
© 2026 UK Atomic Energy Authority (UKAEA) — GPL-3.0
Getting Started
Grain Structure Generation
- 2D Grain Structures
- 3D Grain Structures
- Excel Input Dashboard
- Monte Carlo Algorithms
- Parameter Sweep & Ensembles
Analysis & Operations
- Grain Characterisation
- Grain Boundary Operations
- Texture & Crystallography
- Representativeness Assessment
- Material Registry
Output
Use Cases
Development
External