Fix FITS Table string related fails with Astropy dev
@@ -263,17 +263,11 @@ class SourceCatalog(object):
Source data
"""
data = OrderedDict()
- for colname in table.colnames:
- col = table[colname]
-
- if isinstance(col, Quantity):
+ for name, col in table.columns.items():
val = col[idx]
- else:
- val = col.data[idx]
if col.unit:
- val = Quantity(val, col.unit)
-
- data[colname] = val
+ val = val * col.unit
+ data[name] = val
return data
@property
