def METHOD_NAME( contraDC, simulation, sfile, run_INTC = True):
    import os
    T = contraDC.TransferMatrix
    lambda0 = contraDC.wavelength*1e9
    f =  299792458/lambda0
    span = lambda0.__len__()
    T11 = T[0][0][:span]; T11 = np.matrix.transpose(T11)
    T12 = T[0][1][:span]; T12 = np.matrix.transpose(T12)
    T13 = T[0][2][:span]; T13 = np.matrix.transpose(T13)
    T14 = T[0][3][:span]; T14 = np.matrix.transpose(T14)
    T21 = T[1][0][:span]; T21 = np.matrix.transpose(T21)
    T22 = T[1][1][:span]; T22 = np.matrix.transpose(T22)
    T23 = T[1][2][:span]; T23 = np.matrix.transpose(T23)
    T24 = T[1][3][:span]; T24 = np.matrix.transpose(T24)
    T31 = T[2][0][:span]; T31 = np.matrix.transpose(T31)
    T32 = T[2][1][:span]; T32 = np.matrix.transpose(T32)
    T33 = T[2][2][:span]; T33 = np.matrix.transpose(T33)
    T34 = T[2][3][:span]; T34 = np.matrix.transpose(T34)
    T41 = T[3][0][:span]; T41 = np.matrix.transpose(T41)
    T42 = T[3][1][:span]; T42 = np.matrix.transpose(T42)
    T43 = T[3][2][:span]; T43 = np.matrix.transpose(T43)
    T44 = T[3][3][:span]; T44 = np.matrix.transpose(T44)
    S11=(T13*T44-T14*T43)/(T33*T44-T34*T43)
    S21=(T23*T44-T24*T43)/(T33*T44-T34*T43)
    S31=(T44)/(T33*T44-T34*T43)
    S41=(-T43)/(T33*T44-T34*T43)
    S12=(T14*T33-T13*T34)/(T33*T44-T34*T43)
    S22=(T24*T33-T23*T34)/(T33*T44-T34*T43)
    S32=(-T34)/(T33*T44-T34*T43)
    S42=(T33)/(T33*T44-T34*T43)
    S13=(T11*T33*T44-T11*T34*T43-T13*T44*T31+T13*T34*T41+T14*T43*T31-T14*T33*T41)/(T33*T44-T34*T43)
    S23=(T21*T33*T44-T21*T34*T43-T23*T44*T31+T23*T34*T41+T24*T43*T31-T24*T33*T41)/(T33*T44-T34*T43)
    S33=(T34*T41-T44*T31)/(T33*T44-T34*T43)
    S43=(T43*T31-T33*T41)/(T33*T44-T34*T43)
    S14=(T12*T33*T44-T12*T34*T43-T13*T44*T32+T13*T34*T42+T14*T43*T32-T14*T33*T42)/(T33*T44-T34*T43)
    S24=(T22*T33*T44-T22*T34*T43-T23*T44*T32+T23*T34*T42+T24*T43*T32-T24*T33*T42)/(T33*T44-T34*T43)
    S34=(T34*T42-T44*T32)/(T33*T44-T34*T43)
    S44=(T43*T32-T33*T42)/(T33*T44-T34*T43)
    S = {}
    S['f'] = np.matrix.transpose(f)
    S['lambda'] = np.matrix.transpose(lambda0)
    S['S11'] = S11
    S['S21'] = S21
    S['S31'] = S31
    S['S41'] = S41
    S['S12'] = S12
    S['S22'] = S22
    S['S32'] = S32
    S['S42'] = S42
    S['S13'] = S13
    S['S23'] = S23
    S['S33'] = S33
    S['S43'] = S43
    S['S14'] = S14
    S['S24'] = S24
    S['S34'] = S34
    S['S44'] = np.matrix.transpose(S44)
    dir_path = os.path.dirname(os.path.realpath(__file__))
    sio.savemat(os.path.join(dir_path,'ContraDC_sparams.mat'), S)
    # create .dat file for circuit simulations
    lumerical_tools.generate_dat(contraDC, simulation, S, sfile)
    return 