Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image size mismatch
07-20-2010, 19:22
Post: #1
Image size mismatch
I'm trying to register three images so that they have a common pixel scale/wcs/pixel locations. I've already used scamp to match the wcs for the images, and now I'm trying to use swarp to resample them to the same pixels. I have two large images and one small image, and I'm trying to output a new image for each which covers all of the smallest image, with some extra buffer. Unfortunately swarp seems to be ignoring my specifications for the final image size. The larger images end up having exactly the center and image size I specify (1500x1500). However for the smaller image, swarp seems to refuse to output the larger image I specify, and is instead outputting an image that is only slightly larger than the original (1208, 1082). It seems like it doesn't want to let me put on more than a small buffer (a few pixels). It also ends up centering the image on something other than the center I have specified, because the center I have specified is not at the center of the smaller sub image swarp insists on outputting. I've got everything set to manual, so I have no idea why it is doing this. Here's my configuration file:

# Default configuration file for SWarp 2.17.1-MP
# EB 2008-01-08
#----------------------------------- Output -----------------------------------
IMAGEOUT_NAME          coadd.fits      # Output filename
WEIGHTOUT_NAME       coadd.weight.fits # Output weight-map filename

HEADER_ONLY            N               # Only a header as an output file (Y/N)?
HEADER_SUFFIX          .head           # Filename extension for additional headers

#------------------------------- Input Weights --------------------------------

                                       # or MAP_WEIGHT
WEIGHT_SUFFIX          _rms.fits       # Suffix to use for weight-maps
WEIGHT_IMAGE                           # Weightmap filename if suffix not used
                                       # (all or for each weight-map)

#------------------------------- Co-addition ----------------------------------

COMBINE                N               # Combine resampled images (Y/N)?
                                       # or SUM

#-------------------------------- Astrometry ----------------------------------

                                       # GALACTIC,ECLIPTIC, or SUPERGALACTIC
PROJECTION_TYPE        TAN             # Any WCS projection code or NONE
PROJECTION_ERR         0.001           # Maximum projection error (in output
                                       # pixels), or 0 for no approximation
CENTER_TYPE            MANUAL          # MANUAL, ALL or MOST
CENTER         218.6232088 34.4488971  # Coordinates of the image center
PIXEL_SCALE            0.1283          # Pixel scale
IMAGE_SIZE             1500            # Image size (0 = AUTOMATIC)

#-------------------------------- Resampling ----------------------------------

RESAMPLE               Y               # Resample input images (Y/N)?
RESAMPLE_DIR           .               # Directory path for resampled images
RESAMPLE_SUFFIX        .resamp.fits    # filename extension for resampled images

                                       # or LANCZOS4 (1 per axis)
OVERSAMPLING           0               # Oversampling in each dimension
                                       # (0 = automatic)
INTERPOLATE            N               # Interpolate bad input pixels (Y/N)?
                                       # (all or for each image)

FSCALE_KEYWORD         FLXSCALE        # FITS keyword for the multiplicative
                                       # factor applied to each input image
FSCALE_DEFAULT         1.0             # Default FSCALE value if not in header

GAIN_KEYWORD           CCDGAIN         # FITS keyword for effect. gain (e-/ADU)
GAIN_DEFAULT           0.0             # Default gain if no FITS keyword found

#--------------------------- Background subtraction ---------------------------

SUBTRACT_BACK          N               # Subtraction sky background (Y/N)?
                                       # (all or for each image)

Any thoughts?
Find all posts by this user
Quote this message in a reply
07-25-2010, 10:13
Post: #2
RE: Image size mismatch

This happens because of the COMBINE set to N in your configuration file. During the initial resampling phase, SWarp tries to create output frames that are as small as possible; this makes it possible to stitch together many small exposures into a large output coadd without having the temporary files eating up huge amounts of disk space. In other words, the "filling" of empty areas is done during the combine stage, not during resampling.
I would suggest running SWarp for each input image separately with COMBINE set to Y.
- Emmanuel.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-29-2010, 15:57
Post: #3
RE: Image size mismatch
Okay, thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

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