示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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
示例#6
0
 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
示例#7
0
 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