---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-12-df1aebbb5cd2> in <module>()
1 #Now we have this agndat array wouldn't it be nice if we could
2 #we could read the distance into this stucture?
----> 3 agndat['Dist'] = c*agndat['Z']/H0 #Z is the redshift
/home/jakub/anaconda/lib/python2.7/site-packages/astropy/io/fits/fitsrec.pyc in __setitem__(self, key, value)
523 def __setitem__(self, key, value):
524 if isinstance(key, string_types):
--> 525 self[key][:] = value
526 return
527
/home/jakub/anaconda/lib/python2.7/site-packages/astropy/io/fits/fitsrec.pyc in __getitem__(self, key)
482 def __getitem__(self, key):
483 if isinstance(key, string_types):
--> 484 return self.field(key)
485 elif isinstance(key, (slice, np.ndarray, tuple, list)):
486 # Have to view as a recarray then back as a FITS_rec, otherwise the
/home/jakub/anaconda/lib/python2.7/site-packages/astropy/io/fits/fitsrec.pyc in field(self, key)
608 # NOTE: The *column* index may not be the same as the field index in
609 # the recarray, if the column is a phantom column
--> 610 col_indx = _get_index(self.columns.names, key)
611 if self.columns[col_indx]._phantom:
612 warnings.warn(
/home/jakub/anaconda/lib/python2.7/site-packages/astropy/io/fits/column.pyc in _get_index(names, key)
1543 indx = names.index(_key)
1544 elif count == 0:
-> 1545 raise KeyError("Key '%s' does not exist." % key)
1546 else: # multiple match
1547 raise KeyError("Ambiguous key name '%s'." % key)
KeyError: "Key 'Dist' does not exist."