Smart Histogram and QHY168C

DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Smart Histogram and QHY168C

#1

Post by DarkMain »

I haven't been able to get the smart histogram working with my new QHY168c.

I have done a sensor analysis (files can be found here - https://drive.google.com/drive/folders/ ... sp=sharing).

When I click on the brain and hit 'measure', sharpcap changes my cameras gain to 15 and then spits out a result almost instantly. It doesn't touch the exposure time at all, and the results don't seem to make any sense (unfortunately I don't have any of the suggestions it made to show at this time, next time I'm out I'll grab some screen shots).

I think this might have something to do with the 168C doing something weird when the gain is set to 15 (the whole image is saturated red). It doesn't like that gain at all.

I found an old post on cloudy nights from back in 2018 where a user had the same problem and apparently the drivers were going to be changed to fix this, but I don't think they ever were.
https://www.cloudynights.com/topic/6397 ... -problems/

And ideas on how I might be able to remedy this as I would really like to start using the smart histo.

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

Re: Smart Histogram and QHY168C

#2

Post by admin »

Hi,

SharpCap will increase the exposure until it thinks that the selected image area has an average pixel brightness that corresponds to roughly 100 electrons per pixel per frame. Given the figures in the sensor analysis file shared, this would correspond to a histogram peak that has moved across to about the 10% level. Again according to the sensor analysis, the dark frame to run peak should be considerably further left than this.

There should be some information stored in the log during the background measurement process that would be helpful along with a screenshot.

Another option to get you going while we work out what the problem is be to use the calculator here to estimate your sky background brightness by entering details of your equipment and the Bortle number for your observing area.

https://tools.sharpcap.co.uk/

Cheers, Robin
DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Re: Smart Histogram and QHY168C

#3

Post by DarkMain »

Cheers.
SharpCap will increase the exposure until it thinks that the selected image area has an average pixel brightness that corresponds to roughly 100 electrons per pixel per frame.
I figured that as it works perfectly with my QHY5II camera.

The 168C 'seemed' to keep the exposure where I initially had it and bump the gain right to 15, take a measurement then give me a result based on that single measurement, which didn't seem right to me based on what I had seen from the QHY5II camera.

I assume you want the logs directly after I try and perform a measurement?
The forecast is for clouds till next week so I might not be able to get the logs and SS for a little while.

I have also been talking to some other 168C owners on facebook who say their cameras have a gain range of 0-14, but mine has a range of 1-15 (In both NINA and Sharpcap) so something is off somewhere.
Maybe I need to downgrade my SDK? (I know older versions of the SDK work MUCH better with the QHYII cameras).

As a side note:
I actually borrowed a light meter from work a few weeks ago and took a measurement (No Moon, mon Milky Way) and got a reading of 20.18 (Most of my area is about 20.1) so that's helpful.

Your tool gives me a result of: Sky Electron Rate 1.54 e/pixel/s. (Don't know if that's good or not but its a starting point).
Edit: Just realized I can only enter 1.00 e/pixel/s or 2.00 e/pixel/s. Is that 0.54 going to make much of a difference to the calculation or will using 2.0 e/pixel/s be fine?

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

Re: Smart Histogram and QHY168C

#4

Post by admin »

Hi,

yes, the logs captured straight after the measurement would be the ones. Note that SharpCap saves all the logs to disk, so if you remember when you did the measurement last time, you can look in the folder given in this post : viewtopic.php?t=1307 . Look for logs containing the text 'SmartHistogramModel' - that will indicate ones where you were using the 'brain' functionality.

I would suggest picking an exposure about half way between the suggestions you get for 1.00 and 2.00 - err on the side of slightly longer. I have a TODO to change this to allow fine adjustment.

Not sure about downgrading the SDK - if you do and the gain range changes then SharpCap will get confused as it won't know that the gain '1' in the sensor analysis file is now gain '0'.

cheers,

Robin
DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Re: Smart Histogram and QHY168C

#5

Post by DarkMain »

One more thing I have noticed...

The smart histogram is saying to use gain 0 for full dynamic range.
Sharpcap is giving me a gain range of 0-15 where as NINA is only giving me a range of 1-15.

I have had a look at the logs (Not really sure what I'm looking at t.b.h) but NINA is saying:

Code: Select all

[2021-01-10T17:01:57.1481] 	 [DEBUG] 	 [MemberName] ConnectSync
[2021-01-10T17:01:57.1481] 	 [DEBUG] 	 [FileName] E:\Projects\nina\NINA\Model\MyCamera\QHYCamera.cs
[2021-01-10T17:01:57.1481] 	 [DEBUG] 	 [Message] QHYCCD: GainMin=1, GainMax=15, GainStep=1
Where as Sharpcap is saying:

Code: Select all

Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.IsControlAvailable :: Starting IsControlAvailable(CONTROL_GAIN)
Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.IsControlAvailable :: Completed (returned True) IsControlAvailable(CONTROL_GAIN)
Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.GetControlMinMaxStep :: Starting GetControlMinMaxStep(CONTROL_GAIN)
Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.GetControlMinMaxStep :: Completed (returned (1, 255, 1)) GetControlMinMaxStep(CONTROL_GAIN)
Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.GetControl :: Starting GetControl(CONTROL_GAIN)
Verbose:	17:15:26.9317102 Thread:#1 SharpCap.Cameras.QHY.Camera.GetControl :: Completed (returned 30) GetControl(CONTROL_GAIN)

Under "Camera Controls' I have Red, Green and Blue gain, and under 'Image Controls' (where I would expect to see the WB) I have Gama, Brightness, Contrast & Digital gain.
DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Re: Smart Histogram and QHY168C

#6

Post by DarkMain »

Got the logs
Log_2021-01-10T22_21_34-6308.log
(47.79 KiB) Downloaded 71 times
and a screenshot
measureTool.PNG
measureTool.PNG (390.83 KiB) Viewed 1658 times
.
User avatar
admin
Site Admin
Posts: 13296
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram and QHY168C

#7

Post by admin »

Hi,

thanks for that - very useful.

It looks like SharpCap is trying to set the gain on the camera to 100. This is happening because the camera is in RAW8 mode, not RAW16 mode, meaning that SharpCap is using the sensor analysis data for 8 bit mode that ships with SharpCap. It looks like this was measured before SharpCap dealt with the 3 colour gain system of this camera properly, so it has incorrect gain values.

Give it a try with the camera in RAW16 mode and see what happens. No need to wait for a clear night - just leave the lens cap on and check that SharpCap starts turning up the exposure. Let me know if that helps or if it is still the same.

cheers,

Robin
DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Re: Smart Histogram and QHY168C

#8

Post by DarkMain »

Whoops, totally forgot to change that.

Changing it to 16bit doesn't solve the problem though.

Here are the new logs -
Log_2021-01-12T04_03_36-2264.log
(50.82 KiB) Downloaded 68 times
and screenshot -
measure.PNG
measure.PNG (1004.92 KiB) Viewed 1637 times
Pretty sure this comes down to gain 15 not working properly.
QHY was aware of this back in 2018 and said they were going to put a fix into the drivers but I guess they never did - https://www.cloudynights.com/topic/6397 ... try8946947
User avatar
admin
Site Admin
Posts: 13296
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram and QHY168C

#9

Post by admin »

Hi,

yes, it's certainly down to the fact that the red channel of the image is already at maximum brightness for the one second exposures that the measurement starts with. What manual changes to the controls you need to get rid of that problem with the red channel being saturated? Is it sufficient just to drop all the gain sliders back by one to 14? Or maybe it's something to do with the digital gain control? Maybe that should be at the minimum value instead of the value of 30 that I can see in your screenshot?

Basically, if you can let me know the settings that give a high gain image that has sensible data then I will try to tweak SharpCap to set those automatically.

Cheers, Robin
DarkMain
Posts: 8
Joined: Tue Feb 18, 2020 7:07 am

Re: Smart Histogram and QHY168C

#10

Post by DarkMain »

As far as I can tell, a gain of 14 still works just fine (The image remain black)
As for the digital gain control... I haven't touch that setting at all (not even sure what it does). Whatever its set to is the default Sharpcap set it at.
I can have a play with that though.

I'll take some 'darks' at a gain of 14 when I get home from work this afternoon for you to look at.

I don't know what kind of contact you have with QHY but like I said, they have known about this since 2018 and have even said:
When the gain is 15, the screenshot will appear. This is caused by excessive gain. We will modify the drive to make the gain less than 15.
https://www.cloudynights.com/topic/6397 ... try8946947

Perhaps a quick message to them might help as well?
(If they fix the driver/SDK then you won't need to put in a 'hack' or work around for this camera).

Edit:
Changing the digital gain to 0 and setting the RGB gain to 15 gives the same saturated result.

Here's a single dark frame if you want to have a look to make sure everything looks ok.
Camera Settings.txt - https://drive.google.com/file/d/1v7s66H ... sp=sharing
Fits File - https://drive.google.com/file/d/1mDeZm5 ... sp=sharing
Post Reply