[AstroPy] Help with WindowsError: [Error 8]

Dominik Klaes dklaes at astro.uni-bonn.de
Wed Mar 12 14:50:37 EDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

As I already wrote: A lot of lines are simply empty, that could explain while the actual file size is smaller than the expected size.

Cheers,

Dominik

On 12. März 2014 19:31:06 MEZ, Zachary Robinson <zdr0001 at uah.edu> wrote:
>Sure.
>
>WARNING: File may have been truncated: actual file length (9947040) is
>smaller than the expected size (10736640) [astropy.io.fits.file]
>Filename: C:\Documents and Settings\zach\Desktop\H0638308.FIT
>No.    Name         Type      Cards   Dimensions   Format
>0    PRIMARY     PrimaryHDU      34   ()
>1                BinTableHDU    221   892800R x 4C   [J, J, I, I]
>
>This is the output after running fits.info().
>
>Zach
>
>
>
>On Wed, Mar 12, 2014 at 1:00 PM, Erik Bray <embray at stsci.edu> wrote:
>
>> On 03/11/2014 02:49 PM, Zachary Robinson wrote:
>> > Perry,
>> >
>> > The FITS file is 3.66MB. The dimensions of the table are 892800Rx4C
>>
>> This raises the question, however, of what the formats are of the
>columns.
>> Could you please post the entire header(s) of this file and the
>output of
>> fits.info() on the file?
>>
>> Erik
>>
>> >> On Mar 11, 2014, at 1:09 PM, Perry Greenfield
><stsci.perry at gmail.com>
>> wrote:
>> >>
>> >> How big is the table?
>> >>
>> >> It's quite possible you are running into a 32-bit limitation,
>> particularly if the table is 2GB or bigger.
>> >>
>> >> Perry
>> >>
>> >>
>> >>> On Mar 11, 2014, at 2:06 PM, Zachary Robinson wrote:
>> >>>
>> >>> 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
>> >>> _______________________________________________
>> >>> AstroPy mailing list
>> >>> AstroPy at scipy.org
>> >>> http://mail.scipy.org/mailman/listinfo/astropy
>> >>
>> > _______________________________________________
>> > AstroPy mailing list
>> > AstroPy at scipy.org
>> > http://mail.scipy.org/mailman/listinfo/astropy
>> >
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>AstroPy mailing list
>AstroPy at scipy.org
>http://mail.scipy.org/mailman/listinfo/astropy

- --
Dominik Klaes
Student representative of the AIfA
Argelander-Institut für Astronomie
Room 2.027a
Auf dem Hügel 71
53121 Bonn

Telefon: 0228/73-5773
E-Mail: dklaes at astro.uni-bonn.de
-----BEGIN PGP SIGNATURE-----
Version: APG v1.0.9

iQJGBAEBCgAwBQJTIKx9KRxEb21pbmlrIEtsYWVzIDxka2xhZXNAYXN0cm8udW5p
LWJvbm4uZGU+AAoJEG4xBfJ3OX2tN4AP/Rs0jssHIaQDD37DPqHUxZzBaqnvUpiq
17XqhQKWuos35vUEcYS4LKbD2r5XfF3V183ttEMkVIEp35Y4E6EvCrJWEJlBDYJf
uCWsQkLFcw1WxNLahNTVG5Y0EUxsYPlcRPu74EVJ/1YO21CvGzfrmjVHrLLXwta1
wFL0zTStaOZx83FSDZ7W4kOWiEWBNMlxDMvzK5bbCpi0VOCsQemCZ+1+zRqp+yyB
+nwhzGEILl5FFrYgj602vWjW0gyNDyENVBkJEk3kzYCUo1QaY4hSEaRSGJjdpuRg
s0/jItpLHbR1Y3R84tfDIuIHhoADOpRKsHoRpjy+OUkhi5FGE3i0ZCttEnAZiw+5
fuKrbFgfYtoYXmypao9MZpSEf6YqRXnEXYPTJIW0RJnz2UW0KEa9pmJaMK9HV1ef
3P+f/bgzf07+jSWU+AKfKxZ0MaES5IOcVIerMGUKU6l7hDfH4ZU3RGYt7uE0t184
EJHGb7ZerTTmaKHVOkE+Uwp12YH+maFpjqu5o7HnTPZxXxPIR1XOufugN3GdlJSl
WqR9WB79iKk74go8nj8L50HVHZ8pMrrchnpxsmN860EF4AD7BZ+bLJlKLUL2FfZJ
dguuTcaBSbpGxO594cvDCtB4EbNEW2/hWAEmtnkzOBV5QRJbp0thp21YrRbUGNtE
NPBeqAh/lg02
=oA0r
-----END PGP SIGNATURE-----




More information about the AstroPy mailing list