Request: Make gain a "first class" option in sequence window


Hello Jared and Ken,

A couple months back when the 2.6.x final versions were first being released, there was some discussion about gain and modern CMOS cameras, gain lists, gain ranges, etc. As an ASI1600 user myself, I am finding more and more that I not only want, but need, in order to achieve my imaging goals (shorter exposures for sharper images, more subs to better average out quantization error), the ability to configure a gain setting as part of my sequence events.

Exemplar Case:

If I am doing an LRGB image, with these high gain, high sensitivity CMOS cameras, you tend to acquire a lot of subs. By necessity (environmental or tracking factor), or simply to achieve a goal (i.e. resolution). In either or both case, it is not unusual to stack 100+ subs, and if you want to go really deep in a light polluted zone, several hundred is not unheard of (similar to DSLR imaging, however with an L filter, you acquire light so fast you end up with even shorter subs.) There are a few efficiency issues involved here, including frame download overhead (if it takes 10 seconds to download a frame, and your exposures are only 30-60 seconds each, you are wasting a lot of time!), dithering overhead (dither every frame, if it takes 10 seconds to dither, you are again wasting a lot of time!), etc.

Currently, SGP does support dithering every N subs, what I call “Sparse Dithering”, and this is a GODSEND for us high volume imagers as we can dither every 3, 5, 7, 10 subs and save ourselves some of that overhead time. With LRGB imaging, this also often leads to what I’ve been calling interleaved imaging, where we use the option to cycle through events rather than complete events one at a time. This leads to an imaging sequence along the lines of this:

LLRGBLL [dither] LLRGBLL [dither] LLRGBLL [dither] [focus] LLRGBLL [dither] LLRGBLL [dither] …

This is great, and I love being able to do this, and have it all be automated (SGP FTW here!) However, I have been trying to further optimize my imaging sequences, and trying to get better data for my RGB channels. One thing I have too much of is wind, and the way my yard works, I frequently have wind gusting over my roof, which blows top down onto my gear. I have a wind block that I can set up around my mount and scope, but it is often of no use because of the wind coming over the roof. So longer subs, even only a few minutes long, are often quite a bit softer or just plain rejects due to high star eccentricity. As I’m usually going after high resolution details, I throw away these longer subs.

Because of the nature of the ASI1600 Q.E. response curve and the nature of my AstroDon LRGB filters, I usually have to expose 120-180 seconds for the G and B filters, and 240-300 seconds for the R filter, at Gain 0, when I am doing LRGB imaging. My L subs FTR are usually 60 seconds long. I would much prefer to stick with 60 second subs, for the various reasons listed above, however with this particular camera, the quantization error at Gain 0 is quite poor. I would much prefer to use a higher gain setting where read noise and quantization is lower for the G and B filters, and use an even higher gain for the R filter, and stick with 60 second subs for all three channels. This would help me avoid losing so many subs to wind jolts, and give me better SNR for these channels (which are acquiring about 1/3 the signal as the L filter does, so it’s a lot harder to acquire good per-sub SNR at Gain 0 as at say Gain 139).

Anyway. From prior discussions, it sounded like ASCOM supports either a gain list (a map of named gain settings) or a gain range (a simple numeric range of gain settings). Would it be possible to expose, whichever method the ASCOM driver of the current camera supports, the gain setting in the Sequence Generator’s events? This would allow me to still benefit from the ability to sparse dither an interleaved sequence, while also allow me to switch the camera gain for different events (and therefor different filters) and keep my exposure lengths and SNRs as optimal as possible.


Different GAIN for ASI1600 in one SEQUENCE

I would also like the ability to set gain at the event level, which would be useful when switching between LRGB and narrowband in the same night. Example: the moon rises at 12:30am at which time I switch targets to a narrowband object.


We’re currently exposing either gain method but only in the control panel.

We’ll have to think about how this works in sequence. Obviously the easy answer is to just add it to the events area but that’s getting pretty cramped as is and having an option there that is only usable for a minority of cameras would be annoying to everyone else.

I’m sure we can figure out something though as this does seem like it’s needed with the new crop of sensors coming out.



How about putting the gain setting under the Event Options menu? That way
the setting is available for those who need it without cluttering up the
main event window.


That’s possible… but is the need to alter gain by filter or are you going to have multiple gain settings per filter? If so, then maybe the filter setup? CMOS stuff is new to me still and I’m trying to learn how folks will use it.


For my part, I will probably stick with one gain setting per filter. However, there may be instances when the same filter will need different gains. In that scenario, if the gain setting were found in the event settings, I would simply have two events with the same filter and set different gains for different filters.

If the gain was tied to a filter (as in the filter setup) then only one gain would be available for that filter. I do think that the event settings is easier to get to than the filter setup.

I’m new to the CMOS thing too and I must admit that I am not totally sure how I would use it yet. Right now I just have one gain setting for LRGB and another gain setting for narrowband.


Very strong YES to this enhancement. I just took delivery of 2 1600MM cameras to replace a QSI6120 and SBIG8300M I have been using on my dual scope setup. To take full advantage of these CMOS cameras you definitely need to be able to set gain for each event. It does clutter up the event display a little. To make room for it the Progress bar could be shortened quite a bit and still be just as functional. Or maybe make it an optional display column.



I am also on board for this enhancement to SGP, for the same reasons Jon has penned above. I am also using an ASI1600.

Many Thanks


Jon, just for reference, what values for gain would you like to be able to use for each of the filters? Also, would you want to adjust the offset for each, and if so, what values would you use? I am trying to get a handle on what best practices would be for these cameras.


Hi Joel,

Thanks for the response! Sorry I did not get back to you sooner. I would definitely need the option to vary gain by filter freely, rather than bind a fixed gain setting to each filter. It would depend on what I am imaging and where, light polluted city or dark site, which gain settings I would choose to use. There may also be reasons to use different gain settings for dynamic range purposes (i.e. when imaging an object like Orion).

This is why I was wondering if it could just be added to the sequence events. That way it would just be another setting we pick for each event, alongside filter, exposure length, count, etc.

The main reason for me to use it is to keep my subs short regardless of filter. The ASI1600 needs about 2-2.5x longer subs with G and B filters, and 4-5x longer subs with R. At the moment, that forces me to use much longer subs with R, and because the camera is 12 bit I prefer to stack as many shorter subs as possible. By using gain to reduce read noise while concurrently reducing exposure, I can optimize my results.


I would want to be able to freely choose the gain setting for filter, rather than have it bound to a specific filter. The gains used would likely vary considerably between a bright white zone back yard and a green or blue zone dark site. So binding them to the filter, that would make it a lot harder to adjust when necessary.

Great point about offset though…yes, would definitely need to be able to choose offset as well, however at the moment I don’t think that is possible through ASCOM. It sounds as though if the ASCOM developers get enough critical mass in terms of requests for the feature, and the requests are made on their forum, they would be open to exposing offset control through ASCOM. Would probably take some time though. In the interim, I guess one might simply choose an offset that would work for the highest gain settings used, and use that offset for every gain. Not ideal, but, simple and effective. :wink:

As for what gain values? I guess that would depend on how the driver implemented gains. From prior discussions with Jared and Ken, it sounds like there are two ways a camera manufacturer can implement gain. As a range, such as with the ASI1600, 0-600…or as a list, named gain (and possibly offset) settings, such as High Gain, Low Gain, Unity Gain. I think we would need to support either case simultaneously, so that we would have support for all camera manufacturers.


Ken, given my experience working with DSLRs and CMOS cameras, and having worked with a lot of imagers to help them pick a CMOS camera that works for them, and given the fact that CMOS cameras can have 10, 12, and 14 bit ADC units, I think usage patterns will vary a bit. For the lower bit depth ones, short exposures and high count stacks help a lot to average out quantization error and deliver better precision results. Many CMOS cameras support binning (digital, but still quite effective from an image scale and file size standpoint if you need it), and some cameras drop bit depth to 10 bit with binning. That would warrant even shorter subs and higher sub count stacks.

Varying gain, which would mostly be to minimize read noise when choosing to use shorter exposures for filters that pass less light, is probably more common with RGB filters when doing LRGB than with NB, however depending on the filters, how widely your sky brightness can vary (my own skies can vary from ~17.5mag/sq" to as dark as 19.3mag/sq", white zone to orange zone), there could be good reasons to use a lower gain with Ha and maybe NII (planetary nebula) to maximize dynamic range, which is easy to get good SNR on, and higher gain for OIII, SII, and other filters to maximize SNR. So the ability to use different gain settings for each sequence and for each filter as fits the situation can apply to any kind of filter.


really needed like the iso setting on a DSLR.




Thank you for the thoughtful response. That does make sense to me. Even though my question above was a little vague, what I am trying to understand is if there is some property of the sequence (filter, binning, exposure length) where SGPro can programatically allow for storage of pre-computed gain and / or calculation of gain given real-time input (like background ADU, etc).


Hi Ken,

Interesting thought about pre-computing gain… I guess I would have to think about that. There may be a way to do that, as ultimately it’s about finding a balance between read noise levels and dynamic range. You want the best of both worlds at all times, of course…however ironically, those two factors are almost diametrically opposed when it comes to choosing gain. Lower gain settings mean more dynamic range and more read noise, higher gain settings mean lower dynamic range and lower read noise. So it’s a bit of a tug of war between the two…lower for DR, higher for low noise. :stuck_out_tongue:

Now, exactly where you might find this balance of gain for DR vs. Read Noise…it depends a lot on the optics and skies. Dark skies are likely to allow higher gain settings than bright skies, since you won’t have a huge offset from light pollution eating away at the limited DR of higher gain settings. Similarly, high f-ratio scopes that spread light out a lot more are also going to be more forgiving of higher gain settings. Smaller apertures are also going to be more forgiving of higher gain settings, as they will concentrate less light into each star, so stars won’t saturate as quickly. A combination of all of these factors, higher f-ratio scope with a smaller or moderately sized aperture at a dark site…and you’ll be able to use a very high gain setting with very low noise…and probably not have too many problems with DR.

Flip it all around…and with bigger apertures, lower f-ratios and brighter skies, DR becomes more of a problem so you will usually want to opt for lower gain settings. With light pollution, this is often not really as much of an issue as it may seem, since LP will help you swamp higher read noise levels more quickly, so having the lowest possible read noise isn’t as big an issue.

Throwing narrow band filters into the mix…that changes things up a bit. It’s kind of like always imaging at a black zone dark site, or better. So higher gain settings are usually the norm to keep that read noise low. DR is usually not as much of a problem, but again, the aperture and f-ratio play a role here. Unity and higher is usually used with NB and modern CMOS cameras.

However, there is a group of imagers who just don’t like to stack a lot of subs (regardless of the potential benefits to smoothing out quantization error), and they will opt for lower gain settings every time so they can use longer subs and stack fewer of them (and use less disk space, less pre-processing time, etc.) You will usually see such imagers using gain settings lower than unity, rather than higher. Oh the ASI1600, Gain 76, 90/100, 45/50 and 0 are often used to get long exposures (technically, for this camera Gain 76 is the ideal long exposure setting as you still have 12 stops of DR, but only 2e- read noise, vs. 12 stops of DR an 3.5e- read noise at Gain 0.) So, this here is a bit of a hiccup in the potential rules above that might be able to drive any real-time computation of gain.

Another counteracting force is practicality. If you were always varying gain, you would also always need to be getting new darks, biases, and flats. So while many of us will often use a few gain/offset setting pairs, such as in my case I use Gain 200/Offset 50, Gain 139/Offset 21 and Gain 75/Offset 15 for NB, and Gain 0/Offset 10 and Gain 75/Offset 15 for LRGB, we do try to stick to our chosen options. For LRGB, if I had the option to set gain in the sequence editor, I’d probably to L @ Gain 0, GB @ Gain 75 and R @ Gain 139. I would use the same exposure for each, and use gain to balance out the SNR in the end. I already have masters for each of those, too. :wink: That allows us to reuse calibration masters as much as possible, and avoid constantly having to create new ones.

I guess at the moment, I would have to say, there is definitely a judgement call that has to be made by the imager when deciding on gain settings. It would depend on their optics, their skies, and matters of practicality like calibration masters. I have my preferred settings, and some of them I recommend for certain purposes, but I also encourage most variable gain camera users to, if they are up for it, test and evaluate for themselves to find the settings that are most optimal for their equipment, conditions and personal tolerances (i.e. if they can’t handle stacking 100 subs.)


I want to add my vote to having this as an option because as Jon notes, the chosen gain setting is somewhat image dependent. It is especially useful if you are doing say LRGB and want to add in Ha (which will usually have a signficantly different gain setting than the others).


What if you could set a default GAIN (and when available in ASCOM also the OFFSET) in the control dialogue but you would still have an option to vary on event level (but pre-filled with the default set filter GAIN value)? Then you would have best of both worlds and avoid a lot of setup work…


It is good to have this feature now under the individual event settings, but can I add my support to the idea of having it exposed in the main sequencer window? CMOS sensors don’t benefit from binning in the same way that CCD’s do, so the workflow is antiquated for the growing user base who don’t think in those terms. Just tell me what my gain and offset are and I’m good to go.

Maybe I could suggest making the event window scrollable in the horizontal plane and user selectable display of columns? Just a thought.