Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

Somewhere to ask questions about the best way to use SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
tutendorf
Posts: 5
Joined: Sat Oct 08, 2022 2:55 am

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#11

Post by tutendorf »

admin wrote: Wed Jan 14, 2026 12:10 pm Hi Tom,

glad you got it sorted :)

It would be helpful if you gave me some idea of how you managed to get the autofocus/refocus to run without having done the successful scan beforehand - that's supposed to be blocked with a helpful error, so I guess you found a way to get around the block that I ought to fix.

I think that there are both benefits and drawbacks to the way SharpCap does this... The alternative would be to have some sort of way to configure the autofocus operation - some window to adjust all the possible settings that might affect it. The problem is that there are *a lot* of those settings, and I'm not convinced that having a long list of things to adjust and trying to guess good values is a productive way to get things going. On the other hand, it's perhaps more in line with what users expect...

cheers,

Robin
Thanks, Robin!

I don't have to do anything special to kick off an automatic refocus without a valid autofocus scan. I simply have to click Tools-->Focus Assistant--> Automatic Refocus, and away it goes. No errors or complaints from SharpCap. Just a dialog that tells me it's going to do 26 steps and then proceeds 1 step count at a time. I included a log snippet of the activity at the bottom of this post.

I am certain that had I read the SharpCap manual more carefully, I would not have even encountered this "issue" because now it's very apparent to me how this is supposed to work. But, to your point, I suppose it would be better to not be able to blunder into trying an auto refocus the way I did without a valid set of autofocus data.

I have a log file that includes the SharpCap startup sequence and the automatic refocus section at the bottom. I'll be happy to transmit it to you if it will help. Just let me know your preferred method. I'm running SharpCap v4.1.14091.0 (X64, 64 bit).

Info 21:08:25.681458 #1 Toolbar/Menu input : SharpCap.ViewModels.Actions.RefocusAction executing in async Task SharpCap.ViewModels.UIAction.ExecuteAsync()
Debug 21:08:25.732948 #1 Placing simple progress window at top right of screen '\\.\DISPLAY17' with co-ordinates {X=0,Y=0,Width=1920,Height=1200} in async Task SharpCap.Sequencer.Extensions.RunSequenceWithSimpleProgress(IApplication model, string title, ScriptBlock scriptBlock, Action<DetailedProgressInfo> progressCallback)
Info 21:08:25.967518 #1 The sequence being run is :
SEQUENCE
REFOCUS PROMPTROI False
END SEQUENCE in async Task SharpCap.Sequencer.SequencerContext.RunAsync(ScriptBlock script)
Debug 21:08:26.027238 #1 Sequencer : Starting : in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 21:08:26.032426 #1 Sequencer : Starting : Refocus using the same settings as the most recently used autofocus run in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Info 21:08:26.046267 #1 Selecting transform Multi-Star FWHM Measurement in void SharpCap.Models.Transforms.set_SelectedTransform(ITransform value)
Info 21:08:26.046604 #1 Requesting creation of Multi-Star FWHM Measurement transform in object SharpCap.Models.Transform.CreateInUIThread()
Info 21:08:26.047861 #1 Created Multi-Star FWHM Measurement transform in object SharpCap.Models.Transform.CreateInUIThread()+() => { }
Info 21:08:26.284296 #1 Loading SharpCap.FrameTransforms.Focus.WPFFocusScoreControl, MinHeight is 220, ActualHeight is 0 in void SharpCap.New.DockingArea.SetToolContent(Control value)
Debug 21:08:26.287271 #1 Sequencer : Info : 'Refocus scan configured to use Multi-Star FWHM Measurement for scan about 229503 from 229491 to 229515 using 26 steps of 1, 3 samples, allowing for backlash of up to 0' while running step Refocus using the same settings as the most recently used autofocus run in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 21:08:26.552332 #1 Sequencer : Starting : Autofocus between 229491 and 229515 with 26 steps allowing for backlash up to 0 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 21:08:27.572046 #1 Sequencer : Info : 'Focus scan between 229491 and 229515 in 26 steps of 1' while running step Autofocus between 229491 and 229515 with 26 steps allowing for backlash up to 0 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)
Debug 21:08:27.579228 #1 Sequencer : Info : 'Moving focuser to start position : 229490 ' while running step Autofocus between 229491 and 229515 with 26 steps allowing for backlash up to 0 in void SharpCap.Sequencer.SequencerContext.OnProgress(string e)

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

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#12

Post by admin »

Hi Tom,

thanks - I guess I should test on a system that has never had SharpCap on before (or clear all the settings) to see if I see the same option to run the refocus. I will look into that.

cheers,

Robin
Post Reply