×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Focus: New Feature for Build Filter Offsets

  • Posts: 564
  • Thank you received: 256
Hi All,

I've refactored the Build Filter Offsets Utility introduced in 3.6.5

Recap: What's are Filter Offsets?
There are 3 ways to Autofocus in Ekos. Here, I've setup an example that covers each:

Attachment not found



1. Use Autofocus on the designated filter. In the example, Lum is configured like this. Whenever the Lum filter is selected in a sequence, Autofocus will be run on Lum.
2. Use Autofocus on a "lock" filter. In the example, Sii, Ha and Oiii are configured like this. Whenever Sii, Ha or Oiii are selected in a sequence, Autofocus will be run on Lum. When Autofocus completes (for example at 37273), Focus will apply the offset to go from Lum to, for example, Ha (in this case (-23 - 0) = -23 ticks. The focuser moves to 37273 - 23 = 37250 and Ha will again be selected in the filter wheel. This is useful in the case that its either difficult to focus a filter or it takes a long time because the exposure needed is long.
3. Don't use Autofocus but apply offsets on filter change. Red, Green and Blue have been setup like this. For example, when swapping from Red to Green, no Autofocus will be run and the focuser will from its current position (e.g. 37118) by the offset different between Red and Green. In this case, 4 - (-21) = 25 ticks. So the focuser moves to 37118 + 25 = 37143 and Green will be selected in the filter wheel. This can be useful to reduce the number of Autofocus runs in order to spend more time imaging and less time focusing.

So how do I setup Filter Offsets?
You can do it manually by running Autofocus several times and getting an average focus position for each filter. Then do the maths yourself to work out the offsets and enter these numbers into the Offsets column in the Filter Settings popup.

3.6.5 Introduced the Build Filter Offsets utility, launched from the Filter Settings popup by pressing the Build Offsets button. This helps to automate the process. See the Build Offsets section in the Focus section of the Kstars Handbook

Latest Build Filter Offsets
The utility has been refactored and some bugs fixed. In addition, now the utility takes advantage of Adaptive Focus. The reason for this is that running the utility on, for example, 7 filters with 5 Autofocus runs per filter will probably take longer than an hour. In this case, the environment factors that affect Focus such as temperature start coming into play. So, if you have already configured Adaptive Focus then this will be used to adjust each focus run for the environmental conditions in the first run in the utility to allow for better comparison of Autofocus results (an essential step in calculating Filter Offsets).

In this example, I've run Build Filter Offsets on all filters:


Here, the Adapt Focus box is checked and the results are adapted for temperature changes (I have this configured as 10 ticks per degree centigrade).


In order to help see what's happened, hover the mouse over an Autofocus result and an Adaptive Focus Explainer toolti[p will appear...


It shows the measured Autofocus result for that run (17994), adaptations for Temperature (0.3C change equal to 3 ticks) and Altitude (-1.6 degrees Alt but because I have configured 0 ticks per degree Alt, the Alt adaptation is zero). The deltas are between this AF run and the first one. Then it shows the resultant, adapted Autofocus result (17997). The Adapt Focus box can be toggled on and off and the grid will show the appropriate values which can then be saved into Filter Settings for future use.

In addition, the reference filter can be changed. It defaults to the first row and is indicated by an "*". In this case "Lum *". This can now be changed by double clicking another filter.

The code has just been merged (today) so is available to anyone interested in taking bleeding edge or daily updates. It will be in the next official Kstars/Ekos release.
The following user(s) said Thank You: Matteo Piscitelli, Frederick Ruegsegger
7 months 1 week ago #94126
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Here is the screenshot that didn't post correctly in the post...
The following user(s) said Thank You: Gord Tulloch
7 months 1 week ago #94127
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 6
Hi there:

I set this up like the following (except Auto-Focus on Lum is ticked):



I expected an auto-focus on Lum and then just move to the correct offsets for the other filters. What happens is yes, the focus moves for each filter, but then the sequence stops.



I've waited 15 mins to see if it's just a pause but nope, the sequence has just stopped. I have to stop and restart for each filter. Am I missing something?

Stellarmate X 1.7.9 on Beelink Mini-PC, focuser is Shoestring FCUSB and JMI motofocus motor on a C8

UPDATE: I am also getting "Discarding Autofocus start request - AdjustFocus in progress." when I try to autofocus now, not sure if thats related.
Last edit: 3 months 1 week ago by Gord Tulloch.
3 months 1 week ago #97225
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 230
  • Thank you received: 37
Hey John, great work on all that you do for us!

I have an issue that just came up on the latest build: 2023-11-17T09:38:40Z running on Ubuntu.

2 Issues:

During the Meridian flip, the camera module continues to capture, even if status shows slewing (During the flip) the capture module does not stop during the flip.

The other issue is if K-Stars uses the L Filter to do the align, when it does the Focus run, the filter stays on L (It was on the correct filter before the flip). I believe there is no logic in the program to let the focus module know the filter was changed during the alignment proceedure.

It focuses using the L filter instead of the capture filter, in this case "B".
3 months 1 week ago #97226

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Hi Gord,

It looks from the screenshots that you haven't successfully run Autofocus on Lum (data like Last AF Position should update after a successful Autofocus). Or maybe these were screenshots at the start and you subsequently ran Autofocus successfully?

Looks like when you swapped to the V filter it tried to move out by 60 steps (which makes sense if the previous filter was Lum). But then things hung.

If you have a log file could you post it please. I will try and recreate this problem later.

Regards,
John.
3 months 1 week ago #97236

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Hi Sonny,

On the first issue (capturing during Meridian Flip) I'll see if any of the other developers can help.

On the second issue I'll see if I can reproduce it later. If you force a filter to be used in Align then what should happen (I think from memory) is that when Align completes, it should tell Filter Manager to return the filter to its previous value. It might be worth just double checking the Filter Settings popup to make sure you haven't got "B" locked to "L". Focus is quite dumb here, if an Autofocus is requested it uses the current filter unless that filter has a lock filter, in which case it changes to the lock filter, runs Autofocus, then returns the filter to the previous value.
3 months 1 week ago #97237

Please Log in or Create an account to join the conversation.

  • Posts: 230
  • Thank you received: 37
Yeah first thing I checked was if there were any filter locks checked, there were none on any filter.

I submitted an issue for it here:

invent.kde.org/education/kstars/-/issues/261
The following user(s) said Thank You: John
Last edit: 3 months 1 week ago by Sonny Cavazos.
3 months 1 week ago #97240

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 6
I've run numerous autofocus runs on all of the filters, or do I need to run one while I'm in the filter offset window?

Tonight looks good for imaging so I'll run everything with logs turned on and try to do screen captures along the way to help diagnose issues. Thanks very much for creating this function it's hugely useful for me!!!
Last edit: 3 months 1 week ago by Gord Tulloch.
3 months 1 week ago #97243

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Something is wrong because these fields get updated automatically by Focus at the end of each successful Autofocus...


The fact that they appear to be showing initial values (prior to any Autofocus runs) is strange - I've not seen this before.

The FilterSettings dialog is just a view onto the data, whether its open or not when Autofocus runs won't matter.

Whether this is related to the issue you reported with Capture hanging I don't know but it implies that Focus can't communicate with the FilterManager to update it. Then Capture appears to hang whilst processing an adjustment of 60 ticks. This implies a problem communicating between Capture and Focus or the FilterManager.

Please turn on verbose logging for focus, capture and filters on your next run - hopefully we'll be able to figure out what's going on.
3 months 1 week ago #97248
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 6
Here's my log of this evening. I autofocused on the target in Lum then ran a sequence of 30s LRGB filters. Each time it stopped at the focus change until I aborted it, reset the sequence and deleted the prior line. Each line appears to do the filter offset then just stop.
3 months 1 week ago #97258
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Thanks very much for the log Good.

So 2 things:
1. I have an idea about why this bug is occurring. I haven't been able to reproduce it yet on the Sims but will keep trying,
2. The reason that the filter offsets isn't being updated after a successful Autofocus run is that you have a timer based focuser and there is code in place not to update it for these focusers. I had forgotten this. I don't think this will affect the bug causing point 1 though.
The following user(s) said Thank You: Gord Tulloch
3 months 1 week ago #97283

Please Log in or Create an account to join the conversation.

  • Posts: 564
  • Thank you received: 256
Hi Gord,

Sorry for the delay on this; I've been having issues with my development environment.

I can repeat the bug and have fixed it. Just testing now but hopefully will push the fix over the weekend.

The issue affects timer based focusers.

Regards,
John.
The following user(s) said Thank You: Gord Tulloch
3 months 4 days ago #97348

Please Log in or Create an account to join the conversation.

Time to create page: 2.009 seconds