human
I am working on the file "8_Calibration/8_problem_set.ipynb".
The first task is:
1. SteFCal: Theoretical derivation
Please derive, discuss and present the SteFCal calibration algorithm? [20] 
Subtotal 20
2. SteFCal: Practical implementation
a) Please Complete the following function. This function is suppose to be the SteFCal equivalent of create_G_LM. In other words it should compute g and G but instead of using LM it should use SteFCal. [20]
Can you write Python program for it?
 Give me a Python program to compute g and G but instead of using LM it should use SteFCal?
assistant
#Here is Python program to compute g and G but instead of using LM it should use SteFCal.

   '''This function finds argmin G ||R-GMG^H|| using StEFCal.
   D is your observed visibilities matrx.
   M is your predicted visibilities.
   imax maximum amount of iterations.
   tau stopping criteria.
   g the antenna gains.
   G = gg^H.'''
   def create_G_stef(self,D,M,imax,tau):
       G = np.zeros(D.shape,dtype=complex)
       g = np.zeros((D.shape[0],D.shape[2]),dtype=complex)

       #Complete the rest of the function
         
       return g,G