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)
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)
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)