Setting up auto adjust focus per filter

I’m a bit new to the autofocus world and would appreciate some help setting this up. I’m doing photometry using B and V filters on a C11, with the autofocuser on the primary focus knob (i.e. no external focuser, so quite a lot of backlash). The B filter is offset about 800 steps from V in the ‘out’ direction of the mirror (CW rotation of the focus knob). Here’s what I’d like to happen for each target:

  1. Autofocus with V filter
  2. Acquire V images
  3. Apply the 800 step offset for the B filter then move straight to acquiring the B images (this will trigger backlash compensation since I’ve configured it to be ‘in’ since an SCT, and this is an ‘out’ move). I don’t want to autofocus with B ever as its close enough as a relative offset from V.

I think I have to:

  1. Enable ‘Auto adjust focus per filter’
  2. Enable ‘Auto focus with filter: V’
  3. In the Filter Setup, enter ‘Focus pt’ values for the two filters (with B 800 steps larger than V)

What not quite sure is what to set for ‘Focus with Filter’ for each filter. I assume use V for V, but do I set ‘Default’ for B?

Thanks,
Keith

To follow up on my own question, I tried this last night without success, whether I entered ‘Focus with Filter’ for B to either ‘B’, ‘V’, or ‘Default’. After acquiring the V frame, and SGP automatically changing to the B filter for the next event, the focuser did not budge. But I wonder if this is due to the SBIG CFW8 filter wheel I have and known issues with it reporting its position (i.e. though SGP commands a filter change, it doesn’t know it’s happened so doesn’t auto-adjust the focuser position?).

Keith

I have always used “Default” which works perfectly for me. I also am not sure what the feature ‘Focus with Filter’ is used for. Just use “Default”.
It looks to me like you have everything set correctly so it should work for you.

Yeah its a bit odd. I looked at the log file and where I would expect it to auto adjust the focus for the B filter, the log file states ‘Aborting change focus for filter because at least one of the filters in question does not have a focus position set.’. But I have these set in the filters box (I only had events for B and V).

filters

My guess is you have set 1,2,3,4 in Use. All probably need a Focus pt.

Maybe take a read of this thread, which contains a well-written explanation of how to set up filter offsets:

I don’t use the filter offsets option so the following advice may not be correct, but I think having “0” as a focuser position is incorrect when using the offsets feature (as suggested by jmacon). I believe SGP needs a focus position entry for each filter, so try measuring and then entering focuser positions for Empty and Spect too.

1 Like

Thanks for the replies. Next clear night I’m going to try non-zero offsets for those other two filters, and also just disabling them.

I just finished the experiments, and no luck on either fronts (non-zero offsets for other filters, or disabling them). I think its the SBIG filter wheel issue not reporting its position:

http://forum.mainsequencesoftware.com/t/current-filter-display-not-updating/10037

If I set the filter to ‘V’, then go to the control panel and click ‘Focus’, it should move to the set focus point 3112. However the window that pops up is:

image

So even though I just told SGP what filter to set (by manually setting it, or typically via the sequence), since the filter doesn’t report its position back, I’m guessing it doesn’t know what position to go to since it doesn’t know what filter is set.

It would be nice if a developer chimed in here.

Keith

This is pretty likely the issue. Unfortunately we may have to add some handling for this bad behavior in the filterwheel to just blindly set a fliter…wait some amount of time, :crossed_fingers: and hope it was successful.

Jared

I don’t know anything about running scripts in SGP, but as a workaround can one add a script to automatically run at the beginning of the event for the B filter to shift the focuser by X steps?

Keith

Do you have a log from your attempts? While it’s likely an issue with the CFW-8 not reporting position, if you have a log I can check to see for possible ways around it.

Jared

Here’s a link to the log: sg_logfile_20200527011529.log - Google Drive

Unfortunately I didn’t save my sequence file used for testing, but basically it was 2 events, the first a 1s light frame with the V filter (first event triggers autofocus), followed by a 1s frame with the B filter where I was hoping it would apply a 800 step focus offset.

One example of the B event is around [05/27/20 02:15:37.910].

Thanks,
Keith

You didn’t happen to setup those filter settings in the profile and then open the sequence without applying the profile changes did you? I don’t see those settings in the sequence you attached. Just 2 fitlers and their positions are both set at 0.

Thanks,
Jared

Hi Jared. No, the filter settings were as in the screenshot earlier in this thread, and I created a new sequence for this session so it applied the profile values.

Might be worth setting the values in the other two filters to something non-zero as well. It shouldn’t be using those though. I’m guessing that error is popping up because when SGP asks the filter wheel for it’s position we just get “1” or “-1” for the filter. So SGP likely thinks it’s on a different filter than it really is because of the issues with the CFW-8

Jared

I’m probably confusing things a bit having experiments over different nights. That’s actually what this log contains - setting the 2 unused filters to have non-zero values, then another where I’ve disabled those other 2 filters altogether. Perhaps I’ll repeat the next clear night so its self-contained (including the baseline with unused enabled and set to 0), then re-post (make take a few days by the look of it).

But if we assume its the SBIG issue, is there a workaround (e.g., scripting)? I’d like to not have to purchase another filter wheel because of this.

Keith

I’ve attached a more self-contained version of the experiments. Nothing worked.

Log file
Sequence file

I kept a log of notable times to cross-reference the SGP log:

[1:49] Changed unused filter focus pt to 0 in equipment profile and applied to sequence (confirmed settings in Focus Control) - baseline
[2:42] Run sequence (should autofocus V, acquire V frame, change filter to B, shift focus, acquire B)
[2:49] Changed unused filters focus to 3000 in equipment manager and apply to sequence, confirm
[2:50] Run sequence
[3:03] Disabled unused filters in equipment manager and apply to sequence, confirm
[~3:04?] Run sequence

Keith

I wouldn’t expect much change here until we look into “faking” the position from the filterwheel. I can’t recall what position the filterwheel returns…I’m guessing either -1, 0 or 1. But it basically always returns the same position. I’ll likely have to add some logging to figure out what it returns and then basically fake the position in SGP.

Jared

Okay. so I don’t have it set up incorrectly, and there isn’t a short-term workaround? I assume it will take some time to implement anything - any sense of time-frame so I can plan accordingly?

Thanks,
Keith

Jared - is this actively being worked on (“faking out the position”) for SBIG filter wheels at this point in time? I’m looking into scripting this (e.g. AutoHotKey) which is not ideal.

Keith