SGP AutoFocus LogViewer

Mikael,

Thanks for this utility. It will definitely be put to use.

CS,
Nick

Hi Mikael,

Of course it is OK to keep “AF run” as first column.

Tab (= ASCII ‘09’ or Escape Sequence ‘\t’) as delimiiter would be fine. What is the problem with it?

Bernd

Mikael,
Thanks for creating this program.
A suggestion: When clicking on the down arrow in the graph window, it brings up the next focus run. The X axis changes for each focus run so it’s hard to compare the position of the graph across runs. Would it be possible to keep the X axis the same for all views (the one that shows all runs as well as each individual run)?
Eric C

1 Like

Hi Eric,
Good suggestion! I’ll put it on the list of things to include in a revised version to come.
Mikael

Mikael - just an update. i’ve been using it for the past few nights, mostly to reset my focus for the beginning of the imaging session. it works great. It has also been very illuminating to see how focus moves during the night, and how good of a V curve my focusers have - one focuser i ended up adjusting some settings due to seeing how it performed. thanks again!

I’ve uploaded a new 1.10 version of the AutoFocus Logviewer on SGP AutoFocus LogViewer download | SourceForge.net

This version includes some of the suggested changes. Here is the changelog:

  • Summary output text TAB delimited
  • Date and Time as first columns in summary output
  • Toggling between graphs using up and down arrow keys doesn’t change Min and Max of X and Y scales
  • The best focus HFR is highlighted on each AF graph with a black diamond symbol
  • A “focus postion” vs. “temperature” graph has been added. This feature also includes a linear fit in order to estimate the temperature coefficient. The fitted temperature coefficient is also printed in the Summary output using the SGP definition.

The last point needs some explaining. It was suggested by several people to add a column of temperature rates between AF runs. I tested that, but on most of the log files a ran it on (coming from users on this forum) the calculated temp coefficient between AF runs varied widely. But if one plots the best focus position as a function of temperature one can still often see a clear trend, provided that the temperature change is significant enough. So I decided to take the approach to fit that data using a linear model, and to plot the result in a separate graph.

As my setup has been out of commission for a few months I didn’t have the occassion to test this feature. But here are two examples coming from logfiles posted on this forum:

This one is a bit extreme, with a lot of AF runs over a large temperature range:

This is a more difficult case with only 4 AF runs, but the trend is pretty clear:

I would be very interested in any feedback on this feature, if it is useful or not in practice.

Cheers, Mikael

2 Likes

Mikael, I haven’t had a chance to try this utility yet, but it looks simply awesome! Thanks for putting the time in to create it.

Mikael, your routine is phenomenal! I only learned about it yesterday, and used it extensively. Even the older version was such a dream to use. Over the years I developed some processes that extracted this data for me, but what you have done is 10 times better. Thanks so much for developing this tool for us.

I am going to put in my 2 bits contribution to the SGP project by programming the Quadratic fit routine for the auto-focus routines to make it even easier for the developers to fix the issues we have reported.

A possible further enhancement of your routine could be to include a display of the best fit parabola the Quadratic fit comes up with. If you like I will send you my code when I have it ready.

Something is wrong with the locale settings.
When opening a log file I get the following error.

@joelshort Thanks! I’ve learned a lot about how to use SGP by reading the posts on this forum. It’s really a nice community and SGP is great software, so I guess this is my way of contributing.

@jmacon Great that you find it useful. I’ve followed your discussion with the developers concerning improvements to the AF routine, it’s very interesting! If SGP does a quadratic fit in the future, it would be good if the resulting fitted parameters are simply put into the SGP logfile. Then it would be very easy to plot the same curve based on those parameters.

@jbrazio Can you please post the log file that resulted in this error? Otherwise I have no way of knowing where it appears.

I have seen errors in two cases using my software: Truncated (ie shortened) files will cause an error. Older log files will cause an error because the way the validation frame is reported in the logfile is different. I don’t know exactly when this occured, those were files from 2015 I think.

FYI i get these types of errors all the time nowadays when processing SGP acquired images in pixinsight. Maybe they changed something

In fact I have another bug report open that could be related with float parsing on the Plate Solving routine… and another one with event durations that makes SGP quit unexpectedly.

If could bet I would place my odds on “,” vs “.” thing which is locale based.

I will upload a log file shortly, the viewer breaks with all the log files I tried.

https://rie3x9.s.cld.pt

@jbrazio Indeed I cannot reproduce the error, your file is read on my computer so probable this is a local setting issue related to country settings. Can you please paste the main text output from my program? If I know which type of message causes this problem I might be able to fix it.

Mikael

Starting reading file: C:\Users\jbrazio\AppData\Local\SequenceGenerator\sg_logfile_20190804212624.txt…

AUTO FOCUS EVENT = 1
[08/04/19 21:35:20.551] SGM_FOCUSER_AUTO_FOCUS message received…
[08/04/19 21:35:20.554] Checking for auto focus…
[08/04/19 21:35:20.554] Auto focus required (temperature change trigger). Last temp: -500; Current temp: 38.4
[08/04/19 21:35:20.554] Auto focus required (focus before first frame)…
[08/04/19 21:35:20.569] Auto focus: setting filter Clear
[08/04/19 21:35:20.648] Auto focus data
[08/04/19 21:35:20.648] - Data Points: 9
[08/04/19 21:35:20.648] - Step Size: 512
[08/04/19 21:35:20.649] - Current Position: 98372
[08/04/19 21:35:20.671] Focuser moving to 100420
[08/04/19 21:35:32.805] Focuser moving to 100420
[08/04/19 21:35:39.031] Taking auto focus frame(s)…
[08/04/19 21:35:44.456] Star list contains 87 stars…
[08/04/19 21:35:44.845] Auto focus HFR calculated at: 2.78
[08/04/19 21:35:45.868] Focuser moving to 99908
[08/04/19 21:35:52.000] Taking auto focus frame(s)…
[08/04/19 21:35:57.347] Star list contains 149 stars…
[08/04/19 21:35:57.768] Auto focus HFR calculated at: 1.97
[08/04/19 21:35:58.775] Focuser moving to 99396
[08/04/19 21:36:04.913] Taking auto focus frame(s)…
[08/04/19 21:36:10.187] Star list contains 187 stars…
[08/04/19 21:36:10.573] Auto focus HFR calculated at: 1.49
[08/04/19 21:36:11.582] Focuser moving to 98884
[08/04/19 21:36:17.718] Taking auto focus frame(s)…
[08/04/19 21:36:23.091] Star list contains 165 stars…
[08/04/19 21:36:23.479] Auto focus HFR calculated at: 1.56
[08/04/19 21:36:24.488] Focuser moving to 98372
[08/04/19 21:36:30.636] Taking auto focus frame(s)…
[08/04/19 21:36:35.924] Star list contains 136 stars…
[08/04/19 21:36:36.294] Auto focus HFR calculated at: 2.01
[08/04/19 21:36:37.303] Focuser moving to 97860
[08/04/19 21:36:43.442] Taking auto focus frame(s)…
[08/04/19 21:36:48.900] Star list contains 84 stars…
[08/04/19 21:36:49.286] Auto focus HFR calculated at: 2.79
[08/04/19 21:36:50.302] Detected focus getting worse! Shifting auto focus range
[08/04/19 21:36:50.303] Focuser moving to 101444
[08/04/19 21:37:07.488] Focuser moving to 101444
[08/04/19 21:37:13.742] Auto focus data
[08/04/19 21:37:13.742] - Data Points: 9
[08/04/19 21:37:13.742] - Step Size: 512
[08/04/19 21:37:13.743] - Current Position: 101444
[08/04/19 21:37:13.753] Focuser moving to 103492
[08/04/19 21:37:25.861] Focuser moving to 103492
[08/04/19 21:37:31.109] Taking auto focus frame(s)…
[08/04/19 21:37:37.042] Star list contains 10 stars…
[08/04/19 21:37:37.526] Auto focus HFR calculated at: 9.23
[08/04/19 21:37:38.535] Focuser moving to 102980
[08/04/19 21:37:44.667] Taking auto focus frame(s)…
[08/04/19 21:37:50.275] Star list contains 12 stars…
[08/04/19 21:37:50.660] Auto focus HFR calculated at: 8.18
[08/04/19 21:37:51.670] Focuser moving to 102468
[08/04/19 21:37:57.815] Taking auto focus frame(s)…
[08/04/19 21:38:03.170] Star list contains 13 stars…
[08/04/19 21:38:03.536] Auto focus HFR calculated at: 7.43
[08/04/19 21:38:04.544] Focuser moving to 101956
[08/04/19 21:38:10.688] Taking auto focus frame(s)…
[08/04/19 21:38:16.187] Star list contains 21 stars…
[08/04/19 21:38:16.626] Auto focus HFR calculated at: 6.01
[08/04/19 21:38:17.635] Focuser moving to 101444
[08/04/19 21:38:23.780] Taking auto focus frame(s)…
[08/04/19 21:38:29.406] Star list contains 41 stars…
[08/04/19 21:38:29.801] Auto focus HFR calculated at: 4.57
[08/04/19 21:38:30.810] Focuser moving to 100932
[08/04/19 21:38:36.940] Taking auto focus frame(s)…
[08/04/19 21:38:42.270] Star list contains 56 stars…
[08/04/19 21:38:42.629] Auto focus HFR calculated at: 3.77
[08/04/19 21:38:43.638] Focuser moving to 100420
[08/04/19 21:38:49.784] Taking auto focus frame(s)…
[08/04/19 21:38:55.087] Star list contains 90 stars…
[08/04/19 21:38:55.469] Auto focus HFR calculated at: 2.77
[08/04/19 21:38:56.478] Focuser moving to 99908
[08/04/19 21:39:02.627] Taking auto focus frame(s)…
[08/04/19 21:39:07.954] Star list contains 144 stars…
[08/04/19 21:39:08.357] Auto focus HFR calculated at: 2.03
[08/04/19 21:39:09.366] Focuser moving to 99396
[08/04/19 21:39:15.504] Taking auto focus frame(s)…
[08/04/19 21:39:20.756] Star list contains 200 stars…
[08/04/19 21:39:21.147] Auto focus HFR calculated at: 1.53
[08/04/19 21:39:22.155] Focuser moving to 98884
[08/04/19 21:39:28.301] Taking auto focus frame(s)…
[08/04/19 21:39:33.677] Star list contains 180 stars…
[08/04/19 21:39:34.106] Auto focus HFR calculated at: 1.47
[08/04/19 21:39:35.115] Focuser moving to 98372
[08/04/19 21:39:41.263] Taking auto focus frame(s)…
[08/04/19 21:39:46.499] Star list contains 162 stars…
[08/04/19 21:39:46.842] Auto focus HFR calculated at: 1.86
[08/04/19 21:39:47.852] Focuser moving to 97860
[08/04/19 21:39:53.983] Taking auto focus frame(s)…
[08/04/19 21:39:59.288] Star list contains 94 stars…
[08/04/19 21:39:59.648] Auto focus HFR calculated at: 2.68
[08/04/19 21:40:00.656] Focuser moving to 97348
[08/04/19 21:40:06.799] Taking auto focus frame(s)…
[08/04/19 21:40:12.021] Star list contains 63 stars…
[08/04/19 21:40:12.425] Auto focus HFR calculated at: 3.88
[08/04/19 21:40:13.438] New focus position is at 99169 (@38.30C). Moving focuser…

Mikael

I have about a dozen logs with good AF data, i’ve been collecting them since version 1.0 of your software.

would they be helpful for you? happy to upload them

@mikaelA any feedback ?

@jbrazio I didn’t have time to look at the code yet, hopefully it will happen this week end. I probably need to send you a beta version via email, if possible?

@bvalente I’ve already collected quite a few logfiles from this forum, but a few more could be useful for beta testing.

Sure, reach me at joao@brazio.org