diff --git a/ram/ram.py b/ram/ram.py new file mode 100644 index 0000000..e188fdb --- /dev/null +++ b/ram/ram.py @@ -0,0 +1,22 @@ +from sympy import * +from sympy.simplify.fu import * + +init_printing() + +#constants +E0, W, t, m, b= symbols('E0, Omega, t, m, beta', real=True, imaginary=False) + +#AM+PM +E_ampm = E0*(1+m*cos(W*t))*exp(I*(W*t+b*sin(W*t))) +I_ampm = abs(E_ampm)**2 +I_ampm = expand(TR8(expand(expand_complex(I_ampm)))) + +#AM +E_am = E0*(1+m*cos(W*t))*exp(I*(W*t)) +I_am = abs(E_am)**2 +I_am = expand(TR8(expand(expand_complex(I_am)))) + +#PM +E_pm = E0*exp(I*(W*t+b*sin(W*t))) +I_pm = abs(E_pm)**2 +I_pm = expand(TR8(expand(expand_complex(I_pm))))