Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- matrix = [[ 0 for x in range(C1)]for y in range (T1)]
- print "matrix generated with ",height, " rows and ",width," coloumns."
- #######################################
- for j in range (0,height) :
- vtu_filename = str(targets[j])
- vtu_file=vtktools.vtu(vtu_filename)
- vtu_file.GetFieldNames()
- Magn=vtu_file.GetVectorField('Magnetization') #total magnetization af all cells
- for i in range (0,width):
- cell_mag_total = Magn[i] #total magnetization of ith cell
- My = cell_mag_total[1]
- #Mx_array.append(Mx)
- matrix[j][i] = My
- # np.savetxt("mx.txt",np.c_[matrix])
- print "type matrix + " , type(matrix)
- for colm in range (0,width):
- print colm
- signal = matrix[][colm]
- print type(signal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement