def test_has_catalog_data_mixed_primary(self): """ Check primary of mixed image/cat file for image data. """ with fits.open(self.hh_tstfyl) as hdus: assert utils.has_catalog_data(hdus, which_hdu=0) is False
def test_has_catalog_data_mixed(self): """ Check catalog extension of mixed image/cat file for image data. """ with fits.open(self.hh_tstfyl) as hdus: assert utils.has_catalog_data(hdus) is True
def test_has_catalog_data_bad_high_hdu(self): """ Check non-existant extension of catalog file for catalog data. """ with fits.open(self.table_tstfyl) as hdus: assert utils.has_catalog_data(hdus, which_hdu=2) is False
def test_has_catalog_data_bad_low_hdu(self): """ Check primary HDU of catalog file for catalog data. """ with fits.open(self.table_tstfyl) as hdus: assert utils.has_catalog_data(hdus, which_hdu=0) is False
def test_has_catalog_data_nonex_hdu(self): """ Check non-existant extension of image file for catalog data. """ with fits.open(self.m13_tstfyl) as hdus: assert utils.has_catalog_data(hdus) is False
def test_has_catalog_data_good_hdu(self): """ Check explicit HDU of catalog file for catalog data. """ with fits.open(self.table_tstfyl) as hdus: assert utils.has_catalog_data(hdus, which_hdu=1) is True
def test_has_catalog_data_default(self): """ Check default HDU of catalog file for catalog data. """ with fits.open(self.table_tstfyl) as hdus: assert utils.has_catalog_data(hdus) is True