[AstroPy] Image combine
Tue Mar 6 13:11:36 CST 2012
There is a "lite" version called numcombine living in stsci.image. It
doesn't exactly have a user friendly interface and I would definitely do it
differently if I had to do it again. But it might be a place to start.
On Tue, Mar 6, 2012 at 2:01 PM, Kathleen Labrie <firstname.lastname@example.org> wrote:
> I think Jose mostly refer to the rejection, masking, scaling, weighing
> algorithms that iraf imcombine offers. I agree the arithmetic is easy
> enough to do with numpy and pyfits, even the median. It's the rest
> of imcombine that can get tricky (and bloated).
> For the record, here at Gemini, we will soon embark it that foolish
> of trying to reproduce at least some of the imcombine features (but only
> the ones we need due to time and resource constraints). We are still
> at the point of defining which features we really need though, so I don't
> think it will help Jose much for now.
> I am very interested to hear if someone has written some code for a
> imcombine-like routine.
> On Mar 6, 2012, at 8:52 AM, Erik Tollerud wrote:
> > I'm not aware of a function that does it exactly with the interface of
> > imcombine, but it can be done pretty easily with pyfits:
> > import pyfits
> > f1 = pyfits.open('filename1')
> > f2 = pyfits.open('filename2')
> > h1 = f1.header
> > im1 = f1.data
> > im2 = f2.data
> > newimage = im1 + im2
> > newhdu = pyfits.PrimaryHDU(data=newimage,header=h1)
> > newhdu.writeto('newfilename')
> > That example is specific to addition, of course (the im1 + im2 part,
> > but it should be clear how to generalize it to other arithmetic
> > operations.
> > 2012/3/6 Jose Miguel Ibáñez <email@example.com>:
> >> Hello everyone,
> >> does anyone know of an implementation of the iraf.imcombine task in
> >> python+numpy ? (of course, not using pyraf.imcombine call)
> >> Thanks !
> >> Jose
> >> _______________________________________________
> >> AstroPy mailing list
> >> AstroPy@scipy.org
> >> http://mail.scipy.org/mailman/listinfo/astropy
> > --
> > Erik Tollerud
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy@scipy.org
> > http://mail.scipy.org/mailman/listinfo/astropy
> AstroPy mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the AstroPy