github scikit-rf/scikit-rf v0.17
End of Python 2 support, subnetwork and circular waveguide media

latest releases: v1.0.0, v.0.32.0, v0.31.0...
3 years ago

The support of Python 2.7 has been dropped with this version (PR#436 from @JAnderson419). For the moment, only the Travis and GitHub Actions testing have been dropped, the Python2 parts of code still exist and remain to be cleaned one day.

New Features

subnetwork

Creating the rf.subnetwork() function and Network.subnetwork() method for creating sub-Network for a given list of port indices. (PR #423 from @jhillairet)

As an illustration, below three 2ports subnetwork are extracted from a reference 3ports Network. These 3 subnetworks are after recombined into a 3ports Network.

import skrf as rf

# 3 port Network
tee = rf.data.tee
# 2 port Networks as if one measures the tee with a 2 ports VNA
tee12 = rf.subnetwork(tee, [0, 1])  # 2 port Network from ports 1 & 2, port 3 matched
tee23 = rf.subnetwork(tee, [1, 2])  # 2 port Network from ports 2 & 3, port 1 matched
tee13 = rf.subnetwork(tee, [0, 2])  # 2 port Network from ports 1 & 3, port 2 matched

# recreate the original 3 ports Network from the thee 2-port sub-Networks
ntw_list = [tee12, tee23, tee13]
tee2 = rf.n_twoports_2_nport(ntw_list, nports=3)
print(tee2 == tee) # --> True

Circular waveguide media (media.CircularWaveguide)

  • Added circular waveguide (single mode homogeneous filled) Media from @scimax (PR #376). Also made some corrections to some rectangular waveguide formuale (cutoff)
    # In the following example an ideal waveguide of 2.39 mm diameter is 
    # constructed for the high W band, operated in the fundamental TE11 mode.
    # If no conductivity is provided the walls are treated as perfect 
    # electric conductors.
    freq = rf.Frequency(88,110,101,'ghz')
    rf.CircularWaveguide(freq, r=0.5 * 2.39e-3)

Improvements of existing features

  • Network() can now supports StringIO for filename from @arsenovic (PR #433)

  • write port names to Touchstone files (as comment) from @luar123 (PR #428

  • Improve Error handling for step/impulse responses from @FranzForstmayr (PR #435, fixes #434). Now throws a:

    • ValueError if one wants to calculate step or impulse response with an Network with more than one port
    • NotImplementedError if one wants to calculate step or impulse response If used with non equidistant sampled frequency vector

Documentation

  • Fixing documentation notebooks from @jhillairet (PR #425)

  • Notebook tests are included using nbsmoke (but do not count for coverage) from @ema00 (PR#424, fixes partly #114)

  • Documentation improvements from @arsenovic (PR #433)

Fixed Bug

  • Use relative paths for import from @luar123 (PR #438)

  • Fix rf.io.Touchstone.get_comment_variables() which was cropping decimals from @JAnderson419 (PR #427, fixes #426 )

  • Matplotlib backend reconfiguration from @Vinc0110 (PR #420, fixes #419):

    • Disabling the matplotlib backend reconfiguration in plotting.py (Edit: keeping it for Python2)
    • Disabling invalid parameter interactive from matplotlib stylesheets, which were causing warnings in skrf.stylely()

Don't miss a new scikit-rf release

NewReleases is sending notifications on new releases.