Exemplo n.º 1
0
def test_grid_get_spin_matrix():
    system_data = systemdata.SystemData(spin_data_small_path())
    current_grid = grid.Grid(system_data)
    assert current_grid.get_spin_matrix() == system_data.spins
Exemplo n.º 2
0
def test_connection_data_dimension_column():
    system_data = systemdata.SystemData(spin_data_small_path())
    assert len(system_data.connections[0]) == 16
Exemplo n.º 3
0
def test_spin_data_dimension_row():
    system_data = systemdata.SystemData(spin_data_small_path())
    assert len(system_data.spins) == 4
Exemplo n.º 4
0
def test_connection_data_first_entry():
    system_data = systemdata.SystemData(spin_data_small_path())
    assert system_data.connections[0][0] == 2
Exemplo n.º 5
0
def test_spin_data_first_entry():
    system_data = systemdata.SystemData(spin_data_small_path())
    assert system_data.spins[0][0] == -1
Exemplo n.º 6
0
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm

import argparse
import sys
sys.path.append('../src')
import systemdata

parser = argparse.ArgumentParser()
parser.add_argument('filename')
args = parser.parse_args()

system_data = systemdata.SystemData(args.filename)
spin_matrix = system_data.spins

fig, ax = plt.subplots()
i = ax.imshow(spin_matrix, cmap=cm.Greys, interpolation='nearest')
plt.show()