Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
beginners's question: basic reprojection+resampling with Swarp prior to stiff
06-07-2010, 23:10 (This post was last modified: 06-07-2010 23:23 by hdole.)
Post: #1
beginners's question: basic reprojection+resampling with Swarp prior to stiff
Dear Emmanuel and others,

I have 3 fits files of data taken in 3 different bands (say im1.fits,
im2.fits, and im3.fits), with different pixel plates, and pixels numbers,
of about the same sky area. These images are already mosaics.

I'd like to resample/reproject 2 of these 3 images on the same grid as
the first image im1.fits, in order to use later on stiff and make a color
image of the field.

Let me know what I'm doing wrong, because the 2 new images
created by swarp don't have the wished scale, even if the 2 output
images have the correct output number of pixels. Here are the 5 steps.


1- I extract the header of im1.fits and copy it into coadd.head

2- I run: swarp im2.fits:

(I replace the coordinates by XX.XXX, sorry)

----- SWarp 2.17.6 started on 2010-06-07 at 23:35:19 with 2 threads

> Creating NEW output image...
> WARNING: FITS header data read in coadd.head

------- Output File coadd.fits:
"no ident" WEIGHTED EXT. HEADER 538x513 32 bits (floats)
Center: XX:XX:04.16 XXX:XX:46.8 89.7'x85.5' Scale: 10 ''/pixel
Gain: 0 e-/ADU Flux scaling (astrom/photom): 1 X / 1 X
-------------- File im2.fits:
"no ident" unweighted no ext. header 328x309 64 bits (floats)
Center: XX:XX:02.73 XXX:XX:46.8 54.7'x51.5' Scale: 10 ''/pixel
Gain: 0 e-/ADU Flux scaling (astrom/photom): 1 X / 1 X
Background: -0.002326172 RMS: 0.005045766
-------------- Co-adding frames
Maximum overlap density: 1 frame
> All done (in 0 s)

3- then I copy coadd.fits into im2reproj.fits

4- and then I run: swarp im3.fits

----- SWarp 2.17.6 started on 2010-06-07 at 23:35:19 with 2 threads

> Creating NEW output image...
> WARNING: FITS header data read in coadd.head

------- Output File coadd.fits:
"no ident" WEIGHTED EXT. HEADER 538x513 32 bits (floats)
Center: XX:XX:06.17 XXX:XX:50.8 126'x120' Scale: 14 ''/pixel
Gain: 0 e-/ADU Flux scaling (astrom/photom): 1 X / 1 X
-------------- File im3.fits:
"no ident" unweighted no ext. header 235x222 64 bits (floats)
Center: XX:XX:03.16 XXX:XX:43.8 54.8'x51.8' Scale: 14 ''/pixel
Gain: 0 e-/ADU Flux scaling (astrom/photom): 1 X / 1 X
Background: -0.0005180826 RMS: 0.006137856
-------------- Co-adding frames
Maximum overlap density: 1 frame
> All done (in 2 s)

5- Indeed the outoput files have 10"/pixel and 14"/pixel, but I wished
the output images had the same plats scale as coadd.head -> how
to match the scales ?

Thanks

Herve
Find all posts by this user
Quote this message in a reply
06-07-2010, 23:41
Post: #2
RE: beginners's question: basic reprojection+resampling with Swarp prior to stiff
Dear Herve -

You should be able to fully control the parameters of your mosaic by setting the CENTRAL_TYPE and PIXELSCALE_TYPE parameters to "MANUAL" and then specifying the desired output PIXEL_SCALE (e.g., in arcsec/pixel), CENTER (i.e., central ra,dec), and IMAGE_SIZE (dimensions of the output mosaic) parameters for each of your three mosaics.

Hope this helps.

Cheers,
John
Find all posts by this user
Quote this message in a reply
06-08-2010, 10:55
Post: #3
RE: beginners's question: basic reprojection+resampling with Swarp prior to stiff
Thanks John!
Ideed, I just had to modify:
PIXELSCALE_TYPE MANUAL
and
PIXEL_SCALE 6.0 # arcsec
and it worked beautifully.

cheers
Herve
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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