Exemple #1
0
def mod_cryst_map():
    """
    Generates a Crystallographic Map with (5,17,6) as the modal angle
    """
    base = np.empty((6, 3), dtype="object")
    base[0] = [
        0,
        np.array([5, 17, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[1] = [
        0,
        np.array([5, 17, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[2] = [
        0,
        np.array([6, 19, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[3] = [
        0,
        np.array([7, 19, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[4] = [
        0,
        np.array([8, 19, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[5] = [
        0,
        np.array([9, 19, 6]),
        {
            "correlation": 5e-17,
            "orientation_reliability": 0.5
        },
    ]
    crystal_map = CrystallographicMap(base.reshape((3, 2, 3)))
    crystal_map.method = "template_matching"
    return crystal_map
Exemple #2
0
def dp_cryst_map_vector():
    """
    Generates a Crystallographic Map with two phases from vector matching
    """
    base = np.empty((4, 3), dtype="object")
    base[0] = [
        0,
        np.array([5, 17, 6]),
        {
            "match_rate": 0.5,
            "ehkls": np.array([0.1, 0.05, 0.2]),
            "total_error": 0.1,
            "orientation_reliability": 13.2,
            "phase_reliability": 42.0,
        },
    ]
    base[1] = [
        1,
        np.array([6, 17, 6]),
        {
            "match_rate": 0.5,
            "ehkls": np.array([0.1, 0.05, 0.2]),
            "total_error": 0.1,
            "orientation_reliability": 13.2,
            "phase_reliability": 42.0,
        },
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]),
        {
            "match_rate": 0.5,
            "ehkls": np.array([0.1, 0.05, 0.2]),
            "total_error": 0.1,
            "orientation_reliability": 13.2,
            "phase_reliability": 42.0,
        },
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]),
        {
            "match_rate": 0.5,
            "ehkls": np.array([0.1, 0.05, 0.2]),
            "total_error": 0.1,
            "orientation_reliability": 13.2,
            "phase_reliability": 42.0,
        },
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = "vector_matching"
    return crystal_map
Exemple #3
0
def dp_cryst_map_vector():
    """
    Generates a Crystallographic Map with two phases from vector matching
    """
    base = np.empty((4, 3), dtype='object')
    base[0] = [
        0,
        np.array([5, 17, 6]), {
            'match_rate': 0.5,
            'ehkls': np.array([0.1, 0.05, 0.2]),
            'total_error': 0.1,
            'orientation_reliability': 13.2,
            'phase_reliability': 42.0
        }
    ]
    base[1] = [
        1,
        np.array([6, 17, 6]), {
            'match_rate': 0.5,
            'ehkls': np.array([0.1, 0.05, 0.2]),
            'total_error': 0.1,
            'orientation_reliability': 13.2,
            'phase_reliability': 42.0
        }
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]), {
            'match_rate': 0.5,
            'ehkls': np.array([0.1, 0.05, 0.2]),
            'total_error': 0.1,
            'orientation_reliability': 13.2,
            'phase_reliability': 42.0
        }
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]), {
            'match_rate': 0.5,
            'ehkls': np.array([0.1, 0.05, 0.2]),
            'total_error': 0.1,
            'orientation_reliability': 13.2,
            'phase_reliability': 42.0
        }
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = 'vector_matching'
    return crystal_map
Exemple #4
0
def dp_cryst_map():
    """
    Generates a Crystallographic Map with two phases
    """
    base = np.empty((4, 3), dtype="object")
    base[0] = [
        0,
        np.array([5, 17, 6]),
        {
            "correlation": 3e-17,
            "orientation_reliability": 0.5,
            "phase_reliability": 0.6,
        },
    ]
    base[1] = [
        1,
        np.array([6, 17, 6]),
        {
            "correlation": 2e-17,
            "orientation_reliability": 0.4,
            "phase_reliability": 0.7,
        },
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]),
        {
            "correlation": 4e-17,
            "orientation_reliability": 0.3,
            "phase_reliability": 0.1,
        },
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]),
        {
            "correlation": 8e-16,
            "orientation_reliability": 0.2,
            "phase_reliability": 0.8,
        },
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = "template_matching"
    return crystal_map
Exemple #5
0
def dp_cryst_map():
    """
    Generates a Crystallographic Map with two phases
    """
    base = np.empty((4, 3), dtype='object')
    base[0] = [
        0,
        np.array([5, 17, 6]), {
            'correlation': 3e-17,
            'orientation_reliability': 0.5,
            'phase_reliability': 0.6
        }
    ]
    base[1] = [
        1,
        np.array([6, 17, 6]), {
            'correlation': 2e-17,
            'orientation_reliability': 0.4,
            'phase_reliability': 0.7
        }
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]), {
            'correlation': 4e-17,
            'orientation_reliability': 0.3,
            'phase_reliability': 0.1
        }
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]), {
            'correlation': 8e-16,
            'orientation_reliability': 0.2,
            'phase_reliability': 0.8
        }
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = 'template_matching'
    return crystal_map
Exemple #6
0
def sp_cryst_map():
    """
    Generates a single phase Crystallographic Map
    """
    base = np.empty((4, 3), dtype="object")
    base[0] = [
        0,
        np.array([5, 17, 6]),
        {
            "correlation": 3e-17,
            "orientation_reliability": 0.5
        },
    ]
    base[1] = [
        0,
        np.array([6, 17, 6]),
        {
            "correlation": 2e-17,
            "orientation_reliability": 0.4
        },
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]),
        {
            "correlation": 4e-17,
            "orientation_reliability": 0.3
        },
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]),
        {
            "correlation": 8e-16,
            "orientation_reliability": 0.2
        },
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = "template_matching"
    return crystal_map
Exemple #7
0
def sp_cryst_map():
    """
    Generates a single phase Crystallographic Map
    """
    base = np.empty((4, 3), dtype='object')
    base[0] = [
        0,
        np.array([5, 17, 6]), {
            'correlation': 3e-17,
            'orientation_reliability': 0.5
        }
    ]
    base[1] = [
        0,
        np.array([6, 17, 6]), {
            'correlation': 2e-17,
            'orientation_reliability': 0.4
        }
    ]
    base[2] = [
        0,
        np.array([12, 3, 6]), {
            'correlation': 4e-17,
            'orientation_reliability': 0.3
        }
    ]
    base[3] = [
        0,
        np.array([12, 3, 5]), {
            'correlation': 8e-16,
            'orientation_reliability': 0.2
        }
    ]
    crystal_map = CrystallographicMap(base.reshape((2, 2, 3)))
    crystal_map.method = 'template_matching'
    return crystal_map