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

Home » Public Forums » archive » very very strange thing is happening with modfits......
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: very very strange thing is happening with modfits...... [message #93466 is a reply to message #93464] Fri, 22 July 2016 11:01 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Friday, July 22, 2016 at 11:30:12 AM UTC-4, Sapna Mishra wrote:
> On Friday, July 22, 2016 at 8:30:03 PM UTC+5:30, wlandsman wrote:
>> On Friday, July 22, 2016 at 1:15:26 AM UTC-4, Sapna Mishra wrote:
>>> ..etc.
>>> But after modifying it to a fits file stored in variable:fname(n_elements(fname)-1)
>>> I got very different values: 2.26270e+28,-5.91691e-11.......with message:
>>
>> I don't know what is happening -- it works for me.
>>
>> But why don't you just write a new FITS file (using mwrfits.pro) instead of using modfits.pro? It is likely faster (and certainly less complicated) to write a complete new FITS file, rather than modify bits and pieces of an existing file.
>
> Actually what I want is that my fits file contains data and header in three extentions e.g. 0,1,2(h0,h1,h2) using mwrfits create a complete new files with a
> certain extention. What If i want to recover values of all other two extensions?
> Creating a new fits file with same name will do so???

If I am modifying an existing FITS file I typically use the FXBOPEN, FXBWRITE, FXBCLOSE family of functions. They are documented on the IDL Astronomy Library site.

extnum = 1
fxbopen, unit, 'myfile.fits', extnum, hh, access='RW'
fxbwrite, unit, aa.flux, 'FLUX', 1
fxbfinish, unit

Done.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: File units (de)allocation in IDL - what is the proper way?
Next Topic: table in fits format

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

Current Time: Wed Oct 08 11:47:43 PDT 2025

Total time taken to generate the page: 0.00250 seconds