[AstroPy] Help with WindowsError: [Error 8]

Zachary Robinson zdr0001 at uah.edu
Tue Mar 11 14:06:56 EDT 2014


Hello,

I'm currently a graduate student working on a project for my adviser. The
data we are using has always been in CSV format and we have a bunch of
python programs using these CSV formatted files.  However, a small portion
of the oldest data we have is in FITS formatted files.  I've been put in
charge of extracting the data from these FITS files and putting them into
CSV files so we can use our programs we wrote. I read online that astropy
has the ability to do this so I've downloaded it and have started to learn
it using the documentation center.

However, I have experienced an issue while trying to learn the basics
commands of the table data portion of FITS file handling.  My code so far
is (infil is the location of the FITS files on my computer):

HDUlist = fits.open(infil)
HDUlist.info()
tbdata = HDUlist[1].data
print(tbdata[1])

When I try to run the program, I get this error message:

Traceback (most recent call last):
  File "C:\Documents and Settings\zach\Desktop\Dropbox\Probabilistic SPE
Model\GOES\Python Programs\Astropy and FIT Files Tutorial\Reading FITS
Files.py", line 52, in <module>
    tbdata = HDUlist[1].data
  File "C:\Program Files\Python27\lib\site-packages\astropy\utils\misc.py",
line 279, in __get__
    val = self._fget(obj)
  File "C:\Program
Files\Python27\lib\site-packages\astropy\io\fits\hdu\table.py", line 285,
in data
    data = self._get_tbdata()
  File "C:\Program
Files\Python27\lib\site-packages\astropy\io\fits\hdu\table.py", line 93, in
_get_tbdata
    self._data_offset)
  File "C:\Program
Files\Python27\lib\site-packages\astropy\io\fits\hdu\base.py", line 509, in
_get_raw_data
    return self._file.readarray(offset=offset, dtype=code, shape=shape)
  File "C:\Program
Files\Python27\lib\site-packages\astropy\io\fits\file.py", line 257, in
readarray
    shape=shape).view(np.ndarray)
  File "C:\Program Files\Python27\lib\site-packages\numpy\core\memmap.py",
line 237, in __new__
    mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)
WindowsError: [Error 8] Not enough storage is available to process this
command

Can anyone explain to me what this error is and how I can go about fixing
it? From what I've read online so far, I'm thinking it has something to do
with the mmap but I don't know what that is.

I'm running this code in Python 2.7 on a 32-bit WinXP machine.

Thanks a lot for the help,
Zach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140311/05bfafa0/attachment.html>


More information about the AstroPy mailing list