skrf.network.Network.__init__

Network.__init__(file=None, name=None, comments=None, f_unit=None, **kwargs)

Network constructor.

Creates an n-port microwave network from a file or directly from data. If no file or data is given, then an empty Network is created.

Parameters :

file : str or file-object

file to load information from. supported formats are:
  • touchstone file (.s?p)
  • pickled Network (.ntwk, .p) see write()

name : str

Name of this Network. if None will try to use file, if its a str

comments : str

Comments associated with the Network

**kwargs : :

key word arguments can be used to assign properties of the Network, such as s, f and z0.

See also

read
read a network from a file
write
write a network to a file, using pickle
write_touchstone
write a network to a touchstone file

Examples

From a touchstone

>>> n = rf.Network('ntwk1.s2p')

From a pickle file

>>> n = rf.Network('ntwk1.ntwk')

Create a blank network, then fill in values

>>> n = rf.Network() 
>>> n.f, n.s, n.z0 = [1,2,3],[1,2,3], [1,2,3]

Directly from values

>>> n = rf.Network(f=[1,2,3],s=[1,2,3],z0=[1,2,3])

Previous topic

skrf.network.Network.z_vswr

Next topic

skrf.network.Network.add_noise_polar

This Page