Пример #1
0
def test_fits_file_lower_case(make_data_path):
    """Caused issue #143

    The file contains

        MTYPE1       = sky                  / DM Keyword: Descriptor name.
        MFORM1       = X,Y                  / [pixel]
        MTYPE2       = EQPOS                / DM Keyword: Descriptor name.
        MFORM2       = RA,Dec               / [deg]

    so it has - for the transformed case - a column name that
    is not upper case.

    """

    infile = make_data_path("1838_rprofile_rmid.fits")
    tbl = ui.unpack_table(infile, colkeys=["RA", "Dec"])

    assert isinstance(tbl, Data1D)
    assert len(tbl.x) == len(tbl.y)
    assert len(tbl.x) == 38
    assert tbl.staterror is None
    assert tbl.syserror is None

    # Every point is the same, which makes it easy to check
    #
    assert (tbl.x == tbl.x[0]).all()
    assert (tbl.y == tbl.y[0]).all()

    assert tbl.x[0] == pytest.approx(278.3897960639)
    assert tbl.y[0] == pytest.approx(-10.5690222237)
Пример #2
0
 def read_func(filename):
     return ui.unpack_table(filename, ncols=3)
Пример #3
0
 def _read_func(self, filename):
     return ui.unpack_table(filename, ncols=3)
Пример #4
0
 def _read_func(self, filename):
     return ui.unpack_table(filename, ncols=3)