def test_gmos_north_ifu_R_flat():
    add_cursor_position(9.0, 101.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(10.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20130717S0014.fits")])
def test_gmos_south_ifu_2_diffuse_object():
    add_cursor_position(10.5, 106.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(20.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("S20130421S0035.fits")])
def test_gmos_north_ifu_R():
    add_cursor_position(10.5, 101.5, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(9.6, 11.2, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20111126S0354.fits")])
def test_gmos_south_ifu_2_newer_flat():
    add_cursor_position(11.0, 102.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(20.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("S20130725S0014.fits")])
def test_gmos_north_ifu_2_flat():
    add_cursor_position(10.3, 102.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(20.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20130606S0009.fits")])
def test_gmos_south_ifu_2_flat():
    add_cursor_position(7.0, 108.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(20.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("S20130110S0028.fits")])
def test_gmos_south_ifu_2_bright_star():
    add_cursor_position(10.0, 108.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(19.0, 13.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("S20130227S0313.fits")])
def test_gmos_north_long_object():
    add_cursor_position(12.0, 99.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(9.0, 13.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20130605S0153.fits")])
def test_gmos_north_extended_fuzzy_object():
    add_cursor_position(8.6, 98.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(8.0, 14.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20130716S0160.fits")])
def test_gmos_north_ifu_2():
    add_cursor_position(12.0, 97.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(19.0, 14.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20120122S0031.fits")])
def test_old_gmos_north_with_3_boxes():
    centers = [(1187.0, 572.0),
               (5138.5, 3694.5),
               (1024.5, 4034.5)]

    acqimage = AcquisitionImage(get_data_file_name("N20060131S0015.fits"))
    assert_mos_acquisition(acqimage, centers, 0.4)
def test_gmos_north():
    centers = [(4408.0, 1601.0),
               (1387.5, 2168.5),
               (3548.0, 3052.0)]

    acqimage = AcquisitionImage(get_data_file_name("N20130419S0270.fits"))
    assert_mos_acquisition(acqimage, centers, 0.5)
def test_gmos_south_ifu_R():
    add_cursor_position(9.0, 101.0, "a")
    add_cursor_position(0.0, 0.0, "q")
    add_cursor_position(10.0, 10.0, "r")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("S20071017S0002.fits")])
def test_gmos_south_from_entire_field_of_view():
    centers = [(3956.0, 404.0),
               (3466.0, 596.5),
               (2397.0, 1626.5),
               (4949.5, 2795.0)]

    acqimage = AcquisitionImage(get_data_file_name("S20090422S0074.fits"))
    assert_mos_acquisition(acqimage, centers, 0.3)
def test_gmos_south_port_one():
    centers = [(1330.0, 4220.0),
               (2708.5, 3518.5),
               (2990.0, 642.0)]

    acqimage = AcquisitionImage(get_data_file_name("S20110804S0079.fits"))

    assert_mos_acquisition(acqimage, centers, 0.2)
def test_gmos_south_with_a_weird_artifact():
    acqimage = AcquisitionImage(get_data_file_name("S20130114S0062.fits"))

    centers = [(3923.0, 1384.5),
               (1708.6, 3424.4),
               (4955.4, 3834.4)]

    assert_mos_acquisition(acqimage, centers, 0.5)
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)
Esempio n. 18
0
def test_finding_an_easier_center():
    ad = AstroData(get_data_file_name("N20060131S0012.fits"))
    selection = get_selection_peak(ad.data, (489.07, 478.99), float(ad.pixel_scale()))

    predicted_center = selection.get_center()

    assert_tolerance(predicted_center,
                     (489.11025833697016, 478.68088198208636),
                     tolerance=0.02)
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)
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)
def test_gmos_south_off_center_boxes():
    centers = [(4780.5, 393.0),
               (4983.0, 3826.0),
               (1744.5, 4198.5)]

    acqimage = AcquisitionImage(get_data_file_name("S20071017S0001.fits"))

    # higher tolerance for tough case, new python version gets it "more correct" than automaskdetect
    assert_mos_acquisition(acqimage, centers, 0.7)
Esempio n. 22
0
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)
Esempio n. 23
0
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)
Esempio n. 24
0
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)
Esempio n. 25
0
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)
Esempio n. 26
0
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)
Esempio n. 27
0
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)
Esempio n. 28
0
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)
Esempio n. 29
0
def test_gmos_N20130616S0088():
    add_cursor_position(300.0, 303.0, "a")
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20130616S0088.fits")])

    offsets = testutil.get_offsets()
    testutil.assert_tolerance(offsets[0],  0.282, tolerance=0.01)
    testutil.assert_tolerance(offsets[1], -0.074, tolerance=0.01)
    testutil.assert_tolerance(offsets[2], -0.019, tolerance=0.02)
Esempio n. 30
0
def test_gmos_north_7_boxes():
    add_cursor_position(0.0, 0.0, "q")

    ret = main(["gacq_test", testutil.get_data_file_name("N20111123S0033.fits")])

    # ignore offsets and start science immediately
    offsets = testutil.get_offsets()
    testutil.assert_tolerance(offsets[0], -0.030, tolerance=0.03)
    testutil.assert_tolerance(offsets[1], -0.010, tolerance=0.006)
    testutil.assert_tolerance(offsets[2],  0.005, tolerance=0.002)