Focus position at sequence start based on temperature compensation

This has probably been discussed before, but my search did not find it. One frustration for me is that when a new sequence starts or resumes the next day (or any other day) there is often a large difference between the temperature that the last session ended and when the new session begins. This makes initial focusing a challenge. Autofocus will eventually get there most of the time, but it might require several rescaling/restarts. So instead, I multiply the current temperature by the temperature coefficient and add the y-intercept ”SGP Autofocus Viewer” will give you all of this). This always gets me surprisingly close to correct focus, and Autofocus never has to rescale to find focus. I know that version 4.3.something added an option to set initial focus at sequence start, but that goes through some seemingly unnecessary gyrations to come up with a guess at initial focus, which may or may not be any good depending on the temperature difference between the current session and the reference session that SGP came up with.

I would much prefer to simply give SGP my temperature coefficient and y-intercept and let it calculate the initial focus setting for the sequence start mathematically. If the temperature probe is properly placed, it can be surprisingly accurate - probably a good deal more accurate than the current guess SGP makes when the initial focus option is enabled.

Anyway, I hope this feature request is given due consideration.

Unless I misunderstand, SGPro does support the feature you’re requesting. You didn’t say if you are currently using it for not. I assume that because this is in feature requests you are not. The option is labeled Set initial position of the focuser at sequence start

Help docs are here:

Make sure to expand the section for that option to see how this feature is supposed to work.

It certainly can be me who is misunderstanding, but as I read it, the “Set initial position of the focuser at sequence start” routine looks for a sequence start in the last 15 days within 1.5 hours of the current sequence start, and selects the initial focus point from that sequence as the new sequence focus point. From what I can tell, it is agnostic of temperature. The start temperature for a sequence up to 15 days ago could be significantly different from the temperature today, particularly this time of year. 15 days ago the sequence could have started at 40 degrees and tonight it might be nearly 80 degrees and the focus position for the 40 degree start will be way off. What I am suggesting is different - just calculate the correct focus position from the y-intercept and coefficient input from the user (or the coefficient can come from the TC training routine) combined with the current temperature. It’s just a simple line equation: y = mx + b where “y” is the calculated correct focus position, “m” is the coefficient. “x” is current temperature and “b” is the y-intercept.

Sure, this all makes sense. The current implementation is the way it is in order to avoid creating a dependency out of temperature compensation. I’m not opposed to implementing “split” handlers for this duty though. In other words, if you have configured for temperature compensation, we will use simple slope intercept, otherwise, you get the current educated guess.

It doesn’t have to be a dependency on TC. Two completely different purposes are served. TC uses the temp coefficient to make focus corrections during imaging, whereas ““initial focus” would make use of two numbers provided by the user to calculate a starting focus position. Yes, the temp coefficient is the same in either case, but I, for example, let my focuser handle TC since it can make moves during acquisition which I prefer and my gear is capable of doing without image shift. So the use cases can be, but don’t have to be mutually exclusive. Anyway, thanks for the consideration. I hope it makes it into a release one day.

The feature that spokeshave wants was requested in Nov 2019 by me, see Automatic adjustment of focus position BEFORE the first AF run is started

Unfortunately the developers did not implement it.

Bernd

Sure, I get that, but we are typically pretty protective with new settings (lest we slide into settings hell… of which we are always on the edge of anyhow) and it does seem pretty duplicative as both are technically temperature compensations (of differing magnitude) that share the same coefficient.

I am not opposed to adding it… just need to think on how to present it for a moment.

1 Like