Subtracting a Galaxy template
Posted by cduston on Nov 07, 2023; 2:54am
URL: http://astroimagej.170.s1.nabble.com/Subtracting-a-Galaxy-template-tp2302.html
Hey all:
Questions:
Is it possible to subtract one image in a stack from all the others?
Otherwise, is there a way to make sure two images, opened separately, are actually aligned, before doing the subtraction?
Context:
I'm interested in trying to get AIJ to be able to subtract galaxy templates, for photometry of SN. I know this is not going to be "great" - maybe some kind of PSF or other modeling is "better" - but just wanna get something better than what we do now (pretend the galaxy isn't there....).
So what I can do is take an image of the galaxy without the SN in it (say, 6 months later, all images with WCS), and load it up in a stack with the SN images. I can then align them all, and do it virtually so they are saved in their own folder. Now, I can open the aligned comparison image and create a template:
1. Determine background value
2. Copy galaxy region with the circle tool thing
3. zero out the entire image (math -> set)
4. copy the region back in.
The result looks kinda reasonable to me. But, I can't quite get the subtraction. I can't seem to subtract one image in a stack from another....I can subtract an image from an entire stack, but even when those images *were* aligned, the subtraction doesn't happen in the right place - it's the same place in every image, but the separate image is not aligned with the stack, so the subtraction isn't in the right place.
So, that's where those questions come from. Thoughts?