mwavepy.discontinuities.variationalMethods | index /home/alex/docs/python/path/mwavepy/discontinuities/variationalMethods.py

`variational calculations, for solving equivalent networks of
discontinuities.`

Modules
`` |  |
mwavepy | pylab |  |

Functions
`` |  | V_dominant_mode(mode_type, m, n, wg, **kwargs) `mode voltage coupling of dominant mode to itself. assumed field is sin(pi*x/a) ; for 0 < x < wg.a, 0 < y < wg.b takes: mode_type: type of mode, a string, acceptable values are ['te','tmz'] m: mode index in width dimension n: mode index in heigth dimension wg: a RectangularWaveguide type` V_offset_dimension_change(mode_type, m, n, wg, x0, y0, a, b) `mode voltage coupling for dominant mode field of a rectangular aperture of dimension axb, radiating into a larger waveguide of dimensions wg.a x wg.b. assumed field is sin(pi/a*(x-x0)) ; for x0 < x < x0+a, y0 < y < y0+b takes: mode_type: type of mode, a string, acceptable values are ['te','tmz'] m: mode index in width dimension n: mode index in heigth dimension wg: a RectangularWaveguide type x0: offset of aperture in width (a) dimension [m] y0: offset of aperture in height (b) dimension [m] a: aperture size in width dimension b: aperture size in height dimension returns: normalized coupling value, a scalar.` converge_junction_admittance(y_tol=0.001, mode_rate=1, M_0=2, N_0=2, min_converged=1, output=True, converge_func=<function junction_admittance>, **kwargs) junction_admittance(wg_I, wg_II, V_I, V_II, freq, M, N, normalizing_mode=('te', 1, 0), **kwargs) `calculates the equivalent network for a discontinuity in a waveguide, by the aperture-field variational method. takes: wg_I: a RectangularWaveguide instance of region I wg_II: a RectangularWaveguide instance of region II V_I: mode voltage for region I V_II: mode voltage for region II freq: M: N: normalzing mode: **kwargs: note: mode voltages are called like: V(mode_type,m,n,wg,**kwargs) so whatever you pass for the mode voltage functions must adhere to this convention` junction_admittance_with_termination(wg_I, wg_II, V_I, V_II, freq, M, N, d, Gamma0, normalizing_mode=('te', 1, 0), **kwargs) `calculates the equivalent network for a discontinuity in a waveguide, by the aperture-field variational method. takes: wg_I: a RectangularWaveguide instance of region I wg_II: a RectangularWaveguide instance of region II V_I: mode voltage for region I V_II: mode voltage for region II freq: M: N: normalzing mode: **kwargs: note: mode voltages are called like: V(mode_type,m,n,wg,**kwargs) so whatever you pass for the mode voltage functions must adhere to this convention` junction_impedance(wg_I, wg_II, I_I, I_II, freq, M, N, normalizing_mode=('te', 1, 0), **kwargs) plot_mag_phase(out) show_coupling(out) `## OUTPUT` step_up(freq, wr_small, wr_big, delta_a=0, delta_b=0, **kwargs) translation_offset(wg, freq, delta_a, delta_b, **kwargs) `calculates the response from a translation offset between two rectangular waveguides. takes: wg: RectangularWaveguide Object. freq: Frequency Object delta_a: offset in the width dimension [m] delta_b: offset in the height dimension [m] **kwargs: passed to converge_junction_admittance, see its help for more info returns: ntwk: a Network type representing the junction` translation_offset_with_termination(wg, freq, delta_a, delta_b, d, Gamma0, **kwargs) `calculates the response from a translation offset between two rectangular waveguides with a simple termination, possbily in the near field, in region II takes: wg: RectangularWaveguide Object. freq: Frequency Object delta_a: offset in the width dimension [m] delta_b: offset in the height dimension [m] d: distance to termination [m] Gamma0: reflection coefficient of termination at the termination **kwargs: passed to converge_junction_admittance, see its help for more info returns: ntwk: a Network type representing the junction` zeros(...) `zeros(shape, dtype=float, order='C') Return a new array of given shape and type, filled with zeros. Parameters ---------- shape : {tuple of ints, int} Shape of the new array, e.g., ``(2, 3)`` or ``2``. dtype : data-type, optional The desired data-type for the array, e.g., `numpy.int8`. Default is `numpy.float64`. order : {'C', 'F'}, optional Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory. Returns ------- out : ndarray Array of zeros with the given shape, dtype, and order. See Also -------- numpy.zeros_like : Return an array of zeros with shape and type of input. numpy.ones_like : Return an array of ones with shape and type of input. numpy.empty_like : Return an empty array with shape and type of input. numpy.ones : Return a new array setting values to one. numpy.empty : Return a new uninitialized array. Examples -------- >>> np.zeros(5) array([ 0., 0., 0., 0., 0.]) >>> np.zeros((5,), dtype=numpy.int) array([0, 0, 0, 0, 0]) >>> np.zeros((2, 1)) array([[ 0.], [ 0.]]) >>> s = (2,2) >>> np.zeros(s) array([[ 0., 0.], [ 0., 0.]]) >>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) array([(0, 0), (0, 0)], dtype=[('x', '<i4'), ('y', '<i4')])`

Data
`` |  | micron = 9.9999999999999995e-07 mil = 2.5399999999999997e-05 pi = 3.1415926535897931 sin = <ufunc 'sin'>