<table>
<tr>
<td>[[image:Cube-icon.png | link=Getting_Started_with_EM.Cube]] [[image:cad-ico.png | link=Building_Geometrical_Constructions_in_CubeCAD]] [[image:fdtd-ico.png | link=EM.Tempo]] [[image:prop-ico.png | link=EM.Terrano]] [[image:static-ico.png | link=EM.Ferma]] [[image:planar-ico.png | link=EM.Picasso]] [[image:metal-ico.png | link=EM.Libera]] [[image:po-ico.png | link=EM.Illumina]]</td>
<tr>
</table>
[[Image:Back_icon.png|30px]] '''[[EM.Cube | Back to EM.Cube Main Page]]'''
<br />
Â
== Standard Python Operators ==
|}
== Standard Basic Mathematical Python Functions ==
{| class="wikitable"
| see [https://en.wikipedia.org/wiki/Mathieu_function Mathieu Functions on Wikipedia.]
|}
Â
== EM.Cube's Miscellaneous Python Functions ==
Â
{| class="wikitable"
!scope="col"| Syntax
!scope="col"| Type
!scope="col"| Description
!scope="col"| Notes
|-
| gauss(x,mu,sigma)
| EMAG Python function
| Gaussian function of mean mu and standard deviation sigma
| exp(-0.5*((x-mu)/sigma)**2)/sigma/sqrt(2*pi)
|-
| msin(x,r)
| EMAG Python function
| super-quadratic sine function of order r
| -
|-
| mcos(x,r)
| EMAG Python function
| super-quadratic cosine function of order r
| -
|-
| sigmoid(x,a)
| EMAG Python function
| Sigmoid function of slope a
| 2/(1 + exp(-a*x)) - 1
|-
| bh_window(x,T)
| EMAG Python function
| Blackman-Harris window function
| -
|-
| bh_step(x,T)
| EMAG Python function
| Blackman-Harris step function
| -
|-
| rand(x,y)
| EMAG Python function
| Random function
| -
|-
| rosen(x,y,a,b)
| EMAG Python function
| Rosenbrock function
| (a-x)**2 + b*(y-x**2)**2
|-
| mean(x,y)
| EMAG Python function
| arithmetic mean of x and y
| 0.5*(x+y)
|-
| geo(x,y)
| EMAG Python function
| geometric mean of x and y
| sqrt(x*y)
|-
| harm(x,y)
| EMAG Python function
| harmonic mean of x and y
| 2/(1/x+1/y)
|-
| sqr2(x,y)
| EMAG Python function
| sum of squares of x and y
| x**2 + y**2
|-
| sqr3(x,y,z)
| EMAG Python function
| sum of squares of x and y and z
| x**2 + y**2 + z**3
|-
| sqrt2(x,y)
| EMAG Python function
| radius of 2D point (x,y)
| sqrt(x**2 + y**2)
|-
| sqrt3(x,y,z)
| EMAG Python function
| radius of 3D point (x,y,z)
| sqrt(x**2 + y**2 + z**3)
|}
Â
== EM.Cube's Native Python Functions ==
DESCRIPTION: Creates a base point set in [[EM.Terrano]]. If the base point set group 'label' already exists, the group is activated.
Â
====bh_step====
Â
SYNTAX: bh_step({{ArgTypeReal}} x, {{ArgTypeReal}} T)
Â
EXAMPLE: ''bh_step(0.5,1)''
Â
DESCRIPTION: Computes and returns the Blackman-Harris step function.
Â
====bh_window====
Â
SYNTAX: bh_window({{ArgTypeReal}} x, {{ArgTypeReal}} T)
Â
EXAMPLE: ''bh_window(0.5,1)''
Â
DESCRIPTION: Computes and returns the Blackman-Harris window function.
====box====
DESCRIPTION: Sets the freeze state of an object (0/1).
Â
====gauss====
Â
SYNTAX: gauss({{ArgTypeReal}} x, ArgTypeReal}} mu, ArgTypeReal}} sigma)
Â
EXAMPLE: ''gauss(0.5,0,1)''
Â
DESCRIPTION: Computes and returns the Gaussian function of mean mu and standard deviation sigma: exp(-0.5*((x-mu)/sigma)**2)/sigma/sqrt(2*pi).
====gauss_beam====
DESCRIPTION: Creates a Gaussian beam source in [[EM.Tempo]]. If the Gaussian beam source 'label' already exists, its properties are modified.
Â
====generate_input_files====
Â
SYNTAX: generate_input_files()
Â
EXAMPLE: ''generate_input_files()''
Â
DESCRIPTION: Generates all the input files for the simulation engine of the current module without running a simulation.
Â
====geo====
Â
SYNTAX: geo({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''geo(1,2)''
Â
DESCRIPTION: Computes and returns the geometric mean of x and y: sqrt(x*y).
====get_area====
DESCRIPTION: Groups a number of objects into a composite object with the given label.
Â
====harm====
Â
SYNTAX: harm({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''harm(1,2)''
Â
DESCRIPTION: Computes and returns the harmonic mean of x and y: 2/(1/x+1/y).
====helix====
DESCRIPTION: Creates a permanent magnet source group in [[EM.Ferma]]. If the magnet group 'label' already exists, the group is activated.
Â
====mcos====
Â
SYNTAX: mcos({{ArgTypeReal}} x, {{ArgTypeReal}} r)
Â
EXAMPLE: ''mcos(0.5,2)''
Â
DESCRIPTION: Computes and returns the super-quadratic cosine function of order r.
Â
====mean====
Â
SYNTAX: mean({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''mean(1,2)''
Â
DESCRIPTION: Computes and returns the arithmetic mean of x and y: 0.5*(x+y).
====merge_curve====
DESCRIPTION: Computes and returns the width-to-height ratio of a microstrip transmission line with characteristic impedance z0 in Ohms and substrate relative permittivity er.
Â
====microstrip_z0====
Â
SYNTAX: microstrip_z0({{ArgTypeReal}} w, {{ArgTypeReal}} h, {{ArgTypeReal}} er)
Â
EXAMPLE: ''microstrip_z0(2,0.5,2.2)''
Â
DESCRIPTION: Computes and returns the characteristic impedance (in Ohms) of a microstrip transmission line with width w, substrate height h and substrate relative permittivity er.
====microstrip_eps_eff====
EXAMPLE: ''microstrip_lambda_g(2,0.5,2.2,2e9)''
DESCRIPTION: Computes and returns the guide wavelength (in meters) of a microstrip transmission line with width w, substrate height h, and substrate relative permittivity er and at an operating frequency of freq_hertz.
====microstrip_src====
DESCRIPTION: Creates a microstrip port source in [[EM.Tempo]]. If the microstrip port 'label' already exists, its properties are modified.
Â
====microstrip_z0====
Â
SYNTAX: microstrip_z0({{ArgTypeReal}} w, {{ArgTypeReal}} h, {{ArgTypeReal}} er)
Â
EXAMPLE: ''microstrip_z0(2,0.5,2.2)''
Â
DESCRIPTION: Computes and returns the characteristic impedance (in Ohms) of a microstrip transmission line with width w, substrate height h and substrate relative permittivity er.
Â
====microstrip_zoc====
Â
SYNTAX: microstrip_zoc({{ArgTypeReal}} w, {{ArgTypeReal}} l, {{ArgTypeReal}} h, {{ArgTypeReal}} er, {{ArgTypeReal}} freq_hertz)
Â
EXAMPLE: ''microstrip_zoc(2,25,0.5,2.2,2e9)''
Â
DESCRIPTION: Computes and returns the input reactance (in Ohms) of an open-circuited microstrip transmission line with width w, length l, substrate height h and substrate relative permittivity er at an operating frequency of freq_hertz.
Â
====microstrip_zsc====
Â
SYNTAX: microstrip_zsc({{ArgTypeReal}} w, {{ArgTypeReal}} l, {{ArgTypeReal}} h, {{ArgTypeReal}} er, {{ArgTypeReal}} freq_hertz)
Â
EXAMPLE: ''microstrip_zsc(2,25,0.5,2.2,2e9)''
Â
DESCRIPTION: Computes and returns the input reactance (in Ohms) of a short-circuited microstrip transmission line with width w, length l, substrate height h and substrate relative permittivity er at an operating frequency of freq_hertz.
====mirror====
DESCRIPTION: Transfers an object from its current material/object group node in the navigation tree to another node or optionally to another [[EM.Cube]] module.
Â
====msin====
Â
SYNTAX: msin({{ArgTypeReal}} x, {{ArgTypeReal}} r)
Â
EXAMPLE: ''msin(0.5,2)''
Â
DESCRIPTION: Computes and returns the super-quadratic sine function of order r.
====nurbs_curve====
DESCRIPTION: Computes and returns the ramp function: x if x>0, 0 if x<0.
Â
====rand====
Â
SYNTAX: rand({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''rand(0,1)''
Â
DESCRIPTION: Computes and returns a random number between x and y using an uniform distribution.
====random_group====
DESCRIPTION: Creates or modifies a revolution object from a specified object. If modifying an existing revolution object, the pre-existing primitive object is used. (x0,y0,z0) specifies the center of revolution, and (uX,uY,uZ) specifies the revolution axis. The revolution angle "rot_angle" is given in degrees.
Â
====rosen====
Â
SYNTAX: rosen({{ArgTypeReal}} x, {{ArgTypeReal}} y, {{ArgTypeReal}} a, {{ArgTypeReal}} b)
Â
EXAMPLE: ''rosen(0.5,0,1,2)''
Â
DESCRIPTION: Computes and returns the Rosenbrock function: (a-x)**2 + b*(y-x**2)**2.
====rotate====
DESCRIPTION: Saves [[EM.Cube]]'s output simulation data files under the specified directory.
Â
====sawtooth====
Â
SYNTAX: sawtooth({{ArgTypeReal}} x)
Â
EXAMPLE: ''sawtooth(0.5)''
Â
DESCRIPTION: Computes and returns the ascending periodic sawtooth function of period T = 2, oscillating between two values +1 and -1 and having a zero value of at x = 0.
====scale====
DESCRIPTION: Creates a Hertzian short dipole source. If the short dipole source 'label' already exists, its properties are modified.
Â
====sigmoid====
Â
SYNTAX: sigmoidnc({{ArgTypeReal}} x, {{ArgTypeReal}} a)
Â
EXAMPLE: ''sigmoid(0.5,1)''
Â
DESCRIPTION: Computes and returns the sigmoid function of slope a: 2/(1 + exp(-a*x)) - 1.
Â
====sinc====
Â
SYNTAX: sinc({{ArgTypeReal}} x)
Â
EXAMPLE: ''sinc(0.5)''
Â
DESCRIPTION: Computes and returns the sinc function: sin(pi*x)/(pi*x).
====slice====
DESCRIPTION: Computes and returns the periodic square wave function of period T = 2, oscillating between two values +1 and -1 and having a value of +1 at x = 0.
Â
====sqr2====
Â
SYNTAX: sqr2({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''sqr2(0,1)''
Â
DESCRIPTION: Computes and returns the sum of squares of x and y: x**2 + y**2.
Â
====sqr3====
Â
SYNTAX: sqr2({{ArgTypeReal}} x, {{ArgTypeReal}} y, {{ArgTypeReal}} z)
Â
EXAMPLE: ''sqr2(0,1,2)''
Â
DESCRIPTION: Computes and returns the sum of squares of x, y and z: x**2 + y**2 + z**2.
Â
====sqrt2====
Â
SYNTAX: sqrt2({{ArgTypeReal}} x, {{ArgTypeReal}} y)
Â
EXAMPLE: ''sqrt2(0,1)''
Â
DESCRIPTION: Computes and returns the radius of the 2D point (x,y): sqrt(x**2 + y**2).
Â
====sqrt3====
Â
SYNTAX: sqrt3({{ArgTypeReal}} x, {{ArgTypeReal}} y, {{ArgTypeReal}} z)
Â
EXAMPLE: ''sqrt3(0,1,2)''
Â
DESCRIPTION: Computes and returns the radius of the 3D point (x,y,z): sqrt(x**2 + y**2 + z**2).
====step====
<hr>
[[Image:Top_icon.png|48px30px]] '''[[#Standard Python Functions Standard_Python_Operators | Back to the Top of the Page]]'''
[[Image:Back_icon.png|40px30px]] '''[[EM.Cube | Back to EM.Cube Main Page]]'''