QHY168c Gain Scaling question

glauria
Posts: 29
Joined: Wed May 30, 2018 7:15 pm

QHY168c Gain Scaling question

#1

Post by glauria »

Hi,

I've got a dumb question about using the gain setting on Sharpcap and how it translates to the gain chart that QHYCCD provides with the camera. QHY uses a gain range from 0 to 14. However, Sharpcap uses 0 to 256. The gain to achieve 1 e/ADU in the QHY graph is 10. If I want to translate this to which gain setting to use in Sharpcap, I did the following: 10/14 = 0.7143. If I multiply this by 256, I get 183 so I rounded down to 180. Is this the correct reasoning to translate the gain scale? I think it is, but just wanted to make sure.

Thanks,
-Gene
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY168c Gain Scaling question

#2

Post by admin »

Hi,

The best thing to do is to run the sensor analysis procedure from the tools menu on your camera – this will let SharpCap work out what the e/ADU numbers are for each gain value. Some qhy cameras have gain values that are sensibly calibrated (i.e. in dB), but it seems that the 168 and some other recent models do not.

Cheers, Robin
glauria
Posts: 29
Joined: Wed May 30, 2018 7:15 pm

Re: QHY168c Gain Scaling question

#3

Post by glauria »

Thanks Robin,

I've actually been trying to run the sensor calibration with my 168c, and the results look a little strange to me. Here are they are (sorry for the column misalignment):

Gain Value e/ADU Read Noise (e) Full Well (e) Relative Gain Rel. Gain (db) Dynamic Range (Stops)
1 1.54498875888919 2.78183343700278 25313.0958256405 1 0 13.151560300604
11 0.140737524208133 2.78040044305921 2305.84359662605 10.9778025980075 20.8103083413243 9.69578626428411
21 0.0689998831715512 2.60807360378151 1130.49408588269 22.3911793451586 27.0015393701121 8.75975314421244
31 0.0482300967439609 2.68938754998508 790.201905053055 32.0337064031009 30.1121438168536 8.19879984670312
41 0.0359491174373486 2.65553685325746 588.990340093519 42.9770984386966 32.664741822643 7.79309661154937
51 0.02797247119367 2.56754067900551 458.30096803709 55.2324729621605 34.8438897725947 7.4797643886324
61 0.0226778551809781 2.48630902880301 371.553979285146 68.1276402269782 36.6664669262559 7.22342238693535
71 0.0193187480058381 2.46925753663198 316.518367327651 79.9735447878041 38.0589269266386 7.00206809701542
81 0.0174130585662401 2.53573041386643 285.295551549277 88.7258693245639 38.96100526403 6.81391206821668
91 0.015247036891297 2.49466031066451 249.80745242701 101.330427013728 40.1147974560711 6.64582932472699
100 0.0135255989865526 2.42693581666881 221.603413795678 114.227012084659 41.1553763360113 6.51270034088634

There are a few things that bother me about the table. The first is that the gain only went to 100 whereas it can be adjusted to from 1 to 255. Is the true gain range only 1 to 100. The other thing is how quickly the gain increases in terms of e/ADU. There's a huge difference from 1 to 11 and then not much after 21 to 100. Perhaps the true gain range in reality is from only 1 to 14 even though it can be adjusted all the way to 255 max? I don't think this is the case, because I would think that the image would be completely washed out at any value greater than 14, but there's clearly plenty of room from 14 to 255. I'm also guessing that I'm not using the right light level, but I tried the procedure several times with different light levels and got the same results.

Any thoughts?
-Gene
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY168c Gain Scaling question

#4

Post by admin »

Hi,

The sensor analysis procedure struggles when the gain range on the camera is very large because the difference in time required for exposures when using minimum and maximum gain can become enormous – for example with the same light level you could be down at 1 ms exposure at maximum gain and several seconds at minimum gain on some cameras. Because of this the analysis deliberately cuts out the higher gain values when it suspects that the range may be too high (as the higher values tend to be useless for deep sky imaging anyway). That explains why the analysis cuts offered a maximum of 100.

The figures kind of look reasonable for a Sony 071 sensor, except that we seem to be missing the bottom end of the gain range – there should be a lower gain than the value provided by the gain value 1, with an e/ADU of about three and a read noise of about 3.2. It also looks as though most of the action is concentrated in the low values of the gain control between one and 21 or so, which may make it hard to adjust to precisely the gain you want.

I do wonder if there ought to be access to a gain value of zero, although SharpCap does ask the camera driver for the range of gains available and obviously gets a reply of 1 through to 255.

I have a new version of the qhy SDK which I will put into a new download of SharpCap the next few days. It will be good if you can retest when that becomes available and if there is still a problem I can then report it straight to qhy.

Cheers, Robin
glauria
Posts: 29
Joined: Wed May 30, 2018 7:15 pm

Re: QHY168c Gain Scaling question

#5

Post by glauria »

Hi Robin,

I apologize for some misinformation that I gave you in regards towards the gain setting. The lower limit is 1 and not zero so the gain adjustment is from 1 to 255.

-Gene
bwells
Posts: 43
Joined: Sat Sep 08, 2018 1:01 am

Re: QHY168c Gain Scaling question

#6

Post by bwells »

You may recall that we ran into a dead-end with my QHY165C, which as I understand it, is very close to the QHY168C. In my case, the smart histogram never worked because it would get an exposure level that would not work.

viewtopic.php?f=28&t=1092

Since SharpCap sensor analysis does not work with my camera, can you offer how I translate the SharpCap offset and gain to the values in the driver of the qhy165C? The range as stated by QHY is 0-3800, but in SharpCap, it is 0-255.

Thanks
Bryan
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY168c Gain Scaling question

#7

Post by admin »

Hi,

I wish I knew the answer to that.

A lot of qhy cameras have gain values that are measured in dB – so you might get a range from 0 to 30 or 0 to 40.
Some other cameras have gains that are measured in tenths of the dB, so you might getting range from 0 to 300 or 0 to 400.
It seems that in the case of the models we are discussing here qhy haven't got round to making sensible gain values that are measured in dB and instead are exposing the raw setting in the value of 0 to 255 that is sent to the camera.

If somebody could do an experiment for me then I could try to limit the range that SharpCap uses when it encounters a range of 0 to 255.

The experiment would be as follows.

1 Setup constant illumination on the camera
2 set the gain to minimum
3 adjust the exposure to give the histogram peak at 50% and down the exposure needed
4 turn down the exposure by a factor of 10 and adjust the gain to get the histogram back to 50%. Note down the exposure used and gain value needed for this or to get as close as possible to this
5 repeat step four and keep noting down the results until you run out of gain values or it becomes difficult to continue

If somebody can do that and send the results to me then I can push forward a little bit limiting the range.

Cheers, Robin
glauria
Posts: 29
Joined: Wed May 30, 2018 7:15 pm

Re: QHY168c Gain Scaling question

#8

Post by glauria »

Hi Robin,

I can confirm the issues that "bwells" is running into with his QHY165 with my QHY168c. The last time I was out with my camera, I tried to use the "brain" icon after I did the sensor analysis with my camera. I think the results were relatively useless because no matter how many times I tried the routine, it kept giving me an optimal gain of 1. My back yard is about a Bortle 7 and I pointed the telescope towards a field where there were relatively a few amount of stars, around the constellation Bootes. From looking at the calibration curve it came up with during the sensor analysis, I actually wasn't surprised since it showed that things pretty much saturated at a gain greater than 21 and from typical use, I know that's way too low. In any event, I will try the procedure that you described in your previous message and send you the results. I will gladly help in any way that I can.

-Gene
glauria
Posts: 29
Joined: Wed May 30, 2018 7:15 pm

Re: QHY168c Gain Scaling question

#9

Post by glauria »

Hi Robin,

Here are the results from the procedure that you outlined in your previous post for calibrating the gain. I repeated the procedure twice at two differnt light levels. My camera is a QHY168c:

Time (mS) Gain (a.u.)
275 1
27.5 10
2.8 90
0.3 --- (Still below 50% at max. gain = 255)

...at another light level

Time (ms) Gain (a.u.)
105 1
10.5 10
1.1 93
0.1 --- (Still below 50% at max. gain = 255)

Hopefully, I did the procedure correctly and that this data might be useful.
Thanks,
-Gene
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: QHY168c Gain Scaling question

#10

Post by admin »

Thanks,

that almost looks like the gain is a multiplier - ie going from 1 to 10 gain takes 10 times less exposure, from 10 to ~100 gain takes 10 times less again.

If that was true then setting gain to max (255) would mean exposures about 25 times shorter than at gain = 1. Would you be able to check that and confirm and then I will make adjustments to the sensor analysis code to try to cope.

thanks,

Robin
Post Reply