skrf.network.Network.interpolate

Network.interpolate(new_frequency, **kwargs)

Return an interpolated network, from a new :class:’~skrf.frequency.Frequency’.

Interpolate the networks s-parameters linearly in real and imaginary components. Other interpolation types can be used by passing appropriate **kwargs. This function returns an interpolated Network. Alternatively interpolate_self() will interpolate self.

Parameters :

new_frequency : Frequency

frequency information to interpolate

**kwargs : keyword arguments

passed to scipy.interpolate.interp1d() initializer.

Returns :

result : Network

an interpolated Network

Notes

See scipy.interpolate.interpolate.interp1d() for useful kwargs. For example

kind : str or int
Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) or as an integer specifying the order of the spline interpolator to use.

Examples

In [2]: n = rf.data.ring_slot 

In [3]: n
Out[3]: 2-Port Network: 'ring slot',  75-110 GHz, 201 pts, z0=[ 50.+0.j  50.+0.j]

In [4]: new_freq = rf.Frequency(75,110,501,'ghz')

In [5]: n.interpolate(new_freq, kind = 'cubic')
Out[5]: 2-Port Network: 'ring slot',  75-110 GHz, 501 pts, z0=[ 50.+0.j  50.+0.j]

Previous topic

skrf.network.Network.resample

Next topic

skrf.network.Network.interpolate_self

This Page