Exemple #1
0
 def burdenVAgtc(self,VA,pf,Isec):
     """
     calculates the complex impedance of a burden from its VA, PF and secondary current
     """
     if pf >= 0:  #check sign convention for PF, '-'for capacitive
         multiplier = 1.0
     else:
         multiplier = -1.0
     magZ = VA/Isec**2
     phi = GTC.acos(pf)
     Z = magZ*GTC.cos(phi)+ multiplier*1j*magZ*GTC.sin(phi)
     return Z
Exemple #2
0
    print('\nvalue_list=', value_list)
    print('\nunc_array=', unc_array)

    print('\n Example - 2D or 1D -value list, the same uncertainty for all values, k=1')
    value_list=[[1,2,3,4],[5,6,7,8]]
    unc_list=0.1
    unc_array =urealext(value_list,unc_list, k=1, array_label='point')
    print('\nvalue_list=', value_list)
    print('\nunc_array=', unc_array)

    print('\n Example - 2D or 1D -value list, 2D or 1D uncertainty list, k=2, points name - voltage')
    value_list=[[1,2,3,4],[5,6,7,8]]
    unc_list=[[0.1,0.1,0.1,0.1],[0.2,0.2,0.2,0.15]]
    unc_array =urealext(value_list,unc_list, k=2, array_label='voltage')
    print('\nvalue_list=', value_list)
    print('\nunc_array=', unc_array)

    print('\n Calculating sine from uncertainty array')
    print('\n',GTC.sin(unc_array))


    value_list=[[1,2],[5,6]]
    unc_list=[[0.1,0.1],[0.2,0.2]]
    unc_array=urealext(value_list,unc_list)
    print('\n Calculating inverse matrix from uncertainty array')
    print('\n',GTC.la.inv(unc_array))     # <<<<<-------------------  ERROR




Exemple #3
0
T = GTC.ureal(29.764663066392302, 0.005, label='temp')
W = GTC.ureal(1.11813889, 1.982113655829038e-05, label='W')

print(ITS.Conv_kelvin2celsius(T))
ITS.Calculate_Wr(T, verbose=True)
ITS.Calculate_temp_from_W(W, verbose=True)

value_list = [[1, 2, 3, 4], [5, 6, 7, 8]]
#value_list=1

#unc_list=[[0.1,0.2,0.3,0.4],[0.01,0.02,0.03,0.04]] #osobna niepwenośc dla każdej wartości
unc_list = 0.1  # jedna niepewnośc dla wszystkich wartości

value_list = np.array(value_list)
unc_array = GTCext.urealext(value_list, unc_list, k=2, array_label='temp')

print('value_list=\n', value_list)
print('unc_list=\n', unc_list)
print('unc_array=\n',
      unc_array)  # tutaj jest wytworzona macierz liczb z niepewnoscią
print('sin(unc_array)=\n', GTC.sin(unc_array))  #tutaj można zrobic ich sinus

#print(SPRT.Calculate_temp_from_W(1.0794875093598515))

M = GTCext.urealext([[1, 2], [3, 4]], 0.1)

#calculating pseudoinverse matrix
inv_M = GTCext.pinv(M)

print('inv_M=\n', inv_M)