Bug with dark frame + black level adjustment

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Bug with dark frame + black level adjustment

#11

Post by admin »

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
jrschmidt2
Posts: 11
Joined: Wed Oct 07, 2020 8:54 pm

Re: Bug with dark frame + black level adjustment

#12

Post by jrschmidt2 »

Thank you!

I do some software development work as well, and this experience exemplifies my own experience: Being able to reproduce a bug is 90% of the way to solving it. :D

For now the default stack will be just fine. I will also see if I can get 30s (vs. 10s) exposures reliably, even without guiding. I'm fairly confident I can manage that.
donstim
Posts: 128
Joined: Wed Sep 19, 2018 5:35 am

Re: Bug with dark frame + black level adjustment

#13

Post by donstim »

Just came across this interesting thread. I have noticed the same behavior when using an L'eXtreme filter with my 294MC Pro camera on an 8-inch SCT with 0.63x focal reducer. I am also using the sigma clipped stacking mode, and the exposure I'm using with that camera/scope combination (20-230 seconds at 350 gain) on a dim object like NGC7000 is lower than recommended by the smart histogram or brain in terms of read noise. I didn't have darks for longer exposures, so I couldn't go longer at the time. I have now expanded my dark library to include some at longer exposures, but with an alt-azi mount I don't expect to be able to use them too often.

Without using darks, the stacking histogram looks "normal." There is definitely an offset from the left side. When darks are applied, the display histogram still looks normal, but the stacking histogram starts on the right side of the peak as shown in the OP's picture (an example of mine here: viewtopic.php?p=14986#p14986). If flats are applied with no darks, I get reverse vignetting. Or if the brightness/offset of the lights is increased, the stacking histogram will go back to having an offset, but then reverse vignetting appears in this case as well.

One workaround that has worked in most cases for me is to increase the color sliders to the right of the stacking histogram. This can cause the peak of the stacking histogram to be shown and will allow black level adjustment.

Glad to hear that the code has been tweaked to address this issue of very dark images. Its not always possible to use long enough exposures with these filters (depending on one's equipment and goals) to avoid the issue.
Post Reply