Esempio n. 1
0
def test_yamamura():

    thisSurface = miniTopSim.simulation(os.path.join(filedir, "yamamura.cfg"),
                                        None)
    otherSurface = load_last_from_srf(
        os.path.join(filedir, "yamamura.srf_save"))
    assert thisSurface.distance(otherSurface, 0) < 0.003
Esempio n. 2
0
def test_erf():
    """ Perform test for surface similarity of simulated and stored surface
    
    Test is utilizing the error function based beam 
    """

    # Execute simulation based on given config file
    thisSurface = miniTopSim.simulation(os.path.join(filedir, "erf.cfg"), None)

    # Load stored surface data
    otherSurface = load_last_from_srf(os.path.join(filedir, "erf.srf_save"))

    # Compare and assert in case of failure
    assert thisSurface.distance(otherSurface, 0) < 0.003
def test_yamamura_redep_1():
    import os, sys
    filedir = os.path.dirname(__file__)
    codedir = os.path.join(filedir, '..', '..', 'code')
    sys.path.insert(0, codedir)

    import miniTopSim
    import surface
    import plot

    simulated = miniTopSim.simulation(
        os.path.join(filedir, 'yamamura_redep_1.cfg'), False)
    saved = surface.load_last_from_srf(
        os.path.join(filedir, 'yamamura_redep_1.srf_save'))
    assert simulated.distance(saved, 0) < 0.0027584