Page 1 of 2

Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Tue Feb 18, 2025 5:32 pm
by UlriP
Hello,

I am doing sequencing for our robotic telescopes on Úpice observatory. I found that "Wait until <Astronomical Event> happens (or has already happened)" is not working as intended for me. Atleast in documentations it's comented as I imagine it should work.

When I try to use steps with "(or has already happened)" sequencer is waiting for next day.

We have our 4 telescopes programed in sequencer and everythig worked fine, bude we changed our setups (computers, mount) and I need to write new sequences.

Right now I am trying do do auto meredian flip. As we are observing whole day, and sometimes we start in morning, sometimes afternoon, I need to write sequence that will work in any time it is started.

So i tryied "Wait until SolarNoon happens (or has already happened)" and sequencer is wainting for next day.

When I use "Stop running these steps when <SolarNoon> happens (or has already happened)" steps inside run because sequencer is looking for SolarNoon next day.

Version v4.1

Petr

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Wed Feb 19, 2025 2:02 pm
by admin
Hi Petr,

thanks for the bug report - you are correct that the calculation for solar noon is incorrect in that case and will wait until the next solar noon :(

I will fix that for the next update which should be available to download next Monday - please do let me know if you find any other problems.

thanks,

Robin

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Mon Feb 24, 2025 5:00 pm
by admin
Hi,

this should be fixed in today's update - please let me know if you still find any issues.

cheers,

Robin

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Fri Feb 28, 2025 5:34 pm
by UlriP
Hi,

We didn't have clear sky this week so I don't know if SolarNoon is happening at around the right time. But SolarNoon happened works fine.

Petr

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Thu Mar 06, 2025 5:28 pm
by UlriP
Hi,

This week have clear weather and I tested my sequences in different times.

When I started sequence 10 minute before noon everything was fine I think. Mount flipped.

Yesterday I started afternoon. In sequence there is step to repeat shooting to sun set, after that close the camera. 3/4 cameras closed normaly. Sequence is same.

Today I started 2 hours before noon. Sequences stated that noon is happening at 12:07 in all 5 computers. Cameras did steps repeat after noon about 1 hour before actual noon. Mount sequence waited to actual noon.

Cameras sequences is same for all of them. Every camera have mount simulator with correct location as physical mount.

I am aware that I probably incorrectly set up steps in sequences. Maybe I chose wrong steps , but solar noon 1 hour earlier is not good in any steps.

SEQUENCE
CAMERA OPEN "ZWO ASI174MM"
MOUNT CONNECT
FOCUSER CONNECT
WHEEL CONNECT
LIVE MODE
SET COLOUR SPACE TO MONO16
SET OUTPUT FORMAT TO "FITS files (*.fits)"
WHEEL SELECT FILTER CaII-K
TARGETNAME "ca patrola"
RUN SEQUENCE FROM C:\Users\Admin\Desktop\scripty\auto_exp.scs
SET ZOOM 200
PROMPT Zaostřete ENABLECONTROLS True
SET ZOOM 77
SET CONTROL Flip TO None
STOP AT SolarNoon
UNLOCK CONTROLS
ARRANGE FILENAMES
CAPTURE 1 LIVE FRAMES
DELAY 300
END UNLOCK
END STOP AT
DELAY 60
SET CONTROL Flip TO Both
LOOP UNTIL Sunset
UNLOCK CONTROLS
ARRANGE FILENAMES
CAPTURE 1 LIVE FRAMES
DELAY 300
END UNLOCK
END LOOP
ON FINISH HIDE PROGRESS
CAMERA CLOSE
END SEQUENCE

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Fri Mar 07, 2025 1:33 pm
by admin
Hi,

the sequence looks like it should work, and I have checked the code for 'STOP AT' and 'LOOP UNTIL' to make sure that they are calculating the time correctly and all is OK. It would probably be best if you can post the SharpCap logs from a successful run and a problem run - then I could do a comparison of the two and see how they differ, which will likely lead to the cause.

cheers,

Robin

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Fri Mar 21, 2025 12:03 pm
by UlriP
Hi,

Here are all five logs from all computers. Unfortunately SharpCap is running all time so logs are quite long, but important stuff are near the end. Yesterday solar noon was around 12:03 and only mount_dome computer did thing at right time. I started sequences from 10:36 to 10:40.

Also is there some way to execute mount flip from script? I didn't found anything in SharpCap.Mounts.SelectedMount. I only need mount flip if mount is pointing east, with sequences I think is not possible to write this condition. As I wrote I need sequence that will work if we started it in the morning and also if we started in afternoon.

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Sat Mar 22, 2025 2:20 pm
by admin
Hi,

OK, I see what is going on now - easier to see when looking at the sequence with indentation so that you can tell what parts are inside what other parts (this can be found in the log)

Code: Select all

SEQUENCE
    CAMERA OPEN "ZWO ASI174MM"
    MOUNT CONNECT
    FOCUSER CONNECT
    WHEEL CONNECT
    LIVE MODE
    SET COLOUR SPACE TO MONO16
    SET OUTPUT FORMAT TO "FITS files (*.fits)"
    WHEEL SELECT FILTER H-alpha
    TARGETNAME "ha patrola"
    RUN SEQUENCE FROM C:\Users\Admin\Desktop\scripty\auto_exp.scs
    SET ZOOM 200
    PROMPT Zaostřete ENABLECONTROLS True
    SET ZOOM 77
    SET CONTROL Flip TO None
    STOP AT SolarNoon
        UNLOCK CONTROLS
            ARRANGE FILENAMES
            CAPTURE 1 LIVE FRAMES
            DELAY 300
        END UNLOCK
    END STOP AT
    LOG ""
    DELAY 60
    SET CONTROL Flip TO Both
    LOOP UNTIL Sunset
        UNLOCK CONTROLS
            ARRANGE FILENAMES
            CAPTURE 1 LIVE FRAMES
            DELAY 300
        END UNLOCK
    END LOOP
    ON FINISH HIDE PROGRESS
    CAMERA CLOSE
END SEQUENCE	
The problem is that there is no 'LOOP' instruction inside the 'STOP AT SOLARNOON', so the steps inside that block will run through once (taking about 5 minutes due to the delay) and then the sequence moves on. You need to change that to a 'LOOP UNTIL SOLARNOON' or put some sort of loop inside the 'STOP AT' so that the capturing is repeated during the morning rather than happening once.

As to changing the side of pier, you can do that with scripting (if your mount supports setting the side of pier on the ASCOM driver) - try something like

Code: Select all

>>> SharpCap.Mounts.SelectedMount.SideOfPier
SharpCap.Base.Interfaces.SideOfPier.EastSideLookingWest
>>> from SharpCap.Base.Interfaces import SideOfPier
>>> SharpCap.Mounts.SelectedMount.SideOfPier = SideOfPier.WestSideLookingEast
Hope this helps,

Robin

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Sat Apr 19, 2025 3:26 pm
by UlriP
Hi,

I changed sequence like you wrote and did a meridian flip script.

As I tested it I found that sometimes it works like a charm and sometimes two cameras are looking for Solar Noon long after midday. Cameras that are problematic are Ha and Ca.

Also Sequence progres window is missing, I am starting sequence from custom button and inside a sequence is line to close this window after it's done. When I start sequence from sequence editor this window stay open.

Here you have another Logs.

Thank you for your help and work, with SharpCap our solar telescope is more or less automatic.

Re: Wait until <Astronomical Event> happens (or has already happened) is not working as intended

Posted: Sun Apr 20, 2025 11:19 am
by UlriP
Something weird happened today, meridian flip script that work fine, now have error in it.

Traceback (most recent call last):
File "<string>", line 3, in <module>
NameError: name 'SideOfPier' is not defined

But there is no line 3?

Script is

if SharpCap.Mounts.SelectedMount.SideOfPier.value__ == 1:
SharpCap.Mounts.SelectedMount.SideOfPier = SideOfPier.EastSideLookingWest