def test_allhkl():
    diffcalc.util.DEBUG = True
    dc.con('eta', 0, 'chi', 0, 'phi', 0)
    dc.allhkl([.1, 0, .01], 1)
    

# def test_ub_help_visually(self):
#     print "-" * 80 + "\nub:"
#     print format_command_help(self.dc.ub.commands)
# 
# def test_hkl_help_visually(self):
#     print "-" * 80 + "\nhkl:"
#     print format_command_help(self.dc.hkl.commands)
def test_hkl_to_angles():
    dc.con('a_eq_b')
    dc.con('mu', 0)
    dc.con(NUNAME, 0)

    h, k, l = [1, 0, 0]
    angles_calc, param_calc = dc.hkl_to_angles(h, k, l)
    aneq_(angles_calc, angles)
    dneq_(param_calc, param)
def test_hkl_to_angles_bypassing_hardware_plugin():
    dc.con('a_eq_b')
    dc.con('mu', 0)
    dc.con(NUNAME, 0)

    h, k, l = [1, 0, 0]
    angles_calc, param_calc = dc.hkl_to_angles(h, k, l, en)
    aneq_(angles_calc, angles)
    dneq_(param_calc, param)
Beispiel #4
0
def test_hkl_to_angles():
    dc.con('a_eq_b')
    h, k, l = [1, 0, 0]
    angles_calc, param_calc = dc.hkl_to_angles(h, k, l, en)
    aneq_(angles_calc, angles)
    assert_dict_almost_equal(param_calc, param)