def test_d_spacing_for_first_hkl_of_bcc(self): """Assert the d_spacing values for the first BCC structure are correct""" _handler = BraggEdgeCalculator(structure_name="BCC", lattice=1.) _handler.calculate_hkl() _handler.calculate_bragg_edges() self.assertAlmostEqual(0.7071, _handler.d_spacing[0], delta=0.0001) self.assertAlmostEqual(0.5, _handler.d_spacing[1], delta=0.0001) self.assertAlmostEqual(0.4083, _handler.d_spacing[2], delta=0.0001)
def test_d_spacing_for_first_hkl_of_bcc(self): """Assert the d_spacing values for the first BCC structure are correct""" _handler = BraggEdgeCalculator(structure_name = "BCC", lattice=1.) _handler.calculate_hkl() _handler.calculate_bragg_edges() self.assertAlmostEqual(0.7071, _handler.d_spacing[0], delta=0.0001) self.assertAlmostEqual(0.5, _handler.d_spacing[1], delta=0.0001) self.assertAlmostEqual(0.4083, _handler.d_spacing[2], delta=0.0001)
def test_bragg_edge_for_first_hkl_of_bcc(self): """Assert the bragg edge values for the first BCC structure are correct""" _handler = BraggEdgeCalculator(structure_name="BCC", lattice=1.) _handler.calculate_hkl() _handler.calculate_bragg_edges() self.assertAlmostEqual(1.4142, _handler.bragg_edges[0], delta=0.0001) self.assertAlmostEqual(1.0, _handler.bragg_edges[1], delta=0.0001) self.assertAlmostEqual(0.8165, _handler.bragg_edges[2], delta=0.0001)
def test_bragg_edge_for_first_hkl_of_bcc(self): """Assert the bragg edge values for the first BCC structure are correct""" _handler = BraggEdgeCalculator(structure_name = "BCC", lattice=1.) _handler.calculate_hkl() _handler.calculate_bragg_edges() self.assertAlmostEqual(1.4142, _handler.bragg_edges[0], delta=0.0001) self.assertAlmostEqual(1.0, _handler.bragg_edges[1], delta=0.0001) self.assertAlmostEqual(0.8165, _handler.bragg_edges[2], delta=0.0001)