SGPro 3.0 and FocusLock

Alright… as promised here is the initial set of instructions for the Focus Lock beta (this will all be baked into the SGPro help when it’s released).

What is FocusLock?

It is awesome. In my opinion, I think it will be the next new hotness for auto focus routines. It is an application that runs alongside SGPro and works to ensure that you are constantly in focus during the sequence.

Why would you use FocusLock?

There are lots of advantages to using FocusLock, here are the most important:

  • Avoid using the SGPro auto focus routine during sequences (this might save you 15-30 minutes in a night)
  • Always be exactly in focus… avoid small focus errors that can creep in between your auto focus intervals
  • Allow SGPro to automatically restart a given frame if FocusLock reports that focus was lost during integration

What do you need to use FocusLock?

  • The FocusLock application (distributed by Optec).
  • Either a
  • ONAG
  • Lacerta kit (significantly cheaper).
  • A guide camera (a starlight xpress camera if using a Lacerta kit)
  • PHD2
  • SGPro 3.0 or higher

How does SGPro interact with FocusLock?

SGPro creates a new “docking module” (the small windows that dock on the left and right sides) for FocusLock. In general, it looks like this:

When in use the main status text is designed to tell you if you are in or out of focus (or tell you why FocusLock is not running):

  • Not running: The FocusLock app is not running. Important! Do not start FocusLock manually… you must let SGPro start it for you.
  • Not connected: FocusLock is running, but none of FocusLock’s gear is connected
  • Lock not available: FL gear is connected, but FL does not have a “lock” available to use. A lock is required before FL is able to maintain focus.
  • Lock available: FL has a lock available, but it is not being used. Click the “Start” button or start the lock in the FL application.
  • Out of focus: Outside of the CFZ
  • In focus: Where you want to be

Icon meaning (from left to right):

  • Lock available (but not in use)
  • A condition exists that will not allow a lock to become available (FL not running, no gear connected, etc)
  • FocusLock using the lock and attempting to maintain focus (this icon does not indicate focus!)

SGPro extends a certain amount of information and control from the FocusLock application (start FL, connect gear, start lock, stop lock). The intent here, is to prevent you from having to keep the FL application visible and on top of your SGPro windows during normal sequence operation.

Beyond this, SGPro does have a few neat sequence integration features:

  • Never start a frame until FocusLock reports it has focus
  • Optionally restart a frame if FL reports it has lost focus during integration
  • Optionally prevent FL from moving the focuser while the camera is integrating

Options can be found by right clicking the docking module’s title bar (or by left clicking the small down arrow to the left of the “x”):

The two checkbox options are sequence options. This means that they must be set for every sequence (or added to your favorite equipment profile).

The path to the FocusLock application only needs to be set one time and it will be present across sequences.

Please let us know if you are using FocusLock!

Hi Ken,

I an intrigued with the FocusLock system and as I am already using an OAG with a LodestarX2 it looks favourable. However, I am intrigued how it works with accurately measuring fluctuating FWHM in less than ideal conditions and more importantly backlash in the auto focuser mechanism. Just my thoughts?


Just to be clear, FocusLock requires an ONAG, not a OAG. With an OAG, you will need the Lacerta kit.

You are welcome to discuss this here, but I don’t have any information on this (yet). Optec forums may have more data here.

Hi Ken,

Sorry for the misunderstanding. I was referring to the Lacerta Kit. I’m a
little intrigued how it works. Does the software refocus after an image has
been taken or at any time. ie during an image capture.


I’m intrigued by the Lacerta/Focuslock as well. My understanding is that
focus is continuous, during exposures. This eliminates the need for
autofocus after exposures and is not based on temp. I also think this will
be much easier than temperature compensation but I’ve not done that either.

Continuous focusing is a good idea, but, how does it compensate for
backlash in your focus motor.


I don’t know, but generally speaking the temperature will drop (or
increase) in a linear fashion, meaning the focuser should be moving in only
one direction as focus changes. So unlike autofocus where the focuser
moves in both directions, you’re only moving in one direction which I would
think would eliminate backlash. But take that with a grain of salt as I
don’t really have to deal with backlash so I’m not sure about this.

Hi Joel,

Unfortunately my focusers have geared motors which, as any geared motor,
has some form of backlash. I have backlash compensation enabled for the
inward motion. So,ok for inward travel. Outward travel will be a no go.


Hi Steve, Joel,
FocusLock is a closed-loop system and overcomes backlash and temperature effects because the feedback from the camera is continuous. As long as you’re guiding, FocusLock will keep the main camera in focus. This works because the ONAG or Lacerta device introduces a slight amount of astigmatism to the guide image (but not the main camera). The astigmatism tells our software which side of focus we’re on and is relatively immune to seeing effects. Focus correction occurs each time a guide image is analyzed. The focus correction can be optionally deferred until after the main camera image has completed.
More details are available here: Optec :: FocusLock Software
Feel free to contact me directly with any questions at all:
Happy Holidays!
Jeff Dickerman
Optec, Inc.

Thanks for the information Jeff. One thing, it relies on the main camera and guide camera being parfocal. This will take some careful setting up I guess, particularly for portable users.
What happens if the filters on the main camera are not parfocal? A slightly different guide camera focus position will be required for each filter to keep the main camera exactly focused. The filter offsets can be obtained from the filter but will the system allow the focus position to be changed so instead of driving the focuser so the guide camera is exactly in focus it is set to be slightly out of focus by a known amount?

Hi Chris,

on p. 2 of the Lacerta for Lodestar User’s Guide there is a hint relating to filter offsets (observe the last sentence):

“Allowance for Filter Offsets
FocusLock works with most any imaging workflow when an ONAG or OAG is utilized. Filter focus offsets can be determined once and then stored for automatic focus adjustment when a new filter is moved into the imaging camera’s light path. Even if the guide camera is not located behind the filter wheel, focuser offsets can still move the imaging camera to the precise, optimal focal point.”


Nothing beats reading the manual! Thanks Bernd.

I can see how the closed loop routine will eat up the backlash to get to the right focus. To Chris’ point, when a filter is introduced, however, how does it effect an offset if there is no backlash control?

There is a bigger practical issue for me and I guess, quite a few others, namely focuser mechanism quality. My Moonlight, FeatherTouch and Tak focusers all have a bit of lateral shift (several arc-seconds) when the mechanism moves. Focusing during exposure will just cause tracking errors…and if I reserve it for in-between exposures, it is then a toss-up between the effectiveness of the HFD (V-curve) vs FocusLock algorithms. Backlash control in SGP is a few seconds - but if the FL algorithm has to take repeated measurements to eat it up and not overshoot - won’t that take a similar time to a traditional V-curve?

[addendum] - I checked the Optec resources on the web and the OAG adaptor for the Lodestars. It looks a very interesting concept and I already use their excellent ASCOM server software for my ROR. This may not be for this thread for the discussion but it occurs that with my OAG, the lodestar is imaging from the image periphery and shows varying degrees of astigmatism across the guider chip. With that being the case and as PHD2 can select a star at the start of sequence and after a resume, meridian flip, etc., from anywhere on the chip, would that ruin the focus algorithm calibration, that models the astigmatism at the focus position?

You do have a point Buzz. The filter offset calibration is a fixed number of steps for each filter. While we don’t currently have backlash compensation routine built into this offset value, we could add the feature as an option. Most BLC routines try to approach the desired position from the same direction so they overshoot by enough steps to compensate, then reverse and hit the desired position.

For instance, the TCF-S focusers have about 22 steps of backlash in the gear-head stepper motor we use. In early FocusLock tests we turned off temperature compensation and let it run overnight on a test bench. In the morning we plotted the positions against time and saw two distinct lines exactly 22 steps apart - one when the temperature was decreasing and a second as the furnace kicked on to heat the lab back up. Backlash was simply taken up by FocusLock without any additional effort. After that we did not even consider adding temperature compensation, but I do see value with filter offset BLC as you have explained. I’ll work with Daniel to add the ability to compensate for backlash in the Filter Wheel settings dialog.

Interestingly, the lateral shift error you describe should be handled by the telescope guide system at the same time the focus is adjusted by FL. If you find that either guide or focus adjustments are adversely affecting your main image quality, each can be turned off for each guide frame and only make adjustments between main images. You’ll only see a step or a few steps of adjustment even with several minutes of exposure. FocusLock will continue to analyze each guide image even if no movement is sent to the focuser. There’s no need to take “new” measurements when the main imager completes an exposure. FL will simply move to the new best focus.

Finally, FocusLock calculates the best “relative roundness” so guider images with excess curvature which do not yield ideal astigmatic"crosses" at best focus can still be used to find the best focus.


Thanks Jeff. I can see how those of us who use short autoguider exposures will be able to correct any lateral shift within a small proportion of the overall light exposure. Those that run unguided or have capable mounts that use longer exposures, to avoid chasing seeing, should run the focuser between exposures.

I understand the point you are making here - and I notice that the FL tests were done with a 10"RCT with a field flattener. On my 10"RCT (without a flattener) I am at the edge of field with my OAG and the Lodestar sees a wide range of astigmatism at any one time over its sensor. I was wondering if the software can accommodate PHD2 auto-choosing a guidestar each time each with a different degree of aberration, since if I remember my optics, with field curvature and astigmatism, the best roundness for each star on the chip occurs at a different focus point.

Great to see SGP integrating seamlessly with FocusLock! IMHO, this continuous closed-loop system is the ultimate focus solution. I’ve been using an ONAG on my 8" Celestron SCT for about a year. Once you get everything perfectly parfocal (maybe an hour at the most) it will correct for all sorts of items, including mirror shifts, backlash, etc. When the night starts and focus corrections are large as the air cools, you may see guiding shifts around 1" or more (which PHD quickly corrects). But after it settles down within an hour or less, the closed loop corrections are very small and you see very little shift effects. Now with seamless integration with SGP, I assume you could focus between frames to negate any remaining shift effects. I look forward to trying this on my new 24" Planewave with ONAG or even the new Lacerta. You can see the results here on my 8" at 200’ altitude. Thanks SGP and Optec!!!

I’d like to add I’ve been using FocusLock with ONAG with stars generally in the center of the field. I do not have experience with the new OAG/Lacerta system.

Has anyone tried this with the Lacerta system and OAG? I have some questions. I e-mailed both Optec sales and Jeff Dickerman several days ago and troublingly got no response from either.

I was in contact with him just as the Win10 issues occured last weekend. Their ASCOM server software was affected by the updates too and he was busy working on a solution.


I am trying focus lock with sgp 3 and are getting this error

after a few seconds of this error the focus lock panel appears

If I then click on open after the panel appears sgp connects to focus lock – perhaps a timing issue ?