comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MWRFITS not writing header
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: MWRFITS not writing header [message #93287 is a reply to message #93285] Mon, 06 June 2016 08:23 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Monday, June 6, 2016 at 7:28:07 AM UTC-4, Thomas Siegert wrote:

>
> Even the minimal example
>
> a=lonarr(10,10,10)
> hdr='COMMENT This is a comment line to put in the header''
> mwrfits,a,'test.fits',hdr
>
> does not include the head in the "test.fits" file.

You have to include a real FITS header not just a string. There are rules for a FITS header: for example the second line must start with BITPIX and say how many bits per pixel are in the data. You can use
http://idlastro.gsfc.nasa.gov/ftp/pro/fits/mkhdr.pro
to create a minimal FITS header given an array

Now two caveats:
1. The documentation for MWRFITS was incorrect (though it is now fixed
http://idlastro.gsfc.nasa.gov/ftp/pro/fits/mwrfits.pro ) which is what probably what led you to think you could supply a string rather than a FITS header.

2. I am not sure why using a FITS header from another file didn't work. Note that this FITS header must be written at the same time as the structure, or else it will be put in a different FITS extension.

--Wayne
[Message index]
 
Read Message
Read Message
Previous Topic: anyone using "an introduction to programmin g with IDL, by Kenneth P Bowman ?
Next Topic: contour problem (Triangle not in counterclockwise order)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:30:55 PDT 2025

Total time taken to generate the page: 0.00412 seconds