Re: Bug with dark frame + black level adjustment
Posted: Mon Jun 21, 2021 4:07 pm
Ah,
OK, I understand now.
'Default' stacking automatically scales the data (and the live stack histogram) for brightest pixel in the stack. That means that if your frames that are beign stacked have a maximum brightness of 25%, there is an implicit 'multiply everything by 4' in default stacking - this is reflected in the image shown on screen and in the live stack histogram horizontal position.
'Sigma Clipped' stacking did not have this automatic scaling, so if the images being stacked have a maximum brightness of 25% then the live stack histogram will not have anything to the right of the 25% position (in linear horizontal mode).
The test frame I have from you doesn't have any pixels brighter than about 16%. Actually, I think there are a handful of pixels at ~16%, there are not any significant numbers until you get down to an ADU level of ~3000 (5% histogram).
This means that in Sigma Clipped mode, almost everything of interest is going on in the left hand most 5% of the live stacking histogram. Since the histogram is drawn from 1000 data points, there are only 50 data points that have anything of interest in them, and almost all pixels are in the lowest data point range.
I think the real thing here is that your images are very very dark, and you would do better taking longer exposures that use more of the available dynamic range of your camera. That being said, I don't really like the fact that default and sigma clipped stacking behave so differently, even in a bit of a strange situation, so I have tweaked the code so that the sigma clipped stack also benefits from the same boost that the default one does if the maximum pixel value is low. This makes the histogram stretch adjustment work nicely, even with dark source images.
cheers,
Robin
OK, I understand now.
'Default' stacking automatically scales the data (and the live stack histogram) for brightest pixel in the stack. That means that if your frames that are beign stacked have a maximum brightness of 25%, there is an implicit 'multiply everything by 4' in default stacking - this is reflected in the image shown on screen and in the live stack histogram horizontal position.
'Sigma Clipped' stacking did not have this automatic scaling, so if the images being stacked have a maximum brightness of 25% then the live stack histogram will not have anything to the right of the 25% position (in linear horizontal mode).
The test frame I have from you doesn't have any pixels brighter than about 16%. Actually, I think there are a handful of pixels at ~16%, there are not any significant numbers until you get down to an ADU level of ~3000 (5% histogram).
This means that in Sigma Clipped mode, almost everything of interest is going on in the left hand most 5% of the live stacking histogram. Since the histogram is drawn from 1000 data points, there are only 50 data points that have anything of interest in them, and almost all pixels are in the lowest data point range.
I think the real thing here is that your images are very very dark, and you would do better taking longer exposures that use more of the available dynamic range of your camera. That being said, I don't really like the fact that default and sigma clipped stacking behave so differently, even in a bit of a strange situation, so I have tweaked the code so that the sigma clipped stack also benefits from the same boost that the default one does if the maximum pixel value is low. This makes the histogram stretch adjustment work nicely, even with dark source images.
cheers,
Robin