Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug(?) with constant background subtraction
08-24-2010, 18:40
Post: #1
Bug(?) with constant background subtraction
Hello,

I have noticed a surprising behaviour in the way SWarp (2.17.6) subtracts a constant background level supplied via the BACK_DEFAULT keyword, and thought it might not be the way it was intended it to be.

It seems that SWarp is first scaling the image (including applying flux corrections due to astrometric distortion of the pixels) before subtracting the constant background.

Since I am supplying the background level of the input images (which I would guess is what most people would do), this means that the resampled images are imperfectly subtracted. This is only a small effect (sub-percent-level due to the astrometric effect) in the images I have, but since they have a very large background level it makes a mess of the mosaic.

For now I will just subtract the background before supplying the images to SWarp, but i thought it was worth mentioning in case it causes confusion for anyone else.

Cheers,

Dave
Find all posts by this user
Quote this message in a reply
08-25-2010, 23:30 (This post was last modified: 08-25-2010 23:31 by Emmanuel Bertin.)
Post: #2
RE: Bug(?) with constant background subtraction
Hi Dave,

thanks! Yes you are right. This is (was) a bug. Among other fixes, today I rewrote part of the code that handled the rescaling of pixel values. Please check out the latest development version. It should work as intended now. I will do a new release soon, unless I broke something.
Thanks again for reporting this problem.
- 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)