×
INDI Library v1.8.1 Released (09 Sep 2019)

Monthly maintenance release INDI v1.8.1

infinite loop focusing

4 months 2 days ago
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #41958
Has anyone experienced a problem where the focusing keeps getting re-triggered by the capture module? It goes on forever and basically only the first image of the sequence gets taken.

I experienced this yesterday when using the scheduler. I watched it for a while and everything was ok, It took the first image in the sequence but then I noticed focusing was taking a long time. Clicking on the capture and focus tabs I could see it was in a loop. The capture tab log window kept showing focus complete and then triggering focus again. Possibly related, guiding was not suspended as far as I could see. I clicked cancel in the focus tab and it just started it again. Also it was not really focusing as it didn't move the focuser, rather it just kept taking focus captures.

I think I have logs. Will dig them out and attach later.

Derek

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars

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

4 months 2 days ago
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #41978
OK I've found logs from last night. Here is the interesting part. This pattern of **Focus Complete --> Check Focus requested** continues with no end in sight.
Any ideas? I've also attached my Schedule and Sequence file.
Thanks""
Derek
[2019-08-11T23:57:35.585 IST DEBG ][     org.kde.kstars.ekos.focus] - Focus newFITS # 1 : Current HFR  1
[2019-08-11T23:57:35.589 IST DEBG ][     org.kde.kstars.ekos.focus] - Current HFR: 1 is below required minimum HFR: 1.4 . Autofocus successful.
[2019-08-11T23:57:35.589 IST DEBG ][     org.kde.kstars.ekos.focus] - AutoFocus result: true
[2019-08-11T23:57:35.592 IST DEBG ][     org.kde.kstars.ekos.focus] - State: "Complete"
[2019-08-11T23:57:35.594 IST INFO ][   org.kde.kstars.ekos.capture] - "Focus complete."
[2019-08-11T23:57:35.596 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Focus State "Complete"
[2019-08-11T23:57:35.766 IST DEBG ][     org.kde.kstars.ekos.focus] - Check Focus requested with minimum required HFR 1.4
[2019-08-11T23:57:35.767 IST INFO ][     org.kde.kstars.ekos.focus] - "Capturing image..."
[2019-08-11T23:57:35.767 IST DEBG ][   org.kde.kstars.ekos.capture] - In-sequence focusing started...
[2019-08-11T23:57:35.769 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Capture State "Focusing"
[2019-08-11T23:57:36.164 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking job stage for "SS Cyg" startup 2 "11/08/19 23:41" state 3
[2019-08-11T23:57:36.165 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2019-08-11T23:57:37.164 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking job stage for "SS Cyg" startup 2 "11/08/19 23:41" state 3
[2019-08-11T23:57:37.165 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2019-08-11T23:57:37.941 IST INFO ][           org.kde.kstars.fits] - Loading FITS file  "/tmp/fitsiQ1956.fits"
[2019-08-11T23:57:38.164 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking job stage for "SS Cyg" startup 2 "11/08/19 23:41" state 3
[2019-08-11T23:57:38.164 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2019-08-11T23:57:38.429 IST INFO ][   org.kde.kstars.ekos.capture] - "CCD capture aborted"
[2019-08-11T23:57:38.435 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Capture State "Aborted"
[2019-08-11T23:57:38.435 IST INFO ][ org.kde.kstars.ekos.scheduler] - "Warning: job 'SS Cyg' failed to capture target."
[2019-08-11T23:57:38.437 IST INFO ][ org.kde.kstars.ekos.scheduler] - "Warning: job 'SS Cyg' failed its capture procedure, restarting capture."
[2019-08-11T23:57:38.438 IST INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'SS Cyg' capture is in progress..."
[2019-08-11T23:57:38.445 IST DEBG ][   org.kde.kstars.ekos.capture] - "Client module indicates that storage for '/home/dokeeffe/Pictures/Landed/SSCyg/Light/PV/Light' has already 1 captures processed."
[2019-08-11T23:57:38.445 IST DEBG ][   org.kde.kstars.ekos.capture] - Preparing capture job "/home/dokeeffe/Pictures/Landed/SSCyg/Light/PV/Light" for execution.
[2019-08-11T23:57:38.448 IST INFO ][   org.kde.kstars.ekos.capture] - "Job requires 60.000-second PV images, has 1/100 frames captured and will be processed."
[2019-08-11T23:57:38.449 IST DEBG ][     org.kde.kstars.ekos.focus] - Check Focus requested with minimum required HFR 1.4
[2019-08-11T23:57:38.449 IST WARN ][     org.kde.kstars.ekos.focus] - Capture called while already in progress. Capture is ignored.
[2019-08-11T23:57:38.449 IST DEBG ][   org.kde.kstars.ekos.capture] - In-sequence focusing started...
[2019-08-11T23:57:38.449 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Capture State "In Progress"
[2019-08-11T23:57:38.452 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Capture State "Focusing"
[2019-08-11T23:57:39.165 IST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking job stage for "SS Cyg" startup 2 "11/08/19 23:41" state 3

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars
Attachments:

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

4 months 1 day ago
sterne-jaeger
Platinum Boarder
Platinum Boarder
Posts: 407
Karma: 5
More
infinite loop focusing #41988
Hi Derek,
I would say the problem starts earlier:
[2019-08-11T23:54:04.822 IST INFO ][   org.kde.kstars.ekos.capture] - "Received image 1 out of 100."
[2019-08-11T23:54:04.823 IST INFO ][     org.kde.kstars.ekos.focus] - "Capturing image..."
What you could see is that the Focus module immediately starts capturing after the first image has been received. But when it receives the image, it states that it has already completed and reports this to the Capture module.

It seems like from now on Scheduler, Capture and Focus seems to be out of sync.


Could you reproduce this with simulators? Just reading code does not give me a clue what happens.

- Wolfgang

TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro + ASI 294mc pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
The following user(s) said Thank You dokeeffe

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

4 months 1 day ago
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #41989
Thanks Wolfgang,

Yes I'll try with simulators later today on that same machine (I hope to get time).

Derek

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars

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

3 months 3 weeks ago 3 months 3 weeks ago by dokeeffe.
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #42124
I've reproduced this problem again just now under clear skies. I tried with the simulators but couldnt seem to reproduce it.
I've increased the logging level and attached logs. It captured 1 image out of my sequence, then gets stuck in a focusing loop.

I also tried to avoid using the scheduler. I closed EKOS and kstars, opened up again and instead of using the scheduler, just used the guide, focus and captue panels in EKOS. I get the same result. Captures 1 and then gets stuck in a focus loop.
I've captured a video from the PC here


Anyone have any ideas of what I could be doing wrong?
Thanks
Derek

File Attachment:

File Name: log_22-12-18.txt
File Size:519 KB

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars
Attachments:
The following user(s) said Thank You TallFurryMan

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

3 months 3 weeks ago
sterne-jaeger
Platinum Boarder
Platinum Boarder
Posts: 407
Karma: 5
More
infinite loop focusing #42128
Hi Derek,
that's really weird! Could you please also post the log from the time you shot the video?

It seems to be a problem with the HFR limit that triggers a re-focus. Are you using the HFR limit in your sequence?
In the sequence where you posted the log, everything goes well until the first image is received. Then a re-focus is triggered since the HFR in the image is above the level from focusing and then it starts to loop.

One thing might is slightly strange: in the video you posted, the focuser uses 2x2 binning. This might explain, why the image has a HFR worse than the focuser returns, since the focuser uses a coarser grid than capture. But this is only an idea...

- Wolfgang

TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro + ASI 294mc pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
The following user(s) said Thank You dokeeffe

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

3 months 3 weeks ago
TallFurryMan
Platinum Boarder
Platinum Boarder
Posts: 737
Karma: 13
More
infinite loop focusing #42134
Wolfgang, good point on the difference in binning between the focus frame and the capture frame! That's an interesting situation.

-Eric

HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
The following user(s) said Thank You dokeeffe

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

3 months 3 weeks ago
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #42135
Wolfgang / Eric,

Thanks for looking at this. Yes I generally use the HFR limit in the sequence and also I generally always bin 2x2 both in the capture and focus. I've always done this and never had a problem. 2x2 gives a better image scale for photometry with my camera/scope.

The sequence file I used was 'old' as in I have a library of them saved for the last year or more that I use. I've attached it here too (renamed to .txt because of forum restrictions)

File Attachment:

File Name: 100x60PV.esq.txt
File Size:1 KB

This sequence used to work fine until I recently did an apt-get update & upgrade and have this problem since.

I've also attached the log from the time of the video. Although I was doing a lot of 'messing' trying to fix it. Switching on/off the in-sequence HFR, switchin on/off in-sequence-guide limit.
I think its around 23:50:11.... There are probably a few attempts in this log file as I was stopping/starting desperately trying to fix it :-)
Maybe try `cat log_23-31-49.txt | grep 'In-sequence focusing'` to see the times

I'm going to have a look at the code later to see if I can figure it out?

BTW: This is just a hunch but is it possible that there is something around floating point numbers and rounding?
Previously when I focus (2x2 bin) on nights of good seeing my hfr would be about 0.95 and on nights of poor seeing it would be 1.23 or something like that.
However now I noticed its always rounded to 1....

Derek

File Attachment:

File Name: log_23-31-49.txt
File Size:983 KB

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars
Attachments:

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

3 months 3 weeks ago
sterne-jaeger
Platinum Boarder
Platinum Boarder
Posts: 407
Karma: 5
More
infinite loop focusing #42153
Hi Derek,
I think I found the problem. It looks like the focus status for HFR based refocusing is broken.

As far as I understand the code, it should be a workaround changing the EKOS / Capture Parameter "In-Sequence HFR Check" to a value > 1.

- Wolfgang

TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro + ASI 294mc pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10

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

3 months 3 weeks ago
knro
Administrator
Administrator
Posts: 7421
Karma: 51
infinite loop focusing #42174
What's broken exactly? possible to reproduce the issue with simulators?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

3 months 3 weeks ago
sterne-jaeger
Platinum Boarder
Platinum Boarder
Posts: 407
Karma: 5
More
infinite loop focusing #42177
I haven't reproduced it with simulators yet. The problem is this line in Capture::startFocusIfRequired():
else if (isInSequenceFocus && --inSequenceFocusCounter == 0)
isInSequenceFocus is only updated in resumeSequence(), but startFocusIfRequired() is called in startNextExposure(), i.e. it loops here as soon as the first image has been completed.
This is what I found out from the logs and reading the code. As a next step I will try to reproduce it - and then fix it...

- Wolfgang

TSA-120 + FSQ-85 + GSO 150/750 | Avalon Linear + M-zero | Moravian G2-8300 + ASI 1600mm pro + ASI 294mc pro | KStars/INDI on Raspberry Pi 4 with Raspbian 10
The following user(s) said Thank You dokeeffe

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

3 months 3 weeks ago
dokeeffe
Platinum Boarder
Platinum Boarder
Posts: 381
More
Topic Author
infinite loop focusing #42180
Awesome, thanks a million!!!

I also noticed a small commented out block where it sets isInSequenceFocus, not sure if that could be something. Although, like you say, It seems it does not get to this line.
isInSequenceFocus = (m_AutoFocusReady && autofocusCheck->isChecked()/* && HFRPixels->value() > 0*/);

Derek

Celestron CPC1100 Atik 383L
HP8300 Elite i5 running Xubuntu, Indi, Kstars & Ekos
Roll off roof observatory
Battling Irish weather
github.com/dokeeffe
twitter.com/BallyhouraStars

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

Time to create page: 0.305 seconds