11 def handle_nec(result):
13 print nec_error_message()
15 def frequency_response():
18 nec = necpp.nec_create()
19 handle_nec(necpp.nec_wire(nec, 1, 17, 0, 0, 2, 0, 0, 11, 0.1, 1, 1))
20 handle_nec(necpp.nec_geometry_complete(nec, 1))
21 handle_nec(necpp.nec_gn_card(nec, 1, 0, 0, 0, 0, 0, 0, 0))
22 handle_nec(necpp.nec_fr_card(nec, 0, 1, f, 0))
23 handle_nec(necpp.nec_ex_card(nec, 0, 0, 5, 0, 1.0, 0, 0, 0, 0, 0))
24 handle_nec(necpp.nec_rp_card(nec, 0, 90, 1, 0,5,0,0, 0, 90, 1, 0, 0, 0))
26 z = complex(necpp.nec_impedance_real(nec,result_index), necpp.nec_impedance_imag(nec,result_index))
27 print "f=%0.2fMHz \t(%6.1f,%+6.1fI) Ohms" % (f, z.real, z.imag)