Author Topic: ABE substraction pedestal?  (Read 633 times)

Offline MARA25

  • Newcomer
  • Posts: 5
ABE substraction pedestal?
« on: 2019 June 20 18:51:00 »
Hello,

I have a question regarding the ABE algorithm when applying it as a subtraction.
When subtracting the mean background to an image, the resulting image background should have a mean of zero. Obviously we do not want negative values, so how is this handled? Is there a pedestal added before subtraction?

Here is something odd I noticed when applying ABE to a flat.
I used pixelmath to compute flat_ABE + flat_ABE_background (obtained with a down-sampling factor of 1 to maintain image size).
Then I subtracted the original flat to try to see what king of pedestal was there:
flat_ABE + flat_ABE_background - flat
I was expecting a uniform (constant intensity) image, but instead the result is strikingly similar to flat_ABE (mean and median are within 0.01%, MAD is smaller by ~10%).

Can anyone shed some light on what is happening behind the scenes with ABE?

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: ABE substraction pedestal?
« Reply #1 on: 2019 June 21 03:00:32 »
I have a question regarding the ABE algorithm when applying it as a subtraction.
When subtracting the mean background to an image, the resulting image background should have a mean of zero. Obviously we do not want negative values, so how is this handled? Is there a pedestal added before subtraction?

AutomaticBackgroundExtractor (ABE) calculates a background model (bg) of your image (flat). When you apply the model with 'Subtraction' to your image, the following calculation is executed:

Code: [Select]
flat - bg
and the result is rescaled:

Code: [Select]
Rescale(img) = (img - min(img)) / (max(img) - min(img))
Because of this rescaling operation, your addition

Code: [Select]
flat_ABE + flat_ABE_background
doesn't make sense, you are adding apples and oranges.

Bernd
« Last Edit: 2019 June 21 04:54:26 by bulrichl »

Offline MARA25

  • Newcomer
  • Posts: 5
Re: ABE substraction pedestal?
« Reply #2 on: 2019 June 21 05:07:50 »
Thanks, that makes more sense now.