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

Home » Public Forums » archive » How to add several *.fit files (matrices) into one output *.fit file?
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: How to add several *.fit files (matrices) into one output *.fit file? [message #63409 is a reply to message #63325] Thu, 06 November 2008 09:53 Go to previous message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth Wox:

> On Thu, 6 Nov 2008 09:14:30 -0800 (PST), Griffons
> <griffons76@gmail.com> wrote:
>
>> I downloaded readfits, writefits and the other files required.
>> I am not sure what to do next. I compiled and ran readfits and
>> writefits, but then what to do?
>
> files=['test1.fits','test2.fits',...] ; use e.g. file_search for this
> sum = READFITS( files[0], /NOSCALE)
> for i=1,n_elements(files)-1 do $
> sum += READFITS( files[i], /NOSCALE)
> writefits, 'sum_filename', sum
>
> Both readfits and writefits depend on some other procedures from the
> ASTRO library. Make sure you compiled them too.

And a minor point to add...be clear that you really want to specify the
/NOSCALE option. If the fits images have BSCALE and BZERO set in the
header, then you may want them scaled appropriately before summing...

cheers
chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: imsl_survival_glm
Next Topic: Is there a simple way to describe and plot a simple geometry

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

Current Time: Wed Oct 08 15:55:43 PDT 2025

Total time taken to generate the page: 0.00445 seconds