Jerome G Wiltz21 downloadsAnalyze RF and microwave networks from Markdown and render SVG charts, tables, and Smith plots.
nPort RF Analysis embeds RF and microwave network analysis in Obsidian Markdown notes. It runs verbatim nP JavaScript on demand and retains declarative JSON blocks for safe automatic rendering. Results appear as inline SVG line charts, Smith charts, or tables.
The initial public release supports the Obsidian desktop application. Mobile support will be declared only after it has been tested on Obsidian Mobile.
After the plugin is published in the Obsidian Community Plugin directory:
For a manual installation, download main.js, manifest.json, and styles.css from the GitHub release whose tag matches the version in manifest.json. Place the three files in:
<vault>/.obsidian/plugins/np-rf-analysis/
Restart Obsidian, then enable nPort RF Analysis under Settings → Community plugins. Plugins are installed and enabled separately for each vault.
Use an npjs block for the full nP JavaScript API. The source is executed without translation after you select Run.
```npjs
var g = nP.global;
g.fList = g.fGen(100e6, 1000e6, 51);
var r1 = nP.R(25);
var l1 = nP.L(2e-9);
var network = nP.nodal(
[r1, 1, 2],
[l1, 2, 3],
['out', 1, 3]
);
var output = network.out('s11dB', 's21dB');
nP.lineChart({
inputTable: [output],
title: 'Network response',
mount: '#chartDiv',
backgroundColor: 'white'
});
```
Each block provides Run, Stop, and Reset controls:
Successful results are saved as validated render instructions and restored when the note is rendered again. This lets Obsidian include charts, tables, and text results in Export to PDF without automatically rerunning JavaScript. Changing the JavaScript invalidates the saved result; run the updated block once to create a new snapshot. During PDF export, interactive controls and the security warning are hidden.
Saved results have a bounded cache lifecycle:
npjs block removes its previous saved result.The cache is stored in the plugin's data.json; result data is not inserted into the Markdown note.
Inside an npjs fence, ordinary paste uses the clipboard's plain-text representation. JavaScript copied from editors such as VS Code therefore keeps its intended spaces, tabs, and line breaks without importing rich-text paragraph formatting.
In Reading view, the controls and Status: Ready appear above the complete, always-visible JavaScript source. Charts, tables, messages, and errors appear below the source.
Selectors such as mount: '#chartDiv' are resolved within that block, so existing nP development scripts can be pasted without adding HTML mount elements. nP.lineChart(), nP.smithChart(), and nP.lineTable() render in the note; all nP analysis constructors and composition functions remain available to the script.
Use an np block when a validated, automatically rendered analysis is preferable:
```np
{
"frequencies": {
"start": 100000000,
"stop": 6000000000,
"points": 101,
"referenceImpedance": 50
},
"components": {
"r1": { "type": "R", "value": 25 },
"l1": { "type": "L", "value": 2e-9 }
},
"nodal": [
["r1", 1, 2],
["l1", 2, 3],
["out", 1, 3]
],
"output": ["s11dB", "s21dB"],
"view": {
"type": "line",
"title": "Series R-L response",
"metricPrefix": "giga"
}
}
```
Switch to Reading View to render the analysis.
npjs deliberately executes user-authored JavaScript, but it does not run automatically. Only select Run for code you trust.
document.getElementById(...).textContent compatibility shim. It does not receive Obsidian's app, vault, actual DOM, Node.js, Electron, require, or process objects.The safe np JSON format remains available and never executes JavaScript.
Security reports may be submitted through the repository's GitHub issues. Do not include private vault contents in a report. See SECURITY.md for the supported-version and reporting policy.
R, L, C, seR, seL, seC, paR, paL, paC, Tee, Open, Short, Load, and Tlin components.nP.nodal() topology..out(...) suffixes: mag, dB, ang, Re, and Im.For a Smith chart, request paired real and imaginary outputs and set view.type to smith:
"output": ["s11Re", "s11Im"],
"view": { "type": "smith", "title": "Input match" }
The prototype includes a pinned, generated nP ESM bundle under vendor/ so releases and CI are self-contained. The vendored bundle is generated from the nP 0.0.47 plugin entry and remains covered by nP's MIT license. That entry contains the complete RF, math, component, diode, chart, and table APIs, but intentionally excludes nP's obsolete browser-development helpers. The worker is bundled into main.js; the plugin does not download executable code at runtime.
During coordinated nP development, the repositories can still be kept as siblings:
parent/
├── nP/
└── np-rf-analysis/
Build and test with:
npm install
npm run typecheck
npm test
npm run build
For manual Obsidian testing, copy or link this directory into a dedicated test vault as:
<test-vault>/.obsidian/plugins/np-rf-analysis/
Obsidian loads manifest.json, main.js, and styles.css. Do not develop against an important vault.