View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

more decimal places in phot centroid?

cody wrote on Sep 03, 2010

I am running phot on some images in which the stellar centroids oscillate a bit within an individual pixel during the time series. I need to remove this effect from the photometry, which requires precise measurement of the centroids.

It seems that phot only reports centroids to 2 decimal places, whereas I need 3 to accurately fit for these sub-pixel effects. And sometimes the values reported by phot suddenly become constant, when I know that the centroid is still moving around.

So: Is there any way to get phot to output more decimals? Or do you recommend a different iraf program that will return the centroid (via the moment method) at higher precision, so that I can feed it into phot?

Mike Fitzpatrick wrote on Sep 03, 2010

Have a look at the STARFIND task in the IMAGES.IMCOORD package, it'll do moment centroiding and the wcs/wxformat/wyformat parameters will let you control the output precision. Getting more precision from PHOT itself would require a code change and recompile of the task, I can talk you through that but STARFIND might be all you need.

-Mike

cody wrote on Sep 03, 2010

I see. STARFIND does look like a good option- thanks.

But having never used it, I don't immediately see a way for it to centroid my particular input stars (as opposed to centroiding *all* stars in the field that satisfy certain criteria in terms of brightness and shape). Is there a way to get it to find and centroid stars based on a particular x,y input list?

I have a rather long time series for which I want to do photometry on the same objects in each image. And unfortunately the images are quite undersampled, so if I leave it up to starfind to choose the stars then it will likely select cosmic rays in some images. Don't really want to do photometry on those :)

thanks!
cody

Mike Fitzpatrick wrote on Sep 03, 2010

STARFIND won't directly to the matching, have a look at a task like XYXYMATCH to match the starfind output with your input star list. If you have just a few stars to match in each image, you might also try running STARFIND in a small image section around each object, most likely you would need to write a script to coordinate this.

cody wrote on Sep 03, 2010

All right, it actually looks like the imcentroid task produces more decimal places, so I think I'll just do that. It takes x,y input. I guess the "marginal" centroid that it calculates isn't quite equivalent to the "moment" centroid but hopefully they're close enough for my purposes...

cody

Last post on Sep 03, 2010