Beispiel #1
0
def test_norm_vert():
    for surface in ('cosine','double_cosine','step','vshape'):
        normSurface = miniTopSim.simulation(
            os.path.join(filedir,""+surface+"_norm.cfg"),None)
        vertSurface = miniTopSim.simulation(
            os.path.join(filedir,""+surface+"_vert.cfg"),
            os.path.join(filedir,""+surface+"_norm.srf"))
def test_surface_on_itself():
    surface_a = simulation(os.path.join(filedir,"etch_dx1.cfg"))
    print(surface_a)
    surface_b = simulation(os.path.join(filedir,"etch_dx1.cfg"))
    print(surface_b)
    result = surface_a.distance(surface_b, '0')
    assert result < 0.225/2
def test_resume():

    oneGo = miniTopSim.simulation(os.path.join(filedir, "cosine_vert.cfg"),
                                  None)
    stepOne = miniTopSim.simulation(os.path.join(filedir, "cosine_vert_1.cfg"),
                                    None)
    stepTwo = miniTopSim.simulation(os.path.join(filedir, "cosine_vert_2.cfg"),
                                    "cosine_vert.srf")
    assert oneGo.distance(stepTwo, 0) < 0.003
Beispiel #4
0
def test_miniTopSim():
    '''
    this test is testing the miniTopSim.py script
    the test is checking of the generate srf file has equal values to the srf_save file
    for verfing the test the methode distance() of surface.py is used
    '''
    distance_measure = 0.720801905617422
    simulation(os.path.join(filedir,'etch_dx1.cfg'))
    surface1 = Surface(filename = os.path.join(filedir,'etch_dx1.srf'))
    surface2 = Surface(filename = os.path.join(filedir,'etch_dx0.125.srf_save'))
    distance = surface1.distance(surface2)
    assert distance  < (distance_measure/2)
Beispiel #5
0
def test_cosine_vert():
    '''
    this test is testing the miniTopSim.py script
    the test is checking of the generate srf file has equal values to the srf_save file
    for verfing the test the methode distance() of surface.py is used
    '''
    distance_measure = 2.3
    simulation(os.path.join(filedir, 'cosine_vert_1.cfg'))
    surface1 = Surface(filename=os.path.join(filedir, 'cosine_vert_1.srf'))
    surface2 = Surface(
        filename=os.path.join(filedir, 'cosine_vert_05.srf_save'))
    distance = surface1.distance(surface2)
    assert distance < (distance_measure / 2)
Beispiel #6
0
def test_erf():
    """
    Test if last surface of .srf file is equal to last surface of .srf_save file

    :var distance_measure:  maximum allowed difference between the two surfaces
    :var distance:          actual difference between the two surfaces
    """

    distance_measure = 1e-5

    simulation(os.path.join(filedir, 'erf.cfg'))
    surface1 = Surface(filename=os.path.join(filedir, 'erf.srf'))
    surface2 = Surface(filename=os.path.join(filedir, 'erf.srf_save'))

    distance = surface1.distance(surface2)
    assert distance < distance_measure
Beispiel #7
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
Beispiel #8
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
Beispiel #10
0
# -*- coding: utf-8 -*-
"""
Testing the distance between:
  surface_a with DELTA_X = 1 
  surface_b with DELTA_X = 0.125

Author: Paul von Ahsen
"""

import miniTopSim as mtp

mtp.simulation('etch_dx1.cfg', 'etch_dx0_125.srf')

Beispiel #11
0
def test_surface_on_other():
    surface_a = simulation(os.path.join(filedir, "etch_dx1.cfg"))
    surface_b = simulation(os.path.join(filedir, "etch_dx0_125.cfg"))
    result = surface_a.distance(surface_b, '10.0')

    assert result < 0.225 / 2