Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Modified webcam gain adjustment


Recommended Posts

Is there a hard and fast rule regarding the gain setting for long exposures when using a modified webcam?

I've been trying to use the gain as low as possible, being under the impression that the higher gain settings would give more noise, but I'm not sure that its the way to go.

Todays new theory (mine, that is) is that using the gain is just the same as using the levels slider in Photoshop to bring out the fainter detail. Both are software methods so there should be no difference unless I'm missing something.

Any ideas / pointers / real life facts chaps and chapesses? (Quick, before it gets dark - there's no clouds just now)

Captain Chaos

Link to comment
Share on other sites

  • Replies 28
  • Created
  • Last Reply

70%!

I've usually gone for 0% to 25%, and I thought I was pushing it at 25%. Rethink time perchance.

Anyway it's all cloudy now so tests will have to wait. The cloud arrived with the dark, which was a nuisance. I might have to build a dark box or something for tests using a camera lens. I now need to get some clear dark skies again.

Thanks guys.

Captain Chaos

Link to comment
Share on other sites

Oh goody! Fried brains again!

Thanks Arthur, I'll report back what it's supposed to say (as in using one sentence)

Captain Chaos

Have no fear I am here to help you through it :-)

For a given exposure time, the signal/camera noise is independent of the gain you use. The advantage of using a lower gain is that you can expose for longer before you saturate the image. This gives you a less noisy image because you have collected more photons so the noise from the random variations in the signal are lower. In practise I use 60% with my SC3 Vesta and a typical exposure time of 30 secs which I can do without guiding. I then stack several dozen frames at least.

Robin

www.leadbeaterhome.fsnet.co.uk/astro.htm

Link to comment
Share on other sites

Right chaps, I had a quick go last night as the clouds all blew away for an hour before midnight. M81 with the gain turned up to 70% (ish, I guessed).

image.jpg

The conclusion is that I should turn the gain up from the 10% - 20% where I used to have it to a higher level. Exactly how much higher remains to be seen but the result speaks for itself.

Captain Chaos

Link to comment
Share on other sites

I reduced the exposure from 40 to 35 seconds. Only because I had seen the results at 40 seconds and knew that I needed to go longer to get the dusty bits. I think that 20 seconds or less would have given me the same as I got before.

Other details:-

Scope was 200mm f/5 Skywatcher Newt.

Camera was SC3 modified webcam.

I used a focal reducer to get the image scale and a CLS filter to reduce the light pollution.

The final image is a stack of 60 out of 90 stacked with the new Registax 4.

Captain Chaos

Link to comment
Share on other sites

Confused now!

This is my understanding. Read noise = noise introduced by the equipment rather than exposure time and is constant across all subs. Shot noise is exposure related, it increases with length of exposure but not as fast as signal. The longer the exposure the better the signal to noise ratio. The gain amplifies the signal but also the noise (both read and shot). Sure, increasing the gain will bring out more detail but at the expense of graininess. Using gain to shorten subs is bad news because the read noise is constant in all the subs and doesn't improve with stacking. As subs are lengthened read noise is reduced in relation to signal. Shot noise increases but not as fast as signal. Eventually read noise becomes an insignifcant factor. If short exposures are necessary because of the limitations of the set up then gain seems very useful but better still to properly improve S/N ration by going for longer exposures.

BTW that is a great image CC, very nicely focussed and well executed but it doesn't mean it wouldn't be better using 3 min subs and lower gain.

Have I understood this correctly??

Link to comment
Share on other sites

I think so Martin, its more or less what I read. I think the shot noise goes down as the exposure increases as it is caused by the photons coming when they feel like it, rather than in a steady stream. I visualise this noise as similar to when you photograph a TV screen and you only get half the image on your picture.

My original intent with the question was to discover if increasing the gain (to reduce the amount of histogram stretching necessary later) was necessarily a bad thing. My thought was that, as most mounts are limited to the length of exposure because of alignment, PEC and other issues, there are several ways to cope with the inability to manage very long exposures. The whole idea behind stacking, as I understand it, is to synthesise a really long exposure but cut out the trailing that would result with a non-ideal mount.

It does seem to work, so without understanding the mechanism entirely, I'm going to do it again. As I said in the question, I thought that the lower gain was the way to go to get better images, but it seems that I was wrong.

Having only a finite time in which to capture the image, caused by clouds or having to go to bed, makes this technique attractive to me as I get more frames and so can afford to chuck away the ones with aeroplanes in them.

Next job is to try the gain all the way up and see what happens. There could be a happy medium which I have to track down in the 50% to 100% part of the gain slider so if I discover anything further I'll shout.

Captain Chaos

Link to comment
Share on other sites

CC, when I was using an Atik 2 HS and nextar in alt az I was limited to around 45 secs because of field rotation. I used different gain settings for different targets. By the time I changed set up I was starting to get an understanding of how the individual subs looked like but it depended so much on the target. I guess the gain is like the iso setting, it will let you pull stuff out that you otherwise wouldn't be able to but at a price.

Link to comment
Share on other sites

Glad you found the web page interesting :-)

Normally the longer the exposure the better the result and one long exposure will always be less noisy than the same exposure done in a stack of subs, because of the read noise.

However... because webcams are only 8 bits, it is important to stack many frames to increase the number of greyscale steps (If you only take one long exposure for example, the result will look rather posterised if you try a histogram stretch on it. )

So.. the best solution IMO is to set the exposure to one you are comfortable with in terms of tracking etc, say 30 sec. Wind up the gain until the brighter features in the object you are imaging are well exposed and then take as many subs as you can.

If you autoguide, you can go for longer exposures with a lower gain setting which will give you less noise for the same total exposure time but you still need a good stack of subs to give that smooth greyscale so you can work on the curves to bring out the detail without posterising.

So to summarise.. set the gain to match the exposure time and object so it is well exposed but not saturated and take as many subs as you can

HTH

Robin

Link to comment
Share on other sites

Well that seems like the best plan to date. Exposure time is limited by the mount, so use as long as you can without trailing - obvious when put that way. Gain set to get the image appearing on the screen - ditto. Do loads of exposures - ditto.

Thanks Robin, I just had a "I get it now" moment. Time will tell as to if I really got it or not, but I'm optimistic.

I also hadn't considered the 8 bit limitation of the modified webcam. I think that the 8 bits will turn into 9 bits if two frames are stacked, 10 for 4 frames etc. so that I need 256 frames to take full advantage of the 16 bittedness of Registax, is that correct?

Captain Chaos

Link to comment
Share on other sites

Excellent. I know nothing about imaging but one thing I've learned in life is that when someone who knows what he's talking about tells you stuff, you listen. Robin certainly seems to know what he's talking about. More power to the forum. :D

Link to comment
Share on other sites

I also hadn't considered the 8 bit limitation of the modified webcam. I think that the 8 bits will turn into 9 bits if two frames are stacked, 10 for 4 frames etc. so that I need 256 frames to take full advantage of the 16 bittedness of Registax, is that correct?

Captain Chaos

Thats right. It is rather like drinking halves or pints. You can get the same amount of beer but if you drink in halves you have to make more trips to the bar ;-)

Actually there a couple of other tricks you can use to make the most of the 256 grey levels

If you set the gamma to a high value, this uses more of the levels on the darker parts of the image and compresses the brighter areas into fewer higher levels. This is generally what you need for DSO. It works best if you have a nice dark sky though otherwise you end up using the lower levels up on the skyglow. The other problem is dark/flat correction does not work properly unless you correct back to a gamma of 1 (The subject the first part of my Q2006 presentation)

Another technique is to stack exposures of different lengths. The long exposures show the faint stuff but saturate the bright parts. The short exposures expose the bright parts correctly. When you stack you can see all areas exposed properly with the bright areas automatically compressed. It works well for objects with high dynamic range eg M42. Powers of 2 work well eg 2,4,8,16,32 sec. ISTR Astrovideo software can do this automatically for you. The ususal technique is to vary the time but thinking about it, the lowest noise would be with constant long exposure and varying the gain.

Robin

Link to comment
Share on other sites

Normally the longer the exposure the better the result and one long exposure will always be less noisy than the same exposure done in a stack of subs, because of the read noise.

You have explained things very well Robin but I'm not sure this is right. It certainly applies to short subs because the read noise remains a significant proportion of the overall noise and isn't reduced by stacking. However shot noise increases progressively with the length of overall exposure so provided your subs are of sufficient length to make read noise very small in relation to shot noise stacked images will have less noise than a single exposure of the the same overall length.

http://www.ccdware.com/ This site has a ccd subexposure calculator which give helps to calculate optimum sub exposure time

BTW this is all theoretical for me, still reading round the subject trying to drag myself up to the next level. So I'm only regurgitating what I've read.

Link to comment
Share on other sites

Hi Martin,

Thanks for the link I will take a look at that. ISTR another program which calculates the optimum sub length too.

Depending on the particular situation. (skyglow/limiting magnitude, brightness of object, camera noise characteristics), there is a length of sub beyond which there is little advantage or a risk of saturation of the object and I believe this is what these programs calculate, but I am pretty sure that a stack of exposures can never have a better signal/noise than a single exposure of the same total length.

Although it is true that shot noise as a number of photons increases with exposure, it actually decreases as a percentage of the total number of photons (shot noise standard deviation = sqrt(number of photons) ) so the longer you expose, the better the signal/shot noise becomes. This is true if you collect the photons in one go or as a series of subs and add them up later. The thermal noise also acts in exactly the same way independent of whether you split the exposure down into subs or take it in one go. The stack though has several doses of read noise against only one for the single exposure.

If you consider a perfect camera ie one with no read noise or thermal noise and 100% quantum efficiency, then you get one electron for each photon and nothing else. It does not matter if you read out all the photons in one go or in chunks as a series of subs, the total number of photons recorded and the random variation in that number (shot noise) is just the same. The real situation can only get worse due to the read noise.

You can see how I have worked through it mathematically here and there is a spreadsheet where you can play with the numbers.

http://mysite.wanadoo-members.co.uk/astro2/stacking_FAQ/noise/stacking_noise.htm

Robin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.