Stacking cuts negative values

During stacking, Siril seems to cut negative values, in order to keep the range of the data between 0-1 or 0-65536 which is normally is not a problem because you don’t have negative values in your images.

But when calibrating images (especially darks), you have to subtract the offset from it which might result in negative values because both are very dim images. This should be normal but it seems for some cameras (Canaon EOS 700D and 6D tested so far), after subtracting the offset/bias from the darks, most of the values are actually negative:

Even the median is negative which means that the majority of the values in the image is negative, so if the negative values are cut, most of the information is gone.
I would say that all the values < 0 are cut because in the result there are no negative values and maximum hasn’t changed:

which would happen when the neg. values are for example shifted over 0 by adding in this case like 485 to all values. If I subtract the offset from the stacked, not calibrated dark e.g. in the PixelMath tool or stack the calibrated dark in Fitswork for example, the values are not cut:

Siril seems to handle images with values < 0 during calibration just fine, when I use the dark with neg values for lights and flats, the resulting image looks less noisy then the image with dark where neg. values are cut during stacking:

full range:

with negative values cut:

The difference is not super big, but clearly noticeable. In the lower image the background is noisier and you can see small and short strokes/lines in the background.

My question is now if this behavior is intended and if so why it is intended?

cs,
Pip

Hi,

there’s no need to subtract the offset from the darks. As the offset signal is present in both the lights and the darks, when you calibrate lights with a master dark which still has the offset “pedestal”, the term goes away.
A bit on the maths involved is written here:
https://siril.readthedocs.io/en/stable/preprocessing/calibration.html#understanding-how-the-flats-correct-the-lights

Cheers,

Cecile

1 Like

Hi,
Yes, I can do that if I have a cooled camera which has always the same temperature, I can make a dark image with bias and just subtract that
but when using a DSLR camera which has not a cooled chip, it’s just impossible to make the same dark which is generated during the night, the temperatures are different outside, the camera is cooled by wind, … So what I do is, I make a scalable dark, which can be scaled accordingly to the images, but the bias is always the same, no matter what exposure time I have. So if I don’t subtract the bias from the dark, I scale the bias up/down which is unnecessary and not how calibrating works I guess?

cs,
Pip