Blame view

IQ/IQ.py 368 Bytes
2ae5099ce   bmarechal   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  from sympy import *
  from sympy.simplify.fu import *
  
  init_printing()
  
  #constants
  E0, E1, W, t, dphi, kphi = symbols('E0, E1, Omega, t, Delta_phi, k_phi', real=True, imaginary=False)
  
  #define LO and RF
  LO_I = E0*cos(W*t)
  LO_Q = E0*cos(W*t+pi/2)
  RF = E1*cos(W*t+dphi)
  
  #mixer
  IF_I = 2*kphi*LO_I*RF
  IF_I = expand(TR8(IF_I))
  IF_Q = 2*kphi*LO_Q*RF
  IF_Q = expand(TR8(IF_Q))