Upgrading to 0.9: API naming#
Magnelio 0.9 makes physical quantities and operation scope explicit. Update Python calls together; removed spellings have no compatibility aliases. It does not change numerical methods, phasor conventions or the interpretation of supported stored projects. For the geometry construction changes in the same release, see Upgrading geometry construction.
Complete mapping#
Previous spelling or meaning |
Current spelling and meaning |
|---|---|
|
|
|
Removed without replacement: its area integral had units A·m, not A. Read |
Field monitor or |
|
Rectangular |
|
|
|
|
|
Viewer |
|
|
|
|
|
|
|
|
|
|
Single-run |
|
|
|
|
Missing curated geometry exports |
|
Uncurated returned surface/loss types |
|
|
|
Whole-axis |
|
Surface-impedance |
|
|
|
Degree-valued |
|
|
|
|
|
Raw and CAD BREP pairs |
Both retained: ordered raw metre-space |
Physical frequency and anchors#
Previously an angular frequency was passed to a Mode:
mode.gamma(2 * np.pi * 10e9) # previous API
Now the evaluation boundary takes Hz and converts once internally:
mode.gamma(f=10e9)
mode.z_modal(f=10e9)
omega_c remains a stored angular cutoff in rad/s. Old positional and
omega= evaluations fail, preventing a silent factor of 2π error.
A rectangular declaration’s former center was already its corner, so copy
its value unchanged:
from magnelio import ports
port = ports.PortAnalytical(
name="input", plane="zmin", family="rect_wg",
width=22.86e-3, height=10.16e-3, origin=(3e-3, 4e-3, None),
)
The declaration uses world 3D coordinates. A PortSpecRectWG uses the two
coordinates along the global tangential axes, ordered by axis number.
Neither form denotes a midpoint. Coax declarations continue using center.
Normalization, selection and counts#
monitor.normalize_to_excitation(signal) changes the reference used to read
its field response. Calling it again replaces that reference. Raw DFT bins
and spectrum_raw remain unchanged. result.renormalize(50) instead returns
a network referenced to 50 Ω and leaves the original network untouched.
Use recording.plot(frame=2) or recording.plot(t=1e-9); use
spectrum.plot(f=10e9, phase_deg=90) for a complex field picture. Eigenmode
results use result.show(mode=2, render_mode="none") to build a scene for
physical mode 2 without displaying it. Supported field choices are unchanged.
project.result(run="run_2"), project.monitors_for(run="run_2") and
magnelio.resume(project, run="run_2") select a stored run. An exact run
name takes precedence; scattering (port, mode) selectors remain supported.
A sole run may be implicit, but multiple runs require an unambiguous choice.
n_steps_by_run exposes each aggregate run’s solver count. max_run_steps
is their maximum, never their sum. To inspect one stored run’s settings, use
project.result(run=...).settings.n_steps. Combined settings do not silently
report a representative run’s count. Signal extrapolation length is separate
from the number of steps the solver actually marched.
Stored projects and CAD exchange#
Supported files keep their existing schema and stable disk vocabulary.
Readers and reconstruction recipes map legacy center, width_a, height_b,
phase, freqs and surface-layer coordinate keys explicitly. Corner values,
degree units, angular cutoffs, excitation identities, raw bins and checkpoints
retain their meaning. File compatibility does not restore old Python calls.
Unsupported file versions still fail explicitly.
For CAD workflows use import_brep / export_brep with explicit units and
Magnelio geometry objects; see the CAD exchange guide.
Use raw read_brep / write_brep only when transporting an ordered sequence
of OpenCascade shapes already expressed in metres. Raw I/O preserves sequence
order and carries no material or named-topology metadata.