コード例 #1
0
def test_function(diffraction_calculator, default_structure):
    ref = ElectronDiffractionForwardModel(diffraction_calculator,
                                          default_structure,
                                          reciprocal_radius=1.,
                                          calibration=0.01)
    func = ref.function()
    np.testing.assert_almost_equal(func, 1)
コード例 #2
0
def test_simulate(diffraction_calculator, default_structure):
    ref = ElectronDiffractionForwardModel(diffraction_calculator,
                                          default_structure,
                                          reciprocal_radius=1.,
                                          calibration=0.01)
    sim = ref.simulate()
    assert isinstance(sim, DiffractionSimulation)
コード例 #3
0
def test_electron_diffraction_component_init(diffraction_calculator,
                                             default_structure):
    ref = ElectronDiffractionForwardModel(diffraction_calculator,
                                          default_structure,
                                          reciprocal_radius=1.,
                                          calibration=0.01)
    assert isinstance(ref, ElectronDiffractionForwardModel)