本文整理汇总了Python中userinterface.add_cursor_position函数的典型用法代码示例。如果您正苦于以下问题:Python add_cursor_position函数的具体用法?Python add_cursor_position怎么用?Python add_cursor_position使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_cursor_position函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_gmos_south_port_one
def test_gmos_south_port_one():
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S20110804S0079.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 0.321, tolerance=0.02)
testutil.assert_tolerance(offsets[1], -0.004, tolerance=0.01)
testutil.assert_tolerance(offsets[2], 0.027, tolerance=0.002)
示例2: test_gmos_north_ifu_2_imaging
def test_gmos_north_ifu_2_imaging():
add_cursor_position(516.0, 1154.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20120122S0030.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 29.013, tolerance=0.004)
testutil.assert_tolerance(offsets[1], -1.457, tolerance=0.01)
示例3: test_gmos_south_with_a_weird_artifact
def test_gmos_south_with_a_weird_artifact():
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S20130114S0062.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], -0.028, tolerance=0.004)
testutil.assert_tolerance(offsets[1], 0.171, tolerance=0.01)
testutil.assert_tolerance(offsets[2], 0.015, tolerance=0.008)
示例4: test_gmos_N20130616S0089
def test_gmos_N20130616S0089():
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20130616S0089.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], -0.219, tolerance=0.03)
testutil.assert_tolerance(offsets[1], 0.102, tolerance=0.01)
testutil.assert_tolerance(offsets[2], 0.010, tolerance=0.01)
示例5: test_gmos_south_ifu_R_imaging
def test_gmos_south_ifu_R_imaging():
add_cursor_position(302.0, 1160.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", "-v", testutil.get_data_file_name("S20090326S0024.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 2.471, tolerance=0.004)
testutil.assert_tolerance(offsets[1], 1.035, tolerance=0.007)
示例6: test_gmos_north_ifu_R_imaging_on_a_stamp
def test_gmos_north_ifu_R_imaging_on_a_stamp():
add_cursor_position(154.0, 152.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20111126S0353.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 31.014, tolerance=0.040)
testutil.assert_tolerance(offsets[1], -1.457, tolerance=0.006)
示例7: test_move_single_object_to_center_of_slit
def test_move_single_object_to_center_of_slit():
add_cursor_position(498.0, 1146.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20060131S0014.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 1.994888, tolerance=0.02)
testutil.assert_tolerance(offsets[1], 0.929106, tolerance=0.08)
示例8: test_target_is_very_far_from_slit
def test_target_is_very_far_from_slit():
add_cursor_position(526.0, 1186.0, "r")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S00000000S0001.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], -2.095, tolerance=0.02)
testutil.assert_tolerance(offsets[1], 4.925, tolerance=0.005)
示例9: test_gmos_south_longslit
def test_gmos_south_longslit():
add_cursor_position(511.0, 1145.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S20071017S0003.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], -0.117, tolerance=0.06)
testutil.assert_tolerance(offsets[1], 0.632, tolerance=0.06)
示例10: test_bright_object_that_does_not_converge
def test_bright_object_that_does_not_converge():
add_cursor_position(391.0, 539.0, "a")
add_cursor_position(391.0, 539.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20060131S0011.fits")])
offsets = testutil.get_offsets()
testutil.assert_almost_equals(offsets,
(2.779, 0.672),
places=2)
示例11: test_cursor_coordinates_should_round_to_nearest_integer
def test_cursor_coordinates_should_round_to_nearest_integer():
add_cursor_position(489.07, 478.99, "a")
add_cursor_position(489.07, 478.99, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20060131S0012.fits")])
offsets = testutil.get_offsets()
testutil.assert_almost_equals(offsets,
(2.661, -3.874),
places=2)
示例12: test_gmos_north_ignore_offsets_and_start_science
def test_gmos_north_ignore_offsets_and_start_science():
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20130419S0270.fits")])
# ignore offsets and start science immediately
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 0.019, tolerance=0.004)
testutil.assert_tolerance(offsets[1], 0.073, tolerance=0.010)
testutil.assert_tolerance(offsets[2], 0.005, tolerance=0.010)
示例13: test_gmos_south_from_entire_field_of_view_with_exact_star_location
def test_gmos_south_from_entire_field_of_view_with_exact_star_location():
add_cursor_position(45.0, 61.0, "x")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S20090422S0074.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 0.271, tolerance=0.019)
testutil.assert_tolerance(offsets[1], -0.473, tolerance=0.006)
testutil.assert_tolerance(offsets[2], -0.080, tolerance=0.002)
示例14: test_gmos_N20130616S0090
def test_gmos_N20130616S0090():
add_cursor_position(148.0, 158.0, "r")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("N20130616S0090.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], -0.032, tolerance=0.02)
testutil.assert_tolerance(offsets[1], -0.015, tolerance=0.02)
testutil.assert_tolerance(offsets[2], 0.001, tolerance=0.01)
示例15: test_gmos_south_from_entire_field_of_view
def test_gmos_south_from_entire_field_of_view():
add_cursor_position(44.0, 64.0, "a")
add_cursor_position(0.0, 0.0, "q")
ret = main(["gacq_test", testutil.get_data_file_name("S20090422S0074.fits")])
offsets = testutil.get_offsets()
testutil.assert_tolerance(offsets[0], 0.271, tolerance=0.018)
testutil.assert_tolerance(offsets[1], -0.473, tolerance=0.005)
testutil.assert_tolerance(offsets[2], -0.080, tolerance=0.003)