Automatic adjustment of the LED (QHY-174-GPS)

procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: Automatic adjustment of the LED (QHY-174-GPS)

#31

Post by procyon12 »

Hi Andy,

In addition to my above post, here are two FITS headers.
At least with this example the GPS_EXPU is better for the second EndPos LED OFF>ON = 4105 (roughly id. with autocal).
This is only one case, there are more tests needed.

However, from the SEXTA measured interframe delays of 1 ... 2 ms, this doesn't play a role (?).

I attach also a profile (for EndPos 4105).

Christian
Attachments
4105 (QHY174M).ini
(741 Bytes) Downloaded 75 times
cmp.png
cmp.png (75.51 KiB) Viewed 1743 times
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: Automatic adjustment of the LED (QHY-174-GPS)

#32

Post by procyon12 »

Hi,

Another add.

I was interested in how exactly you can get GPS_EXPU in relation to the set exposure time (QHY's "1 µs-precision"). And indeed, I got it. With above settings (GPS Freq Stabilization=On) and with exposure time set to 125 ms I got a stable GPS_EXPU better than 1 µs, measured over 3 h, and also with two QHY174GPS models.
For involving the second camera, profiles gotten from the first one were used, confirming the overall identical behaviour of the cameras.

How was this precision reached?

> With the manual calibration results from above viewtopic.php?p=22309#p22309 we get for both EndPos deviations of GPS_EXPU with respect to EXPTIME in the range of 1 ... 100 µs.

> To get it to better than 1 µs, we must change StPos and/or EndPOs under observing the GPS state and also the LED (it can lit although GPS-calibration is OFF !)

> I did this starting with the above StPos and both EndPos values, StPos and also EndPos had to be changed, lock and other things remained o.k.
>> < 1 µs was reached with StPos 10325, EndPos 3175
>> < 1 µs was reached with StPos 7095, EndPos 9382105

Apart from the precision that can actually be achieved, there is again an ambiguity in the calibration.

Christian
andyho
Posts: 16
Joined: Wed Apr 07, 2021 7:12 pm

Re: Automatic adjustment of the LED (QHY-174-GPS)

#33

Post by andyho »

Christian,

Help me to understand.

By adjusting StartPos and EndPos in "real time," you achieved GPSU (GPS Exp.?) = SharpCap exposure within 1 microsecond?

Andy Howell
Gainesville, FL
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: Automatic adjustment of the LED (QHY-174-GPS)

#34

Post by procyon12 »

YES.

The FITS header GPS_EXPU = DATE-OB2 - DATE-OBS is the real, GPS synchronized, exposure time. The SC set exposure time is EXPTIME. With the "real time" adjustment I brought GPS_EXPU agreeing with EXPTIME better than 1 µs.

Christian
andyho
Posts: 16
Joined: Wed Apr 07, 2021 7:12 pm

Re: Automatic adjustment of the LED (QHY-174-GPS)

#35

Post by andyho »

I have not encountered significant problems using End Position ~= Start Position + 75,000,000*Exp(seconds). Mind you, one still has to use the LED to find the precise End Position.

K. Getrost proposed reducing End Position by 1,000 or 10,000 ticks to avoid problems like BadCalibrationReduceEndPos. So far, this has not been a problem for me.

Once or twice, my (slow) computer hung because System Time differed more than 24 hours from GPS time. Restarting the computer solved that problem.

Maybe someone can prove me wrong, but I hypothesize that SharpCap's default End Position is the end of the previous exposure. When K. Getrost discovered this End Position, he called it the "3rd transition."

On my slow 7+ year old computer with equally slow USB ports, the 3rd transition occurs 46,290 which is much different than SharpCap's default value of 4190. This suggests to me that computer speed is a factor that affects End Position of the previous exposure.

The interesting questions are, (1) which End Position (<> Start Position) is theoretically correct? (2) As a practical matter, does it make a difference?

Andy Howell
Gainesville, FL
Jean-Francois
Posts: 360
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Automatic adjustment of the LED (QHY-174-GPS)

#36

Post by Jean-Francois »

Hello to all (GPS camera user interested on this discussion),

Sorry for the delay ... I was occupied with imaging the sun during the last days and then process several 100 GBytes ... and I'm lazy and I was expecting that the GPS discussion/problems were solved before I write this message.

I test the "calib_qhy.py" script ... it is 99.9% my original script. But the user need to start SharpCap with admin right for writing the file in the C:\Program... directory. It is better to set in the script a fix defined directory (line 393) for the export file.


I will try now to resume some points ...

a) the LED calibration is independent of the GPS (you can perform the LED calibration without the GPS sensor).
But, for the high precision of the image exposure time(s), you need to switch ON the GPS sensor

b) It is advised to switch the GPS Frequency Stabilization ON

c) any changes of the exposure time, ROI height, MONO-8/16 and USB Traffic will modify the LED Start and End position.
So, a calibration is valid only for a combination of parameters.


The automatic LED Start and End Position performed by SharpCap is good and it is the result of analysis of the variation of these parameters.
The SharpCap values are a generic values (the result of a fit calculation), but the cameras have some deviation from these values.

That is the reason of my script ... it search the real best LED Start and End Position for each camera individually.
So, it could be possible that you will have some difference (several 100, maybe 1000).
But in my script, I use my personal set of starting guess values of the Start/End Position. In the "calib_qhy.py", these starting values are *only* valid for the USB 3 connection. I remark that if the camera is connected to an USB 2 connector, then all the LED values are different.
In the past, may be communicated in some message, I analysed and write several script for the USB3 and USB2 connection. But, after the discovery of the error in the End position value, then I redo the job only for the USB3 connection.
(=> so, I will be direct ... forget the use of the QHY174-GPS camera with USB2 connector!)


Concerning the "third transition" ... sometimes, you can have the wrong "side" of the LED illumination.
What I mean ? ... try with MONO8, full resolution, 50 ms, USB Traffic = 0

Here for my camera with
[ms] Cal_Start Cal_End Exp. LED-time Delta SC_Start SC_End
================================================================================
50.0 6274 2861 50.00 -0.046 50.046 6276 2850

Then now click on the "^" button of the "10" of the Start Position ... the LED illumination will be brighter until constant maximum.
No, click on the "^" button of the "10" of the End Position ... the LED illumination will be darker until constant minimum (noise ground level).

That is the correct behavior of the LED illumination. If you have a "third" transition, then you will have the opposite behavior when you click the "^" button.


But to be sure ... here some point to do before you can use my script:
- ideally cover the camera or the telescope/optic (but I test, it could work with the stars visible, as long as the same stars are visible, maybe you need to reduce manually the gain to avoid overexposure, in case of bright sky background)
- switch ON the Histogram view
- click on the menu on the "Selection area" ... a red rectangle should appear.
- switch ON the LED calibration
- move and scale the red selection rectangle above the LED illumination with the most intensity
(note that the dimension and position of this red rectangle is saved in SharpCap. If you need to redo a LED calibration, it is not necessary to activate the view of this rectangle. But only if you not change the ROI).

During the run of my script ... you can see that the LED intensity vary.
My script starts from my starting guess values and it changes the Start/End Position in - and in + around the starting value.
When it finds a low intensity level in combination with a high level, it search with smaller step around the mid intensity.
The different values are combined and the script performs a fit. The result is the Start/End Position value for the mid-intensity of the LED illumination. I think that the script can not find a better value. The only way to improve this, is to reduce the LED duration (It is possible, but I think not necessary) or to perform the second run around the mid-intensity value with a new fit.

Andy, do you use only the "calib_qhy.py" script ? Or do you have a "menu" script too ?
The "calib_qhy.py" script is more for the analysis of the different parameters. The "menu" version can be started directly from the menu line.


Best regards,
Jean-Francois

Note: Robin, it's happen again .. in fact I lost a third of this message, because it was necessary to repeat the login.
andyho
Posts: 16
Joined: Wed Apr 07, 2021 7:12 pm

Re: Automatic adjustment of the LED (QHY-174-GPS)

#37

Post by andyho »

Jean-Francois,

Thank you for taking the time to document the history of the script, how the script works, and how to use it. For my runs, I select the script not from the menu, but rather by calling it from the *.py file saved on my desktop.

My computer's docking station has two USB3 ports labeled as such and with blue tabs, and I was surprised to learn that they are working only at USB2 speeds. Even so, I am able to operate the camera successfully at full frame using exposures >= 250ms.

Your script works well for computers with USB3 ports, just not on my "slow" computer. On my slow computer, manual calibration is required.

Thank you for taking the time to follow up with this thread. I wish you success processing your solar data.

Andy Howell
Gainesville, FL
procyon12
Posts: 253
Joined: Tue Jan 14, 2020 11:32 am

Re: Automatic adjustment of the LED (QHY-174-GPS)

#38

Post by procyon12 »

Due to other tasks (real astronomy) I cannot answer at the moment. Hope to be back soon.

Christian
watan_rockhand
Posts: 17
Joined: Sat Jun 27, 2020 11:20 am

Re: Automatic adjustment of the LED (QHY-174-GPS)

#39

Post by watan_rockhand »

I ran a calibration script on SharpCap Pro. The result is as follows, and there was only a slight difference from the default setting value under the condition of exposure several tens of ms or more.
Does this mean that the time accuracy will be less than 1ms for exposures longer than a certain time without calibration?

Camera Settings:1920x1200
========================================================
Colour Space : MONO8
Binning : 1x1
USB Traffic : 0

[ms] Cal_Start Cal_End Exp. LED-time Delta SC_Start SC_End
================================================================================
3.0 336001 2861 3.00 -4.442 7.442 336108 2850
4.0 261187 2861 4.00 -3.444 7.444 261110 2850
5.0 185920 2861 5.00 -2.441 7.441 186112 2850
6.0 111109 2861 6.00 -1.443 7.443 111115 2850
7.0 36289 2861 7.00 -0.446 7.446 36117 2850
8.0 6274 2861 8.00 -0.046 8.046 6276 2850
10.0 6274 2861 10.00 -0.046 10.046 6276 2850
15.0 6274 2861 15.00 -0.046 15.046 6276 2850
20.0 6274 2861 20.00 -0.046 20.046 6276 2850
30.0 6274 2861 30.00 -0.046 30.046 6276 2850
60.0 6274 2861 60.00 -0.046 60.046 6276 2850

Camera Settings:1920x1200
========================================================
Colour Space : MONO16
Binning : 1x1
USB Traffic : 0

[ms] Cal_Start Cal_End Exp. LED-time Delta SC_Start SC_End
================================================================================
3.0 752885 4191 3.00 -9.983 12.983 752750 4190
4.0 677915 4191 4.00 -8.983 12.983 677754 4190
5.0 602935 4191 5.00 -7.983 12.983 602757 4190
6.0 527959 4191 6.00 -6.984 12.984 527761 4190
7.0 452984 4191 7.00 -5.984 12.984 452765 4190
8.0 378003 4191 8.00 -4.984 12.984 377769 4190
9.0 303031 4191 9.00 -3.985 12.985 302772 4190
10.0 228052 4191 10.00 -2.985 12.985 227776 4190
11.0 153082 4191 11.00 -1.985 12.985 152780 4190
12.0 78101 4191 12.00 -0.985 12.985 77783 4190
13.0 10934 4191 13.00 -0.090 13.090 10939 4190
14.0 10934 4191 14.00 -0.090 14.090 10939 4190
15.0 10934 4192 15.00 -0.090 15.090 10939 4190
20.0 10934 4191 20.00 -0.090 20.090 10939 4190
30.0 10934 4191 30.00 -0.090 30.090 10939 4190
40.0 10934 4192 40.00 -0.090 40.090 10939 4190
60.0 10934 4191 60.00 -0.090 60.090 10939 4190

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

Re: Automatic adjustment of the LED (QHY-174-GPS)

#40

Post by admin »

Hi,

the calibration values are measured in ticks of a 75Mhz clock, so you can work out the errors introduced by the difference between the calibrated values and the automatic values to see if they are important to you.

cheers,

Robin
Post Reply