コード例 #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