Group Abstract Group Abstract

Message Boards Message Boards

Errors of exporting FITS file

GROUPS:
Could anyone help? Always getting errors when export simple data to FITS format. I'm using Macbook Air, OS X 10.8.4. Not sure if it's machine dependent.   

e.g., 
 d = First@
    Import["http://exampledata.wolfram.com/messier61.fits.gz",
     "RawData"];
 
 Export["image.fits", d]
 
 ConstantArray::ilsmn: Single or list of non-negative machine-sized integers expected at position 2 of ConstantArray[32,{-17}]. >>
 Join::heads: Heads List and ConstantArray at positions 1 and 3 are expected to be the same. >>
 BinaryWrite::nocoerce: Join[{83,73,77,80,76,69,32,32,61,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,32,47,32,78,111,114,109,97,108,32,70,73,84,83,32,102,105,108,101,32,<<750>>},<<3>>,{32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,<<13>>,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,<<27>>}] cannot be coerced to the specified format. >>
POSTED BY: XIN Wang
Answer
1 year ago
Hi,

It worked for me using Mathematica9 under Windows 7.  Here is the header dump of the exported file using DS9:

SIMPLE = T / Normal FITS file
BITPIX = 16 / Bits/pixel, negative is floating point
NAXIS = 2 / Dimensionality of data
NAXIS1 = 561
NAXIS2 = 561
EXTENDED= T / Extensions may be present
PCOUNT = 0 / Deprecated
GCOUNT = 1 / Deprecated
BSCALE = 1 / Scale factor
BZERO = 0 / Zero factor real=tape*bscale+bzero
CREATOR = 'Created by Wolfram Mathematica 9.0 : www.wolfram.com'
END

Let me know if you want it tried using Mathematica8 (under Windows). 
POSTED BY: Frank Iannarilli
Answer
1 year ago
I have the same problem exporting FITS files. I'm running Mathematica 9 on Ubuntu 12.04 LTS (KDE). The error message when I export a known good FITS file is:
ConstantArray::ilsmn: "Single or list of non-negative machine-sized integers expected at position 2 of ConstantArray[32,{-17}]"
POSTED BY: Jonathan Aguilar
Answer
10 months ago