<filename>test/test_checkerboard.py<gh_stars>0
from mypy import checkerboard
from mypy import checkerboardcut
from mypy import checkerboardcircle
import numpy as np


def test_checkerboard():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboard([rho], ["Lattice test case"],
                 filename="img/checkerboardtest.png")


def test_checkerboard_multiple():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboard([rho, rho], ["Title 1", "Title 2"],
                 filename="img/checkerboardtest_multiple.png")


def test_checkerboardcecut():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboardcut([rho], ["Lattice test case"],
                    filename="img/checkerboardtest_cut.png")

    checkerboard([rho], ["Lattice test case"], isolines=[], dolines=True,
                 filename="img/checkerboardtest_hlinesvlines.png")


def test_checkerboardcecutmultiple():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboardcut([rho, rho], ["Lattice test case", "Title 2"],
                    filename="img/checkerboardtest_cutmultiple.png")


def test_checkerboardcircle():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",") + 1e-13
    rho = np.log10(rho)
    r = [1, 2, 3.5]
    checkerboard([rho], ["Lattice test case"], r, isolines=[],
                 filename="img/checkerboardtest_circle.png")
    checkerboardcircle([rho], [""], r,
                       filename="img/checkerboardtest_manycircle.png",
                       linewidth=3)

<filename>test/test_checkerboard.py<gh_stars>0
from mypy import checkerboard
from mypy import checkerboardcut
from mypy import checkerboardcircle
import numpy as np


def test_checkerboard():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboard([rho], ["Lattice test case"],
                 filename="img/checkerboardtest.png")


def test_checkerboard_multiple():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboard([rho, rho], ["Title 1", "Title 2"],
                 filename="img/checkerboardtest_multiple.png")


def test_checkerboardcecut():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboardcut([rho], ["Lattice test case"],
                    filename="img/checkerboardtest_cut.png")

    checkerboard([rho], ["Lattice test case"], isolines=[], dolines=True,
                 filename="img/checkerboardtest_hlinesvlines.png")


def test_checkerboardcecutmultiple():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",")
    rho = np.log10(rho)
    checkerboardcut([rho, rho], ["Lattice test case", "Title 2"],
                    filename="img/checkerboardtest_cutmultiple.png")


def test_checkerboardcircle():
    rho = np.loadtxt("rho_checkerboard.txt", delimiter=",") + 1e-13
    rho = np.log10(rho)
    r = [1, 2, 3.5]
    checkerboard([rho], ["Lattice test case"], r, isolines=[],
                 filename="img/checkerboardtest_circle.png")
    checkerboardcircle([rho], [""], r,
                       filename="img/checkerboardtest_manycircle.png",
                       linewidth=3)
