Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Common area of overlap registration
07-15-2016, 21:08
Post: #1
Common area of overlap registration
I'm quite new to SWarp but am hoping that it can do what I'm looking for. Basically, what I want to do is register and trim a set of images back the area of common overlap using WCS info in the header. Although there are a number of ways to do this in IRAF, I'm looking for a way of doing it with minimal user interaction. I have a large number of images to work through, so I'd like to keep it as simple as possible.

The images are overlapping images from WISE and they test fine when running through SWarp. That is, I'm able to achieve a nice looking coadd but the resampled images (prior to the coadd) are not registered nor are these intermediate the same size (not clipped to the common overlap of the inputs). The registration is closer than the input images but still off by numbers related to the difference in sizes of the resampled images.

Does anyone know of a single-step procedure (SWarp or otherwise) for taking a list of input images and outputting registered (from WCS header info) images only over the area of common overlap?

To me, it looks like if the images were being trimmed back to the same size when creating the resampled images, it would be working.

Thanks for any guidance anyone can provide.

Mike

For reference, my swarp.conf follows...

# Default configuration file for SWarp 2.38.0
# EB 2014-03-19
#
#----------------------------------- 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 --------------------------------

WEIGHT_TYPE NONE # BACKGROUND,MAP_RMS,MAP_VARIANCE
# or MAP_WEIGHT
RESCALE_WEIGHTS N # Rescale input weights/variances (Y/N)?
WEIGHT_SUFFIX .weight.fits # Suffix to use for weight-maps
WEIGHT_IMAGE # Weightmap filename if suffix not used
# (all or for each weight-map)
WEIGHT_THRESH # Bad pixel weight-threshold

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

COMBINE Y # Combine resampled images (Y/N)?
COMBINE_TYPE MEDIAN # MEDIAN,AVERAGE,MIN,MAX,WEIGHTED,CLIPPED
# CHI-OLD,CHI-MODE,CHI-MEAN,SUM,
# WEIGHTED_WEIGHT,MEDIAN_WEIGHT,
# AND,NAND,OR or NOR
CLIP_AMPFRAC 0.3 # Fraction of flux variation allowed
# with clipping
CLIP_SIGMA 4.0 # RMS error multiple variation allowed
# with clipping
CLIP_WRITELOG Y # Write output file with coordinates of
# clipped pixels (Y/N)
CLIP_LOGNAME clipped.log # Name of output file with coordinates
# of clipped pixels
BLANK_BADPIXELS N # Set to 0 pixels having a weight of 0

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

CELESTIAL_TYPE NATIVE # NATIVE, PIXEL, EQUATORIAL,
# GALACTIC,ECLIPTIC, or SUPERGALACTIC
PROJECTION_TYPE SIN # Any WCS projection code or NONE
PROJECTION_ERR 0.00 # Maximum projection error (in output
# pixels), or 0 for no approximation
CENTER_TYPE MOST # MANUAL, ALL or MOST
CENTER 00:00:00.0, +00:00:00.0 # Coordinates of the image center
PIXELSCALE_TYPE MAX # MANUAL,FIT,MIN,MAX or MEDIAN
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

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

FSCALASTRO_TYPE NONE # NONE,FIXED, or VARIABLE
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
# 0 = infinity (all or for each image)
SATLEV_KEYWORD SATURATE # FITS keyword for saturation level (ADU)
SATLEV_DEFAULT 50000.0 # Default saturation if no FITS keyword

#--------------------------- 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)
BACK_FILTTHRESH 0.0 # Threshold above which the background-
# map filter operates

#------------------------------ Memory management -----------------------------

VMEM_DIR . # Directory path for swap files
VMEM_MAX 2047 # Maximum amount of virtual memory (MB)
MEM_MAX 256 # Maximum amount of usable RAM (MB)
COMBINE_BUFSIZE 256 # RAM dedicated to co-addition(MB)

#------------------------------ Miscellaneous ---------------------------------

DELETE_TMPFILES N # Delete temporary resampled FITS files
# (Y/N)?
COPY_KEYWORDS OBJECT # List of FITS keywords to propagate
# from the input to the output headers
WRITE_FILEINFO Y # Write information about each input
# file in the output image header?
WRITE_XML N # Write XML file (Y/N)?
XML_NAME swarp.xml # Filename for XML output
XSL_URL file:///usr/share/swarp/swarp.xsl
# Filename for XSL style-sheet
VERBOSE_TYPE NORMAL # QUIET,LOG,NORMAL, or FULL
NNODES 1 # Number of nodes (for clusters)
NODE_INDEX 0 # Node index (for clusters)

NTHREADS 0 # Number of simultaneous threads for
# the SMP version of SWarp
# 0 = automatic
NOPENFILES_MAX 512 # Maximum number of files opened by SWarp
Find all posts by this user
Quote this message in a reply
07-15-2016, 22:16
Post: #2
RE: Common area of overlap registration
I'll reply to my own post here as I realized that if I set the output image size to something smaller than the minimum dimensions that I would get without setting it, that things clip back nicely and I have registered images of the same size. This is good.

The only issue is that I have a large number of pointings each with a different overlap and different image dimensions that would come out.

So, I see a two-step process as inevitable here.

1. Run SWarp on the input images and then find the minimum image dimensions for the set of resampled outputs.
2. Run SWarp again, this time setting the image size to be equal to the dimensions found above.

Thanks for bearing with me...

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


Forum Jump:


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