flatspin.vertices#

Vertex analysis

flatspin.vertices.find_vertices(grid, pos, angle, win_size)#

Find the vertices of a geometry

Parameters:
  • grid (Grid object) – The grid of the spin positions

  • angle (1D array) – The angles of each spin

  • win_size ((height, width)) – The window size to scan the grid

  • (vi (Returns a tuple)

  • vj

  • vi (indices) where)

  • indices (vj are the vertex)

  • vertex (and indices is a list of spin indices corresponding to each)

  • index.

flatspin.vertices.vertex_type_ising(spin, pos, angle)#
flatspin.vertices.vertex_dir(pos, angle)#

Calculate the direction of spins in a vertex

Determines whether spins point towards or away from the vertex center

Returns an array containing 1 if the spin points towards, and -1 if the spin points away from the vertex center, respectively

flatspin.vertices.vertex_rotation(spin, pos, angle, vortex_only=False)#

Calculate the rotation of a vertex

Returns positive number of spins of the vertex rotated counter-clockwise (positive increase in degrees), negative number of spins rotated counter-clockwise, and othwerwise 0 (no rotation)

vortex_only=True gives +1 or -1 only if all spins are rotated in the same direction, otherwise 0.

flatspin.vertices.vertex_charge(spin, pos, angle, normalize=True)#

Calculate the magnetic charge of a vertex

flatspin.vertices.vertex_type_square(spin, pos, angle)#
flatspin.vertices.vertex_type_tri(spin, pos, angle)#
flatspin.vertices.vertex_type(spin, pos, angle)#

Determine the type of a vertex given its spins and angles

flatspin.vertices.vertex_pos(pos, vertices)#
flatspin.vertices.vertex_mag(mag, vertices)#