Pattern Formats
mcnanovna can import antenna patterns from several file formats.
CSV
Comma-separated values with angle and gain data.
3-Column Format (Full 3D)
theta,phi,gain_dbi0,0,-400,10,-40...90,0,2.1590,10,2.15...180,0,-40| Column | Description |
|---|---|
| theta | Polar angle (0-180°) |
| phi | Azimuth angle (0-360°) |
| gain_dbi | Gain in dBi |
2-Column Format (Single Cut)
angle,gain0,-4045,-1090,2.15135,-10180,-40Single-cut data is synthesized to 3D using a sin(θ) taper.
Delimiters
Auto-detected: comma (,), semicolon (;), or tab.
Headers
Optional. If first row contains non-numeric values, it’s treated as a header.
EMCAR vna.dat
Format from EMCAR antenna range software.
# EMCAR antenna pattern measurement# Frequency: 145 MHz0 0.545 0.890 1.0135 0.8180 0.5| Column | Description |
|---|---|
| angle | Azimuth angle (degrees) |
| amplitude | Linear amplitude (0-1) |
The gnuplot transform is applied automatically:
- Angle:
(-angle + 90)rotation - Gain:
20 * log10(amplitude + 0.01)
NEC2 Output
Output from NEC2/NEC4 antenna simulation.
- - - RADIATION PATTERNS - - -
- ANGLES - - POWER GAINS - - POLARIZATION - THETA PHI VERT. HOR. TOTAL AXIAL TILT DEGREES DEGREES DB DB DB RATIO DEG 0.00 0.00 -999.99 -999.99 -999.99 0.00000 0.00 5.00 0.00 -4.52 -999.99 -4.52 0.00000 90.00 10.00 0.00 1.43 -999.99 1.43 0.00000 90.00Polarization Selection
| Option | Column |
|---|---|
total | TOTAL (default) |
vert | VERT. |
hor | HOR. |
The frequency is auto-detected from the NEC2 header.
Touchstone S1P
Touchstone S-parameter file with S11 data.
! NanoVNA measurement# Hz S RI R 50144000000 0.15 -0.08145000000 0.02 -0.01146000000 0.12 0.05Formats
| Option | Data Format |
|---|---|
| RI | Real, Imaginary |
| MA | Magnitude, Angle (degrees) |
| DB | dB Magnitude, Angle (degrees) |
Processing
- Find resonance (minimum |S11|)
- Calculate impedance at resonance
- Estimate antenna type from impedance
- Generate analytical pattern
Antenna Type Override
If auto-detection is wrong, specify the type:
import_pattern_s1p(content, antenna_type="monopole")Internal Format
All import functions return the same structure:
{ "antenna_type": "dipole", "frequency_hz": 145000000, "theta_deg": [0, 5, 10, ...], # List of theta values "phi_deg": [0, 10, 20, ...], # List of phi values "gain_dbi": [-40, -35, ...], # Gain at each point "peak_gain_dbi": 2.15, "num_points": 6552}This format is used by:
- Web UI visualization
radiation_pattern_multicomparison- Export functions
Interpolation
For irregular measurement grids, IDW (inverse-distance-weighted) interpolation maps data to the standard theta×phi grid:
- Theta: 0° to 180° in 5° steps (default)
- Phi: 0° to 355° in 5° steps (default)
Great-circle distance is used for accurate angular weighting.