REMI Lab
OPEN KNOWLEDGE / TOOLS

Installation

이 페이지의 내용

Basic install

Terminal window
pip install rfx-fdtd

rfx requires Python 3.10+ and installs JAX, NumPy, SciPy, matplotlib, and h5py.

The package name on PyPI is rfx-fdtd, while the Python import remains:

import rfx

For the packaged local Studio, background experiment CLI, and Model Context Protocol (MCP) server, install the Studio extra:

Terminal window
pip install "rfx-fdtd[studio]"
rfx studio --workspace .rfx-studio

See Studio, CLI, and MCP Experiments for the current UI scope, shared-workspace rules, replay, approvals, and remote deployment requirements.

Verify your install

After installing, confirm the environment can actually run a simulation.

First run the bundled diagnostics command:

Terminal window
rfx-diagnose

It prints a PASS / WARN / FAIL report (Python and rfx versions, the JAX backend and devices, core dependencies, optional extras) and finishes with a tiny end-to-end FDTD run. It exits 0 only when every critical check passes; WARN lines (CPU-only backend, x64 disabled) are informational. An x64-disabled warning is harmless for the default precision="float32" workflow, but precision="float64" requires JAX x64 to be enabled before the simulation is constructed. Both "float64" and "mixed" are limited to the uniform single-device lane. Mixed precision works with CPML but raises the absorber residual floor, so use float32 for low-reflection and S-parameter work near that floor.

The diagnostic’s final short run is the installed-package execution check. Examples under examples/ are available only from a source checkout; they are not installed as wheel data.

GPU support

Terminal window
pip install --upgrade "jax[cuda12]"
python -c "import jax; print(jax.devices())"

See the official JAX installation guide for CUDA/cuDNN details.

Development install

Terminal window
git clone https://github.com/bk-squared/rfx.git
cd rfx
pip install -e ".[dev]"
python examples/quickstart/hello_world.py

The hello-world script builds a tiny box, injects one pulse, records one field probe, and prints a short finite-data summary.

The dev extra includes:

  • pytest
  • pytest-xdist
  • ruff

System requirements

  • Python: 3.10 / 3.11 / 3.12
  • CPU: modern x86_64
  • GPU: NVIDIA + CUDA 12+ for acceleration
  • RAM: 4 GB minimum, 16 GB+ recommended for larger 3D runs

Next steps

From a source checkout with the development install above, run examples/quickstart/hello_world.py, then follow the ordered tutorials in examples/tutorials/; examples/README.md lists the sequence. For a wheel-only install, use rfx-diagnose as the execution check because the wheel does not include examples/.

Back to top ↑