One solve, five answers: how Python turns a finished antenna simulation into every number your team asks for
The antenna is done. It matches, the pattern looks right, and the design review went well.
Then the questions start.
The product manager wants the gain toward the gateway. The field team asks how far the tag will read with the chip they picked. The systems lead wonders what happens if you put 64 of these on one board. And the customer would like “a short report, by Friday”.
None of these questions needs a new design. They all need numbers you already have, sitting inside a solved case. Yet each one usually means another round of clicking through the results viewer, exporting curves and pasting screenshots into a slide. Then a value changes and you do it all again.
This is the story of answering all five from cases we had already solved, with short Python scripts, using the CENOS Python package, cenos-py.
The set-up: nothing new to learn in the GUI
You build and solve the case in CENOS the way you always do. Python takes over after the solve.
Getting started is quicker than it sounds, for two reasons:
- CENOS writes your first script for you. Every change you make in the GUI is recorded as a Python line in
python_trace_script.pyin the case folder. Change a setting once, look at the last line, and you know the call. - You never rebuild from scratch. A script opens a case you already built, saves a copy and changes only what it needs.
Each question uses a solved case from our application pages: a dual-band printed inverted-F antenna for 800 and 1700 MHz for the first two, a UHF RFID label for the read range, and a 2.45 GHz patch unit cell for the array. Here are the questions, one at a time.
Question 1: “Is it matched, and where does the power go?”
Everything the results viewer shows for a port is in case.results as plain numbers: impedance, S-parameters, VSWR, accepted and radiated power, and dielectric, conductor and lumped-element losses. A few lines of numpy turn that into the table everyone wants:
| Band | S11 dip | −10 dB band | Radiated / accepted |
|---|---|---|---|
| Low | 797 MHz, −22.1 dB | 783–811 MHz | 80 % |
| High | 1705 MHz, −32.9 dB | 1655–1754 MHz | 85 % |
The follow-up, “where does the rest go?”, is one more call. The FR4 board takes 13.5 % of the accepted power at 800 MHz and 11 % at 1700 MHz, and the copper takes the last few percent.
No exporting, no copying values off a cursor. Run the script again after a design change and the table updates itself.
Question 2: “What’s the gain?”
FarField reads the radiation pattern at any frequency. If the case doesn’t hold a far field there yet, it’s calculated from the solved fields on first use, without a new solve:
ff = FarField(case, 1700e6)
print(ff.peak_gain, ff.peak_directivity) # gain per accepted power, directivity
# realized gain: the gain minus the mismatch at the port
import numpy as np
f = np.ravel(case.results.get_frequency())
s11 = np.interp(1700e6, f, np.ravel(case.results.get_s_parameter("S11"))) # dB
print(ff.peak_gain + 10 * np.log10(1 - 10 ** (s11 / 10)))
The answer: 1.4 dBi at 800 MHz and 3.6 dBi at 1700 MHz of realized gain, which includes the mismatch at the port, plus all three principal cuts ready to plot. The antenna is well matched in both bands, so realized gain is within 0.1 dB of gain here. At 800 MHz the ground plane does most of the radiating and the pattern is a dipole-like doughnut. At 1700 MHz the board is close to a wavelength long and lobes appear. That’s the explanation the product manager actually needs, and it comes in the same script.
Question 3: “How far will the tag read?”
This is where Python goes beyond the results viewer. An antenna is a means to an end. For an RFID tag the question that matters is the read range, and that means a link budget.
We took the UHF RAIN label from our RFID and NFC page. Antenna.from_case takes the gain and impedance straight from the solved tag. The reader antenna comes from its datasheet, and the chip’s impedance (1.5 kΩ in parallel with 1.2 pF) is the load. RFSystem does the rest.

The answer: 12.3 m at 866 MHz, in about ten lines of Python. It’s the same “about 12 m” quoted on the RFID page, now reproducible by anyone with the script.
Put it in a loop over frequency and you get a chart the field team can use directly: about 12 m in the European band, and 9.6–10.8 m in the US band, where the label is tuned less well. That’s a finding you’d want to know before the label ships to the US.
Question 4: “What if we put 64 of them on one board?”
A 64-element array is too big to solve element by element on a desktop. You don’t have to.
When all the elements are the same, CENOS solves one unit cell with periodic boundaries, so the cell sees its neighbours. We did this with the 2.45 GHz patch from our PCB and patch antenna page. The unit cell revealed something a single-patch simulation would have missed: inside the array, the neighbours pull the best match from 2446 MHz down to 2378 MHz. That’s why an array element is tuned in its array, not alone.
Then ArrayBeamExplorer built the full 8 × 8 array from that one solved cell:
- 18.3 dBi realized gain straight up (the directivity is 22.7 dB; the lossy FR4 board takes most of the difference)
- Steered to 30°: the beam lands at 29°, with 17.6 dBi, so scanning costs 0.7 dB
- With a Taylor taper: clearly lower side lobes, for another 1.4 dB of peak gain
Each new beam takes seconds, not a new solve. The systems lead can ask “what about 45°?” in the meeting and get the answer before the next slide.
Question 5: “Can you send a report by Friday?”
CENOS has its own case report. But when the customer wants your sections in your order, or one report for each of twenty variants, CenosPDFReport writes the PDF from a script: headings, text, S11 with its −10 dB limit line, impedance plots, a min/max results table and any matplotlib figure you like.
report = CenosPDFReport("Dual-band IFA, 800 / 1700 MHz", case=case)
report.add_result_plot(["S11"], limit=-10, limit_label="-10 dB")
report.add_results_table(["S11", "VSWR (port 1)"])
report.save("dualband_ifa.pdf")
Write it once, and the next report is a re-run, not an afternoon.
The scorecard
| The question | The usual way | With Python | New solves |
|---|---|---|---|
| Matched? Where does the power go? | Read values off the viewer, export, paste | One table, refreshed by re-running | None |
| What’s the gain? | Open the pattern, read peaks, screenshot cuts | Peak realized gain and cuts at any frequency | None |
| How far will the tag read? | A separate spreadsheet link budget | 12.3 m from about ten lines, plus a range-vs-frequency chart | None beyond the solved tag |
| What about 64 on one board? | Too big to solve element by element | Full 8 × 8 array, steered and tapered in seconds per beam | One unit cell |
| A report by Friday? | Screenshots into a document | A PDF from a script, for one variant or twenty | None |
Five questions that each used to mean another round of clicking, exporting and pasting, answered from cases you’d already solved. And because they’re scripts, the second time costs nothing.
The limits, honestly
The scripts don’t change physics, and a few things are worth knowing:
- Results come on the frequency grid of the solve. If one number matters, narrow the range or interpolate.
RFSystemis free space. No walls, multipath or ground reflections.ArrayBeamExplorerneeds a periodic unit-cell case. It doesn’t work on a case with several separate elements.
Your results next
Everything here works with the results you already have in CENOS RF:
- Open one of your cases, change one thing in the GUI and look at the trace file.
- Install
cenos-py(see the Python scripting page) and print your S11 from Python. - Pick the question you get asked most often, and put it in a script.
Start a free trial and try it on your own antenna, or book a demo and we’ll write your first script with you.
Want every script in full? See the documentation page Antenna results in Python. To change the design from Python with sweeps, tuning and tolerance checks, see Parameter studies in Python.

