My understanding is that ABE in a sense does not subtract a background, but a gradient (only what is above order 0 of the interpolated surface, or something like that). So the background color balance is maintained.
ABE does exactly this. By adding back the median of the image we are trying to recover the original mean background. If we don't add the median, then we are neutralizing the background (provided the background model is accurate, of course). Neutralization can be desirable or not, but for an automatized procedure we decided to implement a less invasive correction.
Anyway, I'll add an option to disable the addition of the median. With this option enabled, of course ABE will prevent any clipping of negative values automatically.
To neutralize the background I found the script in http://pixinsight.com/forum/viewtopic.php?t=799
Yes, this was a really excellent work by Oriol and David. This tool deserves a C++ implementation as a module.
May I assume that all processes clip the image at 0.0 and 1.0 at the end (unless there is an explicit rescale, which already limit the values) ?
Indeed. Floating point images (real and complex) are internally bounded to the normalized real range [0,1]. Of course, PixInsight uses the whole range of 32-bit and 64-bit IEEE 754 floating point to perform all intermediate calculations, but the final result of any process is always rescaled or truncated to [0,1], as appropriate and/or selected by the user. This is necessary for PixInsight to know what is black and what is white, among other important reasons.