Re: Possible bug in Fits.exe on Mac OSX Mathematica 6.0.3
- To: mathgroup at smc.vnet.net
- Subject: [mg91125] Re: Possible bug in Fits.exe on Mac OSX Mathematica 6.0.3
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Thu, 7 Aug 2008 04:37:23 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g6c9ao$bv1$1@smc.vnet.net> <g6emtk$co2$1@smc.vnet.net>
Jean-Marc Gulliet wrote: > yves.grosdidier at gmail.com wrote: > >> I am trying to import a 4 dimensional data FITS file: 1024 x 1024 x >> 272 x 1. >> >> This file is a bona fide FITS file, created by the Canadian Astronomy >> Data Centre (more precisely it is one file extracted from the Canadian >> Galactic Plane Survey: http://www1.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/cgps/query.html). >> >> After the command, >> >> nebula=Import["CGPS_MB2_HI_line_image.fits.gz",{"GZIP","FITS"}]; >> >> here is the error message I obtain: >> >> Import::errstruct: "Malformed data structure. \!\(\"Missing required \ >> keyword BITPIX\"\)." >> >> Using another software, I have checked that the required keyword >> exists... >> >> My question: is Mathematica able to handle FITS files having more than >> 2 dimensions (data cubes, etc.)? > > FYIW, > > I downloaded a FITS file (about 445 MB) from the website you mentioned. > Then I tried to import the compress as well as the uncompress file > without success but with a different message/problem from yours: the > import helper program Fits.exe quits unexpectedly. (The downloaded file > is good since MicroObservatory Image 2.0 [1] has no problem to read and > manipulate it.) > > Configuration: 64-bit Intel Core 2 Duo 4 GB RAM Mac OSX Leopard 1.5.4 > Mathematica 6.0.3 > > In[1]:= Timing[ > image = Import["CGPS_MH1_HI_line_image.fits.gz", {"GZIP", "FITS"}]] > > During evaluation of In[1]:= LinkObject::linkd:Unable to communicate \ > with closed link \ > LinkObject[/Applications/Mathematica.app/SystemFiles/Converters/\ > Binaries/MacOSX-x86-64/FITS.exe,9,9]. >> > > Out[1]= {3.98607, $Failed} > > In[2]:= Timing[image = Import["CGPS_MH1_HI_line_image.fits"]] > > During evaluation of In[2]:= LinkObject::linkd:Unable to communicate \ > with closed link \ > LinkObject[/Applications/Mathematica.app/SystemFiles/Converters/\ > Binaries/MacOSX-x86-64/FITS.exe,10,9]. >> > > Out[2]= {3.70389, $Failed} > > In[3]:= $Version > > Out[3]= "6.0 for Mac OS X x86 (64-bit) (May 21, 2008)" > > > Regards, > - Jean-Marc > > [1] "MicroObservatory Image 2.0", > http://mo-www.harvard.edu/MicroObservatoryImage/ > I submitted a bug report [TS 25343] about the error on my system (64-bit Intel Mac OS X Leopard 1.5.4 Mathematica 6.0.3). It seems the error on my system is due to the size of the file I downloaded because the import program/Mathematica needs 4 times the file's size in memory to convert the file. Here is an extract of last email I got from WRI: "Then I am able to reproduce the second error that you receive; in this case, I believe the problem is occurring because of the size of the file that you are trying to import; a FITS file that is ~600 MB will take up about 4 times as much memory space when imported into Mathematica, and Mathematica will have a lot of problems when attempting to deal with a file that requires that kind of space. I am able to import smaller FITS files with no difficulty." Regards, -- Jean-Marc