ztf images and aperture photometry

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ztf images and aperture photometry

sengle01
Hello,

There's a very strange behavior when I try to run aperture photometry on ztf image cutouts. (I was using 5.03.00 and just upgraded to 5.03.02)

The images open up just fine, and hovering the cursor around shows coordinates and pixel values and everything. But when I try to run aperture photometry, it gives me an error that there's no signal for it to centroid on, as if perhaps it can't read the pixel values or something similar. Also, If I de-select the centroid feature, it allows me to click around and also asks for the magnitudes of comparison stars, but it doesn't actually place any apertures. So for that, it almost seems as though it has trouble reading the coordinates of the files and maybe doesn't know where the apertures should go?

Let me know if this is something you've heard of before, or if perhaps there's something obvious that I'm missing.

Thank you,
Scott

ztf_20220228206400_000556_zr_c05_o_q1_sciimg_ra48.fits
Reply | Threaded
Open this post in threaded view
|

Re: ztf images and aperture photometry

sengle01
Sorry for the quick follow-up, but I should've also mentioned that I use AIJ for images from a couple other telescope and it works perfectly fine for them.

So it seems AIJ has an issue with something about the ztf images themselves.

Thanks again,
Scott
Reply | Threaded
Open this post in threaded view
|

Re: ztf images and aperture photometry

karenacollins
Administrator
Hi Scott,

We expect you may have "Use RA/Dec to place apertures" enabled in the Multi-Aperture panel. When this mode is enabled, the fits header must contain information that allows AIJ to convert from X,Y coordinates to RA/Dec coordinates, and a separate set of header information for the reverse translation from RA/Dec back to X,Y coordinates. From a quick look at the headers in the example image you linked, I can see the translation parameters from X,Y to RA/Dec, but couldn't spot headers for the inverse direction.

If the above interpretation is correct, there are two options that will allow you to use the images in current versions of AIJ. (1) You can re-platesolve the images with AIJ or another tool that will update the full plate-solution in the header. (2) If there is no reason you need to place apertures by RA/Dec, simply disable the Multi-Aperture option "Use RA/Dec to place apertures" and (at least according to the sample image) multi-aperture works just fine without spending the time to re-platesolve all images.

Thanks for your investigatory work on this issue Kevin E!

Karen
Reply | Threaded
Open this post in threaded view
|

Re: ztf images and aperture photometry

sengle01
Hello,

I'm sorry for the long delay in replying, and thank you for the response and advice. I've been looking into it and I have the issue mostly worked out.

I re-solved the images using astrometry.net and that resolved the issue for individual images.

My remaining problem is running multi-aperture photometry on an imported image sequence **when the images have different sizes**. If the images are all of the same size, then I can import them either as a virtual stack or not and each image's WCS info is read without issue.

However, any images of a different size to the first in the sequence are reported as having no WCS info (even though they've also been solved with astrometry.net). But any other images in the sequence that are the same size as the first, even if they come after images of a different size, will have their WCS info successfully read. Or at least that's been my experience. I recently upgraded to v5.1.0.00.

I'm uploading a zip archive of 8 test images that have all been solved with astrometry.net - when sorted by filename, the first and last images have the same size but the middle 6 have a different size.

I imagine a quick solution would be to batch process them and fill out the images with black pixels to an arbitrarily large size, so they're all the same. Or trim them all down to the smallest image's size. But I figured I would put this up here in case there might be a way to modify AIJ's handling of differently-sized images.

Best,
Scotttest.zip
Reply | Threaded
Open this post in threaded view
|

Re: ztf images and aperture photometry

karenacollins
Administrator
Hi Scott,

The underlying ImageJ currently has a limitation in that it requires all images in a stack to be the same size as the first image in the stack. We have a feature request on our to-do list to try to gracefully handle these situations by cropping larger or filling smaller images so that they are the same size as the first.

If that if you are extracting differentially photometry, you'll need of course need to ensure that all of the same comparison stars to occur in all images.

We will not be able to spend resources on this in the near term, so making sure the images are all the same size outside if AIJ is a workaround.

Another work around is to process each batch of images that are of the same size together. Then open the images that have a different and run multi-aperture on them. Keep the measurements table loaded between runs and results will be added to the bottom of the table. As I mentioned above, if you are running differential photometry, you'll need to pre-determine a set of comp stars that exist in all image sizes.

Karen