@@ -1105,18 +1105,24 @@ def plot(self, simulation, plot_name):
11051105 vector_info = self ._ngspice_shared .ngGet_Vec_Info (name .encode ('utf8' ))
11061106 vector_type = self ._simulation_type [vector_info .v_type ]
11071107 length = vector_info .v_length
1108- # self._logger.debug("vector[{}] {} type {} flags {} length {}".format(i,
1109- # vector_name,
1110- # vector_type,
1111- # self._flags_to_str(vector_info.v_flags),
1112- # length))
1108+ # template = 'vector[{}] {} type {} flags {} length {}'
1109+ # self._logger.debug(template.format(
1110+ # i,
1111+ # vector_name,
1112+ # vector_type,
1113+ # self._flags_to_str(vector_info.v_flags),
1114+ # length,
1115+ # ))
11131116 if vector_info .v_compdata == ffi .NULL :
1114- # for k in xrange (length):
1117+ # for k in range (length):
11151118 # print(" [{}] {}".format(k, vector_info.v_realdata[k]))
11161119 tmp_array = np .frombuffer (ffi .buffer (vector_info .v_realdata , length * 8 ), dtype = np .float64 )
11171120 array = np .array (tmp_array , dtype = tmp_array .dtype ) # copy data
1121+ # import json
1122+ # with open(name + '.json', 'w') as fh:
1123+ # json.dump(list(array), fh)
11181124 else :
1119- # for k in xrange (length):
1125+ # for k in range (length):
11201126 # value = vector_info.v_compdata[k]
11211127 # print(ffi.addressof(value, field='cx_real'), ffi.addressof(value, field='cx_imag'))
11221128 # print(" [{}] {} + i {}".format(k, value.cx_real, value.cx_imag))
0 commit comments