Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMAGE_SIZE + COMBINE=N
02-12-2008, 12:08
Post: #1
IMAGE_SIZE + COMBINE=N
Hi,

I've run into a few issues while trying to use SWarp to align two images in preparation of using them for SExtractor double-image mode (e.g. two images in different filters of the same region on the sky). If you run SExtractor in that mode you need to make two images of identical size. Therefore you need to specify the IMAGE_SIZE parameter in SWarp.

However, with COMBINE=N, IMAGE_SIZE=something fixed, CENTER_TYPE=MANUAL, and a CENTER which is a ways outside of your input image, you will not get an image of the specified IMAGE_SIZE as output.

It appears SWarp will keep the size of the resampled images to a minimum; only padding the output grid with zeros when COMBINE=Y.

Another way to describe the problem is that it seems IMAGE_SIZE is a size around the projection center; but I'm interested in a region about 4000 pixels away from that center. I think an option "FIELD_CENTER" of something like that would help (perhaps CENTER vs. PROJECTION_CENTER). Could something like this be added to SWarp?


Regards,
Ewout Helmich
Find all posts by this user
Quote this message in a reply
02-12-2008, 12:29
Post: #2
RE: IMAGE_SIZE + COMBINE=N
Hi,

this can be done using an external header file.

The easiest way would be the following:
swarp -HEADER_ONLY Y -IMAGEOUT_NAME coadd.head -WEIGHTOUT_NAME /dev/null image1.fits image2.fits

(this is generating a fits header file which can be used for coaddition)

and then:
swarp image1.fits && mv coadd.fits image1_new.fits && mv coadd.weight.fits image1_new.weight.fits
swarp image2.fits && mv coadd.fits image2_new.fits && mv coadd.weight.fits image2_new.weight.fits

(this will resample your images according to the external header, so they get the same size, center...)

Another thing is to just cut some area out of the images. You may edit that header file to fit your needs. The syntax is not that difficult to understand. I also can provide you a small c-program which generates such a header file according to options your specify (the field center, pix/arcsec, size). The program only requires cfitsio.

HTH,

Best regards Jan
Find all posts by this user
Quote this message in a reply
02-19-2008, 14:27
Post: #3
RE: IMAGE_SIZE + COMBINE=N
Hi,

Thanks for the reply. I didn't know I could use an external header file in this way.

Unfortunately I'm particularly interested in getting this functionality available as a simple option to SWarp, because on my end I'm running SWarp from within a larger pipeline.
Using the header file or cutting out a region of an image turns running SWarp into a 2 step process, which requires me to significantly rewrite the interface I wrote for this pipeline. Even though it's simply a translation step, it still feel this is supposed to be SWarp's job.

Regards,
Ewout Helmich
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)