astropy/astropy — pull request #996 by iguananaut (2013-04-18 22:15:15+00:00)
Title: Column.null not used when writing FITS table?

In the process of working on #591 I ran across the following issue:

```
import numpy as np
from astropy.io.fits import BinTableHDU

NULLS = {}
NULLS['a'] = 2
NULLS['b'] = 'b'
NULLS['c'] = 2.3

data = np.array(list(zip([1, 2, 3, 4],
['a', 'b', 'c', 'd'],
[2.3, 4.5, 6.7, 8.9])),
dtype=[('a', int), ('b', 'S1'), ('c', float)])

b = BinTableHDU(data)
for col in b.get_coldefs():
col.null = NULLS[col.name]

# check that null is set
print b.get_coldefs()

b.writeto('test.fits', clobber=True)
```

produces a FITS file which doesn't have any TNULL keywords in the header - any idea why? The print statement shows:

```
ColDefs(
name = 'a'; format = 'K'; null = 2
name = 'b'; format = 'A1'; null = 'b'
name = 'c'; format = 'D'; null = 2.3
)
```