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_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)#