2.9.0 release target; bounded Windows CLI/Python evidence
Package applicability is under review; follow the stated version and platform limits.
Before starting
Use a compiled josimpro extension matching your Python version, architecture and JoSIM®-Pro installation, plus a valid licence and complete writable example. The checked path used Windows x64, CPython 3.13.11 and NumPy 2.5.4.
NumPy is needed for these array operations. It was installed in an isolated workspace environment; global Python and licence configuration were preserved. Copy the complete supplied JTL example before running.
Windows environment example
Use a compatible installed Python for the environment below, then run your saved script with that environment’s interpreter. The Python example uses the default Windows application bin directory; adjust it for a custom install.
python -m venv .venv
.venv\Scripts\python.exe -m pip install numpy
.venv\Scripts\python.exe read_jtl.pyRead arrays and write named output
- Load the saved JTL circuit, validate the matrix and run the simulation.
- For raw state, keep results.get_time() with results.get_x_full(matrix). Rows follow internal matrix ordering and need their own quantity interpretation.
- Build Output, format its time vector and compute the print list. Use out.time with the visible out.plist values; do not assume the formatted output axis is always the accepted-solver time axis.
- Write CSV to a separate filename and inspect its headers, units, finite values and time coverage.
import os
import sys
from pathlib import Path
# Windows default install: this changes only the current Python process.
if os.name == "nt":
bin_dir = Path(os.environ["ProgramFiles"]) / "SUN Magnetics" / "JoSIM-Pro" / "bin"
dll_directory = os.add_dll_directory(str(bin_dir))
sys.path.insert(0, str(bin_dir))
import josimpro as jp
import numpy as np
print(jp.VERSION, jp.BUILD_TIMESTAMP, jp.GIT_HASH)
# Set jp.Settings.license to your issued licence filename only if required.
inp = jp.Input("JTL_Example.cir")
mat = jp.Matrix(inp)
mat.validate_simulation_ready()
sim = jp.Simulation(mat)
sim.simulate(mat)
if not sim.isSimOK:
raise RuntimeError("Read the simulation diagnostic before using results")
raw_time = sim.results.get_time()
raw_state = sim.results.get_x_full(mat)
out = jp.Output(inp, mat)
out.format_time_vector(sim.results, mat)
out.compute_all_print_values(mat)
output_time = np.asarray(out.time, dtype=float)
traces = {p.name: np.asarray(p.values, dtype=float)
for p in out.plist if not p.hidden}
assert all(values.shape == output_time.shape for values in traces.values())
print("Raw shapes:", raw_time.shape, raw_state.shape)
print("Named shapes:", {name: values.shape for name, values in traces.items()})
out.print_CSV_DAT(',', "jtl_python.csv", mat)
Check the result
For the checked packaged JTL, raw time and formatted output time each had 1,001 samples over 0–250 ps. The raw state shape was (12, 1001); four visible named traces each had 1,001 finite values. These dimensions describe that example and run settings, not every circuit.
The same current CLI and Python paths produced exactly equal parsed CSV for the unchanged JTL example. This is same-engine interface agreement, not an independent physical-accuracy or convergence check.
Time is in seconds. Preserve the named signal quantities: the JTL V(...) traces are voltages and P(...) traces are physical phase in radians. Do not label every raw state row as voltage or treat phase values as cycles.
Keep independent array snapshots
In the reviewed maintained Python binding, results.get_time() and results.get_x_full(matrix) allocate owning, writable float64 NumPy arrays and copy the native samples. Changing these arrays does not edit the native result. A returned snapshot remains independent of a later rerun or owner destruction; keep the native objects alive while making the call itself.
Each call copies its selected data, so repeated snapshots consume additional memory. get_x_full(matrix) uses matrix.relevant when pruning is active; its first dimension is the exposed subset, not necessarily every matrix column. Keep the matching quantity/index interpretation or use the named print-list route.
This ownership explanation follows the current binding implementation and method contract. The earlier VAL-012 numerical comparison retains its recorded review-module identity; no current-module owner-destruction or rerun test is added by this source review.
If the problem remains
If NumPy is missing, install it in the environment that runs the script. If josimpro cannot import, check the interpreter/extension compatibility and intended module/DLL directory before running a simulation.
Use jp.core_identity_json() to inspect the actually loaded core when versions or library paths are uncertain. Keep native owners valid while making native calls; do not replace a loaded binary during the process.
For missing dependencies or a licence failure, use the exact diagnostic and compare the same saved circuit with the matching CLI. Use a new output filename and preserve the source files.
Choose the analysis-specific result type
The worked array/output example here is transient and uses seconds. OP results are scalars, DC uses its swept source values and volts or amperes as the horizontal axis, and AC retains complex values against frequency in hertz. Use the dedicated static/DC and AC guides for those output contracts. Match values to their declared axis metadata before processing or plotting them.
Sources and verification details
Recorded inputs/builds only. Complete walkthrough and final-package acceptance remain separate.
VAL-012 · JoSIM®-Pro 2.9.0 Windows review runtime; CPython 3.13.11 and NumPy 2.5.4 in an isolated environment
Packaged JTL through Python Input/Matrix/Simulation, raw and named arrays, formatted output axis and CSV writer; the same current CLI produced exactly matching parsed CSV
Execution, finite data, shape/time coverage and same-engine interface agreement. No independent physical reference, convergence, GUI, other interpreter/platform or final-release qualification.
- josim-pro:docs/manual_source/sections/python.tex · Reading raw arrays; named traces; explicit output writers
- josim-pro:lib/python/bindings.cpp · Output format_time_vector, compute_all_print_values, print_CSV_DAT, plist and time
- validation:windows-workflows-20261103 · VAL-012: arrays, time axes, named traces and CLI/Python CSV agreement
- josim-pro:docs/manual_source/sections/syntax.tex · Static operating point, Circuit DC sweeps and Small-signal AC result/axis contracts; separate from the transient recipe
- The maintained Python binding explicitly exposes Output.time and plist. VAL-012 checked these paths on the recorded Windows review runtime. Final distributed 2.9 package and other-platform/interpreter acceptance remain pending.
- 4 November targeted UTF-8 path delta review: current binding/input changes preserve this guide's ASCII named-output or subcircuit/default claims. Retained execution predates these changes; Unicode input/path and final-package execution are not qualified. Evidence: validation/source-review-python-paths-20261104.json.
