astropy/astropy — pull request #2710 by embray (2014-09-16 22:37:48+00:00)
Title: FITS objects created with `fromstring` have problems?

I have some FITS objects being created from strings. I can't access their `data` attribute. I think it has to do with `_orig_bitpix` being negative, possibly, but I'm not sure. @embray any thoughts? I can provide an example if needed.

```
In [32]: blah._orig_bitpix
Out[32]: -32

In [33]: blah.data
Traceback (most recent call last):
File "", line 1, in
blah.data
File "/Users/adam/repos/astropy/astropy/utils/misc.py", line 286, in __get__
val = self._fget(obj)
File "/Users/adam/repos/astropy/astropy/io/fits/hdu/image.py", line 218, in data
data = self._get_scaled_image_data(self._data_offset, self.shape)
File "/Users/adam/repos/astropy/astropy/io/fits/hdu/image.py", line 594, in _get_scaled_image_data
if self._file.memmap:
AttributeError: 'NoneType' object has no attribute 'memmap'

> /Users/adam/repos/astropy/astropy/io/fits/hdu/image.py(594)_get_scaled_image_data()
593 else: # floating point cases
--> 594 if self._file.memmap:
595 data = raw_data.copy()
```