imcombine
douglas brenner wrote on Jun 02, 2006
I have the following code
procedure getmedian
string *filelist
begin
#make list of files
if (access(filename = "left.lis"))
delete(file = "left.lis")
ls "*L.fits", > "left.lis"
filelist = "left.lis"
#make median image
imcombine(input = filelist, output = "leftmedian.fits", combine = "median")
end
left.lis looks like this
ker0017L.fits
ker0018L.fits
ker0019L.fits
ker0020L.fits
etc.
imcombine stopped after the first image. leftmedian.fits was the same as ker0017L.fits
What did I do wrong?
Thanks
procedure getmedian
string *filelist
begin
#make list of files
if (access(filename = "left.lis"))
delete(file = "left.lis")
ls "*L.fits", > "left.lis"
filelist = "left.lis"
#make median image
imcombine(input = filelist, output = "leftmedian.fits", combine = "median")
end
left.lis looks like this
ker0017L.fits
ker0018L.fits
ker0019L.fits
ker0020L.fits
etc.
imcombine stopped after the first image. leftmedian.fits was the same as ker0017L.fits
What did I do wrong?
Thanks
Mike Fitzpatrick wrote on Jun 02, 2006
It is a subtlety of the use of a "list directed parameter", in this case your 'filelist' script variable. Basically, these parameters return a value from the list each time they are queried, but you only use it in the one imcombine call and so it returns only the first image on the list, and so the input and output image is the same.
I think what you intended was for this to be an @file, try instead
or even just
Cheers,
-Mike
I think what you intended was for this to be an @file, try instead
imcombine(input="@left.lis", output=.......)or even just
imcombine(input="*L.fits", output=......)Cheers,
-Mike
douglas brenner wrote on Jun 02, 2006
thanks.
Last post on Jun 02, 2006