def test_sextractor_units():
 table = ascii.read('t/sextractor2.dat', Reader=ascii.SExtractor, guess=False)
 expected_units = [None, Unit('pix'), Unit('pix'), Unit('mag'), Unit('mag'), None, Unit('pix**2'), Unit('m**(-6)'), Unit('mag * arcsec**(-2)')]
 expected_descrs = ['Running object number', 'Windowed position estimate along x', 'Windowed position estimate along y', 'Kron-like elliptical aperture magnitude', 'RMS error for AUTO magnitude', 'Extraction flags', None, 'Barycenter position along MAMA x axis', 'Peak surface brightness above background']
 for (i, colname) in enumerate(table.colnames):
  assert (table[colname].unit == expected_units[i])
  assert (table[colname].description == expected_descrs[i])

def test_sextractor_units ( ) : table = ascii . read ( 't/sextractor2.dat' , Reader = ascii . SExtractor , guess = False ) expected_units = [ None , Unit ( 'pix' ) , Unit ( 'pix' ) , Unit ( 'mag' ) , Unit ( 'mag' ) , None , Unit ( 'pix**2' ) , Unit ( 'm**(-6)' ) , Unit ( 'mag * arcsec**(-2)' ) ] expected_descrs = [ 'Running object number' , 'Windowed position estimate along x' , 'Windowed position estimate along y' , 'Kron-like elliptical aperture magnitude' , 'RMS error for AUTO magnitude' , 'Extraction flags' , None , 'Barycenter position along MAMA x axis' , 'Peak surface brightness above background' ] for ( i , colname ) in enumerate ( table . colnames ) : assert ( table [ colname ] . unit == expected_units [ i ] ) assert ( table [ colname ] . description == expected_descrs [ i ] )
make sure that the sextractor reader correctly inputs descriptions and units .