Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
weighting factor set to 1
09-20-2006, 04:17
Post: #1
weighting factor set to 1
I'm trying to run swarp on a series of 4 images with weight maps. I am subtracting a "manual" background equal to the median of each image. I am getting a warning that says:
> Filtering background map(s)
> WARNING: Null or negative global weighting factor:defaulted to 1

Background: 132.8233 RMS: 1 Weight scale: 1

If I use the same weightmaps, but set the manual background to some arbitrary number (rather than the median or mode of the image), I do not get the error. I have also checked that my input images contain no INDEFs, NaNs, or other non-numerics. Any ideas?

Thanks,
-Katelyn
Find all posts by this user
Quote this message in a reply
09-20-2006, 23:07
Post: #2
RE: weighting factor set to 1
How strange. I just checked the code. This should not happen; the manual background parameter has nothing to do with the weight scaling factor!! Could you please send me the SWarp configuration file and/or the full command line? Thanks.
- Emmanuel.
Visit this user's website Find all posts by this user
Quote this message in a reply
09-21-2006, 00:41
Post: #3
RE: weighting factor set to 1
Hi Emmanuel, here's the config file I'm using:

#
#----------------------------------- 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 MAP_WEIGHT # "BACKGROUND","MAP_RMS","MAP_VARIANCE"
# or "MAP_WEIGHT"
WEIGHT_THRESH 2
WEIGHT_SUFFIX .weight.fits # Suffix to use for weight-maps
WEIGHT_IMAGE lweighta1.fits,lweighta2.fits,lweighta3.fits,lweighta4.fits # Weightmap filename if suffix not used
# (all or for each weight-map)

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

COMBINE Y # Combine resampled images (Y/N)?
COMBINE_TYPE WEIGHTED # "MEDIAN","AVERAGE","MIN","MAX"
# "WEIGHTED", "CHI2" or "SUM"

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

CELESTIAL_TYPE NATIVE # "NATIVE", "PIXEL", "EQUATORIAL",
# "GALACTIC" or "ECLIPTIC"
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 ALL # "MANUAL", "ALL" or "MOST"
CENTER 00:00:00.0, +00:00:00.0 # Coordinates of the image center
PIXELSCALE_TYPE MANUAL # "MANUAL", "FIT", "MIN", "MAX"
# or "MEDIAN"
PIXEL_SCALE 0.25 # 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 BILINEAR # "NEAREST","BILINEAR","LANCZOS2",
# "LANCZOS3" 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)

FSCALASTRO_TYPE FIXED # "NONE" or "FIXED"
FSCALE_KEYWORD FLXSCALE # FITS keyword for the multiplicative
# factor to apply to each input image
FSCALE_DEFAULT 1.0 # Default FSCALE value if not in header

GAIN_KEYWORD GAIN # FITS keyword for eff. gain (e-/ADU)
GAIN_DEFAULT 0.0 # Default gain if no FITS keyword found
# 0 = infty (all or for each image)

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

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

BACK_TYPE MANUAL # "AUTO" or "MANUAL"
# (all or for each image)
BACK_DEFAULT 15.28,133.2,-20.08,-91.62 # 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)

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

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

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

DELETE_TMPFILES Y # 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 N # Write information about each input
# file in the output image header?
VERBOSE_TYPE NORMAL # "QUIET","NORMAL" or "FULL"

NTHREADS 1 # 1 single thread
Find all posts by this user
Quote this message in a reply
09-22-2006, 14:53
Post: #4
RE: weighting factor set to 1
I did tests with the configuration file and the 2 images you sent me; I don't detect any problem for now. I will make further checks using Valgrind. What version of SWarp are you running? I tested with 2.15.7 and 2.16.
- Emmanuel.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-16-2006, 21:19
Post: #5
RE: weighting factor set to 1
I have encountered the same error, regardless of whether I use
2.15.7 or 2.16.  The error is:

-------------- File bootes1.7055s.fits:
    "no ident"  WEIGHTED  no ext. header  2048x2048  32 bits (floats)
    Center: 14:25:02.79 +35:37:08.3   5.13'x5.13'  Scale: 0.1504 ''/pixel
    Gain: 4.01 e-/ADU   Flux scaling (astrom/photom): 0.9967 X / 1 X
> Filtering background map(s)
> WARNING: Null or negative global weighting factor:defaulted to 1

    Background: 0   RMS: 1   Weight scale: 1
___________________________________________________

The final stack that comes out has a value of zero in every pixel. 
 Any ideas on what causes this error?  I'll attach my script I used
to run SWarp.  Thanks.
Find all posts by this user
Quote this message in a reply
12-17-2006, 19:22
Post: #6
RE: weighting factor set to 1
Just to summarize the follow-ups to this problem: it is caused by images in which most pixels are set to the exact same value; on such "unphysical" images SWarp (or SExtractor) assumes that the background noise has zero variance, and therefore cannot scale the weight-map properly.
- 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)