Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected output image size
07-16-2010, 20:20 (This post was last modified: 07-16-2010 20:42 by Emmanuel Bertin.)
Post: #1
Unexpected output image size
Dear Swarp,

I am a beginner so be patient with me if I am posting a silly question.
I am trying to median combine different images of stars from the same field to create a PSF template.
The images are something like 11x11 pixels but I get an output image size of 11x12 or so (the same happens for different sizes); plus, I have some "black" areas on the image borders.
The same problem persists if I combine the very same image with itself.

I attach a snapshot of the problematic image (left:Swarp output,right:one of the original frames).


I went through the manual and the present forum, but I didn't find any explanation for this.
I tried to use MANUAL scale type but it didn't help. Actually I tried to play with all parameters as well as with previous Swarp releases.

Thank you very much for the help,

#----------------------------------- 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          .weight.fits    # Suffix to use for weight-maps
WEIGHT_IMAGE                           # Weightmap filename if suffix not used
                                       # (all or for each weight-map)

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

COMBINE                Y               # 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         00:00:00.0, +00:00:00.0 # Coordinates of the image center
PIXEL_SCALE            0.0             # Pixel scale
IMAGE_SIZE             0               # 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           GAIN            # 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)

BACK_TYPE              AUTO            # AUTO or MANUAL
                                       # (all or for each image)
BACK_DEFAULT           0.0             # Default background value in MANUAL
                                       # (all or for each image)
BACK_SIZE              128             # Background mesh size (pixels)
                                       # (all or for each image)
BACK_FILTERSIZE        3               # Background map filter range (meshes)
                                       # (all or for each image)
Find all posts by this user
Quote this message in a reply
07-16-2010, 20:29
Post: #2
RE: Unexpected output image size
Dear Peblo -

You need to change PIXELSCALE_TYPE to MANUAL (keeping CENTER_TYPE to MANUAL), and then specify PIXEL_SCALE and IMAGE_SIZE.

Good luck!

Find all posts by this user
Quote this message in a reply
07-17-2010, 01:42
Post: #3
RE: Unexpected output image size
Dear Ioannis,
euaristw for the quick reply!

I already tried the solution you suggested, but unfortunately the problem persists. It really looks like Swarp is systematically selecting a sub-region of the images. The non-zero pixels in the output are the same whatever image size I demand.
In fact, I tried to Swarp an image with itself (I didn't cut out any subimage this time) and the result is again that I miss some pixel lines/columns.

I shall say that I am dealing with a NIR image which comes from a Swarp combination of ~40 tiny fields.
May this be the source of the problem?
Find all posts by this user
Quote this message in a reply
07-25-2010, 09:51
Post: #4
RE: Unexpected output image size
Hi Peblo,

the default interpolation function (RESAMPLING_TYPE LANCZOS3) operates on a 6x6 kernel and therefore leaves 2-3 pixel large "black" borders within the output image, simply because information is missing for interpolation outside the input frame boundaries. You might want to provide SWarp with larger input images, and trim down the resulting coadd. You may also use a smaller interpolation kernel (e.g. RESAMPLING_TYPE BILINEAR), but this will generate more aliasing.
- Emmanuel.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

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