Re: How to add several *.fit files (matrices) into one output *.fit file? [message #63402 is a reply to message #63401] |
Thu, 06 November 2008 10:54   |
Griffons
Messages: 15 Registered: November 2008
|
Junior Member |
|
|
On Nov 6, 12:53 pm, Christopher Thom <ct...@oddjob.uchicago.edu>
wrote:
> Quoth Wox:
>
>> On Thu, 6 Nov 2008 09:14:30 -0800 (PST), Griffons
>> <griffon...@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
Thank you for your help Chris.
Griffons
|
|
|