Please post here your DragScript

Please post here you dragscript for sharing with community … remember to remove the private data inside the script before upload using the right tools:
https://voyager.tourstar.net/index.php?title=DragScript#DragScript_Editor
Function “Remove all private data”

Thanks to who sharing it
LO

3 Likes

Here is my drag script. I wanted a script that was easy to use with multiple targets and I wanted the easy ability to vary the number of targets. I also wanted to easily turn taking dawn flats on and off. Both are controlled with variables at the beginning of the DragScript.

I also have 3 generic sequences that I modify for what I’m shooting at the moment that are used with this script. I also have some pauses in the script that wait until targets hit altitude before I start. Those also need to be modified for what you are shooting or removed.

It takes me perhaps 5 minutes to modify the script and the sequences when I am switching targets.

Here is the script:

1 - Start: Events At Start are ENABLE
2 - Script
3 - Counter: NUMBER_OF_TARGETS - Init Value = 2
4 - Counter: TAKE_DAWN_FLATS - Init Value = 0
5 - Remark: The Goto is used to skip sections, for example to go straight to OBJECT B
6 - Goto Block: INITIAL SETUP
7 - Block: INITIAL SETUP
8 - Remark: ==========================================================
9 - Remark: Initial Setup
10 - Remark: - Stop the mount tracking
11 - Remark: - Wait until 1 hour before Astronomical night and start the coolilng
12 - Remark: - Start the first cooling of the CCD down to 0C
13 - Remark: - Pause 3 minutes with the CCD at the current temperature
14 - Remark: - Cool down to the final temperature
15 - Remark: ==========================================================
16 - Homing
17 - Wait Time: 00:02:00 [hh:mm:ss] Interval
18 - Stop Tracking
19 - Wait Astronomical Night: Data from connected Setup - Offset (Before) 01:00:00 [hh:mm:ss]
20 - Cool Down: -20[°C] - Async Cooling - Use Voyager Ramp Mode Cooldown
21 - Block: WAIT UNTIL NIGHT
22 - Remark: ==========================================================
23 - Remark: - Wait until Astronomical Night to start the activities
24 - Remark: - Unpark the mount if it was parked
25 - Remark: ==========================================================
26 - Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:05:00 [hh:mm:ss]
27 - Unparking
28 - DO IF COUNTER VALUE: NUMBER_OF_TARGETS is Lower or Equal to 0
29 - Goto Block: DAWN FLATS
30 - Block: OBJECT A
31 - DO IF COUNTER VALUE: NUMBER_OF_TARGETS is Lower than 1
32 - Goto Block: DAWN FLATS
33 - Remark: ==========================================================
34 - Remark: - Run Sequence file for up to specified interval
35 - Remark: - If OK go to the OBJECT B Sequence
36 - Remark: - if ERROR Wait specified interval
37 - Remark: - If ERROR or TIMEOUT also repeat the current block n times
38 - Remark: - After n tries, jump to the next sequence
39 - Remark: ==========================================================
40 - Wait Altitude: >= 35 [°] - ( RA 12 18 49.302 - DEC 14 25 03.00 ) - Timeout 00:00:00 [hh:mm:ss]
41 - Sequence: Start Immediately - End 00:30:00 [hh:mm:ss] - C:\Users\AUser\Documents\Voyager\ConfigSequence\target1.s2q
42 - IF OK
43 - Goto Block: OBJECT B
44 - IF ERROR
45 - Wait Time: 00:15:00 [hh:mm:ss] Interval
46 - Repeat Block For n Times: 7
47 - Block: OBJECT B
48 - DO IF COUNTER VALUE: NUMBER_OF_TARGETS is Lower than 2
49 - Goto Block: DAWN FLATS
50 - Remark: ==========================================================
51 - Remark: - Run Sequence between specied times
52 - Remark: - If OK, go to the TERMINATE SESSION block
53 - Remark: - If ERROR Wait specified interval
54 - Remark: - If ERROR or TIMEOUT also repeat the current block n times
55 - Remark: - After n tries, jump to the next sequence
56 - Remark: ==========================================================
57 - Wait Altitude: >= 55 [°] - ( RA 12 17 29.899 - DEC 37 48 28.00 ) - Timeout 00:00:00 [hh:mm:ss]
58 - Sequence: Start Immediately - End Astronomical Night - C:\Users\AUser\Documents\Voyager\ConfigSequence\target2.s2q
59 - IF OK
60 - Goto Block: OBJECT C
61 - IF ERROR
62 - Wait Time: 00:15:00 [hh:mm:ss] Interval
63 - Repeat Block For n Times: 7
64 - Block: OBJECT C
65 - DO IF COUNTER VALUE: NUMBER_OF_TARGETS is Lower than 3
66 - Goto Block: DAWN FLATS
67 - Remark: ==========================================================
68 - Remark: - Run Sequence between specied times
69 - Remark: - If OK, go to the TERMINATE SESSION block
70 - Remark: - If ERROR Wait specified interval
71 - Remark: - If ERROR or TIMEOUT also repeat the current block n times
72 - Remark: - After n tries, jump to the next sequence
73 - Remark: ==========================================================
74 - Wait Time: 02:00:00 [hh:mm:ss] Time
75 - Sequence: Start Immediately - End Astronomical Night - C:\Users\AUser\Documents\Voyager\ConfigSequence\target3.s2q
76 - IF OK
77 - Goto Block: DAWN FLATS
78 - IF ERROR
79 - Wait Time: 00:15:00 [hh:mm:ss] Interval
80 - Repeat Block For n Times: 3
81 - Block: DAWN FLATS
82 - DO IF COUNTER VALUE: TAKE_DAWN_FLATS is Equal to 0
83 - Goto Block: TERMINATE SESSION
84 - Wait Dawn: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
85 - Flat: C:\Users\AUser\Documents\Voyager\ConfigSequence\SkyFlatDawn.s2f
86 - IF OK
87 - Goto Block: TERMINATE SESSION
88 - Repeat Block For n Times: 3
89 - Block: TERMINATE SESSION
90 - Remark: ==============================================================================
91 - Remark: - Run the GoodNight action to warmup the camera and park the scope
92 - Remark: - Go to the end of the script
93 - Remark: ==============================================================================
94 - Stop Tracking
95 - Good Night: Async Warmup - Park - CCD Filter Select [0] Lum
96 - Goto End
97 - End
98 - Events

3 Likes

Thank you so much … can you attach the vos file (the dragscript) after remove personal data with dedicated tool. So other users can download.

All the best
LO

Attached is the vos file for the above.
VoyagerMultiTarget.chg.vos (95.1 KB)

3 Likes

Thx LO for creating this topic.
I am interested in the management of a roll-off roof observatory following meteorological events and continue the sequences when the conditions are good. This is one of the subjects that I find difficult to manage. Thx for your examples.
Eric.
France

1 Like

Advanced way to manage Safe Open Roof with Viking:

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Block: SAFE OPENING ROOF
4   - 			Block: CHECK PARKED IN
5   - 				Wait High Level IN: 4 - 5[s] - TimeOut : 60[s] - ClientID 1
6   - 					IF OK
7   - 						Wait High Level IN: 5 - 5[s] - TimeOut : 60[s] - ClientID 1
8   - 							IF OK
9   - 								Goto Block: OPEN ROOF
10  - 				Repeat Block For n Times: 3
11  - 				Goto Block: ERROR OPENED
12  - 			Block: OPEN ROOF
13  - 				Relay On: 3 - ClientID 1
14  - 					IF OK
15  - 						Wait Time: 00:00:02 [hh:mm:ss] Interval
16  - 						Relay Off: 3 - ClientID 1
17  - 						Goto Block: CHECK ROOF OPENED
18  - 				Wait Time: 00:00:10 [hh:mm:ss] Interval
19  - 				Repeat Block For n Times: 3
20  - 				Goto Block: ERROR OPENED
21  - 			Block: CHECK ROOF OPENED
22  - 				Wait High Level IN: 3 - 5[s] - TimeOut : 60[s] - ClientID 1
23  - 					IF OK
24  - 						Goto Block: OK OPENED
25  - 				Wait Time: 00:00:10 [hh:mm:ss] Interval
26  - 				Repeat Block For n Times: 3
27  - 				Goto Block: ERROR OPENED
28  - 			Block: ERROR OPENED
29  - 				Send Email using Voyager Account:  -  - Error Opening Roof
30  - 				Goto End
31  - 			Block: OK OPENED
32  - 				Send Email using Voyager Account:  -  - Roof Opened
33  - 	End
34  - 	Events

SafeOpenRoof.vos (31.4 KB)

1 Like

Simple HourAngle Scheduler:

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Block: SHOT
4   - 			Block: TARGET A
5   - 				DO IF HA BETWEEN:  Between 1,5 and 3,5 [Hours] - ( RA 11 22 33 - DEC 44 22 11 )
6   - 					Sequence: Interval of 02:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\Sh2-157_LobsterClaw.s2q
7   - 			Block: TARGET B
8   - 				DO IF HA BETWEEN:  Between -1,5 and 1,5 [Hours] - ( RA 04 22 33 - DEC -05 22 11 )
9   - 					Sequence: Interval of 03:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\TestM13.s2q
10  - 			Block: TARGET C
11  - 				DO IF HA BETWEEN:  Between -1,5 and 1,5 [Hours] - ( RA 10 22 33 - DEC 07 22 11 )
12  - 					Sequence: Interval of 03:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\TestM13.s2q
13  - 			Wait Time: 00:02:00 [hh:mm:ss] Interval
14  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:00:00 [hh:mm:ss]
15  - 	End
16  - 	Events

SimpleHAUseMultiTargetAuto.vos (19.1 KB)

2 Likes

Simple Loop Exposure (manual focus or other porpouse):

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Expose: Filter [0] L - 2 [s] - Bin 2 - 1/2 Frame - Light - Exp - [CMOS Gain=0 Offset=0]
4   - 		Wait Time: 00:00:01 [hh:mm:ss] Interval
5   - 		Repeat Block For n Times: 200
6   - 	End
7   - 	Events

LoopExposure.vos (7.4 KB)

2 Likes

Advanced Multi Sequence with error management and retry:

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Block: Sequenza 1
4   - 			Sequence: Start 23:00:00 [hh:mm:ss] - End 02:00:00 [hh:mm:ss] - pippo - C:\Users\leonardo\Documents\Voyager\ConfigSequence\Sh2-157_LobsterClaw.s2q
5   - 				IF ERROR
6   - 					Send Email using Voyager Account: jfwief - wefwe - wefwef
7   - 					External Script:  
8   - 				IF OK
9   - 					Goto Block: Sequenza 2
10  - 			Wait Time: 00:10:00 [hh:mm:ss] Interval
11  - 			Repeat Current Block Until Time: 02:00:00
12  - 		Block: Sequenza 2
13  - 			Sequence: Start 02:00:00 [hh:mm:ss] - End 03:00:00 [hh:mm:ss] - pippo - C:\Users\leonardo\Documents\Voyager\ConfigSequence\Sh2-157_LobsterClaw.s2q
14  - 				IF ERROR
15  - 					Send Email using Voyager Account: jfwief - wefwe - wefwef
16  - 					External Script:  
17  - 				IF OK
18  - 					Goto Block: Sequenza 3
19  - 			Wait Time: 00:10:00 [hh:mm:ss] Interval
20  - 			Repeat Current Block Until Time: 03:00:00
21  - 		Block: Sequenza 3
22  - 			Sequence: Start 03:00:00 [hh:mm:ss] - End 05:00:00 [hh:mm:ss] - pippo - C:\Users\leonardo\Documents\Voyager\ConfigSequence\Sh2-157_LobsterClaw.s2q
23  - 				IF ERROR
24  - 					Send Email using Voyager Account: jfwief - wefwe - wefwef
25  - 					External Script:  
26  - 				IF OK
27  - 					Goto End
28  - 			Wait Time: 00:10:00 [hh:mm:ss] Interval
29  - 			Repeat Current Block Until Time: 05:00:00
30  - 	End
31  - 	Events

ScriptMulti2.vos (33.4 KB)

2 Likes

Simplest MultiTarget Sequence:

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Sequence: Start 21:30:00 [hh:mm:ss] - End 01:10:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\M100L.s2q
4   - 		Sequence: Start 01:10:00 [hh:mm:ss] - End 03:45:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\LBN438_Col.s2q
5   - 		Sequence: Start 03:45:00 [hh:mm:ss] - End 05:50:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\NGC2170_L.s2q
6   - 	End
7   - 	Events

SImplestMultitarget.vos (10.0 KB)

1 Like

Simple Altitude Scheduler with events management :

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		DO IF ALTITUDE BETWEEN:  Between 45 and 65 [°] - ( RA 12 - DEC 13 )
4   - 			Sequence: Interval of 01:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\M63.s2q
5   - 		DO IF ALTITUDE:  >= 50 [°] - ( RA 08 22 16 - DEC -10 22 21 )
6   - 			Sequence: Interval of 01:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\LBN438_Col.s2q
7   - 		DO IF ALTITUDE:  >= 30 [°] - ( RA 22 01 22 - DEC 10 12 22 )
8   - 			Sequence: Interval of 01:00:00 [hh:mm:ss] - C:\Users\leonardo\Documents\Voyager\ConfigSequence\LDN183_L.s2q
9   - 		Repeat Current Block Until Time: 05:45:00
10  - 		Block: Night finished, close and shutdown all
11  - 	End
12  - 	Events
13  - 		Emergency Suspend: Wait Resume until absolute time : 05:43:00 [hh:mm:ss] - On Resume Timeout End DragScript
14  - 			Send SMS with Nexmo:  => Session supending
15  - 			Parking
16  - 			Warmup: Async
17  - 			Send SMS with Nexmo:  => Session Supended
18  - 			Wait Time: 00:10:00 [hh:mm:ss] Interval
19  - 			Send SMS with Nexmo:  => Session ready to be resumed
20  - 		Emergency Resume
21  - 			Send SMS with Nexmo:  => Session in resume
22  - 			Unparking
23  - 			Resume from Block: Script
24  - 		Emergency Exit
25  - 			Block: Night finished, close and shutdon all (Emergency Exit)

NotteMultitargetPerAltitudine.chg.vos (28.2 KB)

1 Like

Here’s my script, which borrows from some that I’ve seen. I’m using Viking to control my Pegasus Astro UPBv2, so it starts the camera and mount relays, and does initial config. The sequence planning is done manually on my end w/ a custom vizualization of targets in my roboclip database. To end the session early, rather than go through 4 targets, I swap the goto next target vs. goto end imaging. For example, in the script below, I’m stopping after 2 targets.

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Block: Startup 45 min before Astronomical Darkness
4   - 			Remark: ==========================================================
5   - 			Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:45:00 [hh:mm:ss]
6   - 			Block: Power up devices
7   - 				Relay On: 1 - ClientID 1
8   - 				Relay On: 2 - ClientID 1
9   - 				Wait Time: 00:00:10 [hh:mm:ss] Interval
10  - 			Connect Setup
11  - 				IF OK
12  - 					Goto Block: Initial Setup
13  - 			Wait Time: 00:00:10 [hh:mm:ss] Interval
14  - 			Repeat Block For n Times: 3
15  - 			Send Email:  - Voyager Connection Failed - Failed to connect to equipment
16  - 			Goto Block: Terminate Session
17  - 		Block: Initial Setup
18  - 			Remark: ==========================================================
19  - 			Cool Down: -10[°C] - Async Cooling - Use CCD Firmware Cooldown
20  - 			Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
21  - 			Open Flat Device Cover: ID #1
22  - 		Block: Slew, Blind Solve and Sync
23  - 			Remark: ==========================================================
24  - 			Start Tracking
25  - 			Goto ALT/AZ: ALT 60 - AZ 120 - FC: False
26  - 			Plate Solving with Sync
27  - 				IF OK
28  - 					Goto Block: Initial Focus
29  - 			Wait Time: 00:05:00 [hh:mm:ss] Interval
30  - 			Send Email:  - Voyager Blind Solve Failed - Blind solve and sync has failed
31  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
32  - 			Goto Block: Terminate Session
33  - 		Block: Initial Focus
34  - 			Remark: ==========================================================
35  - 			AutoFocus with RoboStar: Filter [0] L - Multiplier x10
36  - 				IF OK
37  - 					Remark: ---- Initial focus succeeded
38  - 					Goto Block: Calibrate
39  - 			Wait Time: 00:02:30 [hh:mm:ss] Interval
40  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
41  - 		Block: Calibrate
42  - 			Remark: ==========================================================
43  - 			Calibrate Guide: Time 3 [s] - Binning 1 - Use RoboGuide Star Selection
44  - 				IF OK
45  - 					Remark: ---- Calibration succeeded, wait until astronomical night and then jump to first sequence
46  - 					Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:15:00 [hh:mm:ss]
47  - 					Goto Block: Sequence Selector
48  - 			Wait Time: 00:02:30 [hh:mm:ss] Interval
49  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
50  - 		Block: Sequence Selector
51  - 			Block: Target_1
52  - 				Remark: ==========================================================
53  - 				Sequence: Start Immediately - End 23:30:00 [hh:mm:ss] - C:\Users\Gabe\Dropbox\AstroBox\Voyager Sequence\abell_21.s2q
54  - 					IF OK
55  - 						Goto Block: Target_2
56  - 						Goto Block: End Imaging
57  - 					IF ERROR
58  - 						Send Email:  - Sequence Failed - Sequence failed to complete
59  - 						Wait Time: 00:02:30 [hh:mm:ss] Interval
60  - 				Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
61  - 			Block: Target_2
62  - 				Remark: ==========================================================
63  - 				Sequence: Start Immediately - End Astronomical Night - C:\Users\Gabe\Dropbox\AstroBox\Voyager Sequence\m101.s2q
64  - 					IF OK
65  - 						Goto Block: End Imaging
66  - 						Goto Block: Target_3
67  - 					IF ERROR
68  - 						Send Email:  - Sequence Failed - Sequence failed to complete
69  - 						Wait Time: 00:02:30 [hh:mm:ss] Interval
70  - 				Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
71  - 			Block: Target_3
72  - 				Remark: ==========================================================
73  - 				Sequence: Start and End from Sequence - m95_96 - C:\Users\Gabe\Dropbox\AstroBox\Voyager Sequence\RGB_4x5min_3_rounds.s2q
74  - 					IF OK
75  - 						Goto Block: Target_4
76  - 						Goto Block: End Imaging
77  - 					IF ERROR
78  - 						Send Email:  - Sequence Failed - Sequence failed to complete
79  - 						Wait Time: 00:02:30 [hh:mm:ss] Interval
80  - 				Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
81  - 			Block: Target_4
82  - 				Remark: ==========================================================
83  - 				Sequence: Start and End from Sequence - m95_96 - C:\Users\Gabe\Dropbox\AstroBox\Voyager Sequence\RGB_4x5min_3_rounds.s2q
84  - 					IF OK
85  - 						Goto Block: End Imaging
86  - 						Goto Block: Target_2
87  - 					IF ERROR
88  - 						Send Email:  - Sequence Failed - Sequence failed to complete
89  - 						Wait Time: 00:02:30 [hh:mm:ss] Interval
90  - 				Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
91  - 		Block: End Imaging
92  - 			Stop Tracking
93  - 			Goto Block: Terminate Session
94  - 			Flat: C:\Users\Gabe\Dropbox\AstroBox\Voyager Sequence\rgb_nb_flats.s2f
95  - 				IF OK
96  - 					Goto Block: Terminate Session
97  - 			Send Email:  - Flats Failed - Flat sequence failed to complete
98  - 			Wait Time: 00:02:30 [hh:mm:ss] Interval
99  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
100 - 		Block: Terminate Session
101 - 			Remark: ==========================================================
102 - 			Good Night: Async Warmup - Park - No CCD Filter Select - Close Flat Device Cover #1
103 - 				IF ERROR
104 - 					Send Email:  - Good Night action failed - Shutdown actions failed
105 - 				IF TIMEOUT
106 - 					Send Email:  - Good Night action failed - Shutdown actions failed
107 - 			Wait Time: 00:02:30 [hh:mm:ss] Interval
108 - 			Disconnect Setup
109 - 			Disable Events
110 - 			Relay Off: 1 - ClientID 1
111 - 			Relay Off: 2 - ClientID 1
112 - 			Send Email:  - Session Complete! - The Voyager session has completed
113 - 			Goto End
114 - 	End
115 - 	Events
116 - 		Emergency Suspend: Wait Resume until absolute time : 08:00:00 [hh:mm:ss] - On Resume Timeout Exec Emergency Exit Event
117 - 			Remark: ==========================================================
118 - 			Close Flat Device Cover: ID #1
119 - 			Parking
120 - 				IF ERROR
121 - 					Send Email:  - Emergency suspend action failed - Parking the scope failed
122 - 				IF TIMEOUT
123 - 					Send Email:  - Emergency suspend action failed - Parking the scope failed
124 - 		Emergency Resume
125 - 			Remark: ==========================================================
126 - 			Start Tracking
127 - 				IF ERROR
128 - 					Send Email:  - Emergency resume action failed - Start tracking failed to recover
129 - 				IF TIMEOUT
130 - 					Send Email:  - Emergency resume action failed - Start tracking failed to recover
131 - 			Open Flat Device Cover: ID #1
132 - 		Emergency Exit
133 - 			Remark: ==========================================================
134 - 			Send Email:  - Starting emergency exit  - Emergency exit event is starting
135 - 			Good Night: Async Warmup - Park - No CCD Filter Select - Close Flat Device Cover #1
136 - 				IF ERROR
137 - 					Send Email:  - Emergency exit failed - Good Night action failed during an emerg ...
138 - 				IF TIMEOUT
139 - 					Send Email:  - Emergency exit failed - Good Night action failed during an emerg ...
140 - 			Disconnect Setup

Default_script.chg.vos (145.9 KB)

1 Like

Here is the simple DragScript to create a 3+25 Align model I use with my 10Micron mount.
It is started by a DragScript from another user, my friend Vittorio, and modified by me for the first 3 align stars point.
You can start from this to add more points, and/or create a start Script with only the first 3 point, you can need it before the polar alignment, this needs to reset mannually model before re-start the model making after the polar alignment.

10micronAlignModel3plus25-mod.chg.vos (57,2 KB)

3 Likes

Here is the main DragScript that I use for imaging one to three targets in a session. It incorporates many ideas from other Voyager users.

I wanted a script that was flexible enough to allow me to image one to three targets without a major re-working of the script. I also wanted to be able to automate dawn sky flats with a flick of a switch (well, changing a 0 to a 1 :nerd_face:). This script accomplishes both goals.

To use the script, one must change two variables. The first is Number of Sequences. Set this to 1, 2, or 3, according to the number of sequences you want to run. Set it to 0 if you want to do ONLY sky flats. There must be a valid sequence file linked to each sequence block.

The second is Dawn Sky Flats. Set this to 1 if you want to do sky flats and to 0 if you do not want to do sky flats. Note that if you want to do ONLY sky flats and no actual targets, you must set Number of Sequences to 0 and Dawn Sky Flats to 1.

The script seems a bit long because I have inserted email messages at most of the “decision points”. The script itself is actually quite straightforward.

I hope someone will find this useful.

1   - 	Start: Events At Start are ENABLE
2   - 	Script
3   - 		Remark: ==========================================================================
4   - 		Remark: THIS SCRIPT AUTOMATES UP TO 3 SEQUENCES
5   - 		Remark: YOU MUST SET VALUES BELOW FOR NUMBER OF SEQUENCES AND SKY FLATS
6   - 		Remark: Number of Sequences can be 1, 2, or 3. Set to 0 for sky flats ONLY. 
7   - 		Remark: Do you want Dawn Sky Flats? No=0, Yes=1
8   - 		Remark: Be sure to select current light and flat sequence files in the blocks below.
9   - 		Remark: ==========================================================================
10  - 		Counter: Number of Sequences - Init Value = 3
11  - 		Counter: Dawn Sky Flats - Init Value = 1
12  - 		Send Email:  - TURN OFF SPRINKLERS - Be sure to turn off the sprinklers befor ...
13  - 		Block: WAIT FOR NIGHT AND CONNECT SETUP
14  - 			Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:20:00 [hh:mm:ss]
15  - 			Connect Setup
16  - 				IF OK
17  - 					Send Email:  - Connection successful - Connection successful. 
18  - 					Goto Block: SEQUENCE 1
19  - 			Wait Time: 00:00:15 [hh:mm:ss] Interval
20  - 			Repeat Block For n Times: 3
21  - 			Send Email:  - Voyager connection update - Voyager failed to connect the equipment. ...
22  - 			Goto End
23  - 		Block: SEQUENCE 1
24  - 			DO IF COUNTER VALUE: Number of Sequences is Equal to 0
25  - 				Goto Block: SKY FLATS
26  - 			DO IF COUNTER VALUE: Number of Sequences is Greater or Equal to 1
27  - 				Send Email:  - Starting Sequence 1 - Starting Sequence 1. 
28  - 				Unparking
29  - 				Sequence: Start Immediately - End Astronomical Night - C:\Users\Glenn\Documents\Voyager\ConfigSequence\SV102T\M81_LRGB_SV102T_Mach1_ASI1600.s2q
30  - 					IF OK
31  - 						DO IF COUNTER VALUE: Number of Sequences is Greater than 1
32  - 							Send Email:  - Sequence 1 complete - Sequence 1 of X complete. Starting seque ...
33  - 							Goto Block: SEQUENCE 2
34  - 						DO IF COUNTER VALUE: Number of Sequences is Equal to 1
35  - 							DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
36  - 								Send Email:  - Sequence 1 of 1 complete - Sequence 1 of 1 complete. Ending session ...
37  - 								Goto Block: TERMINATE SESSION
38  - 							DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
39  - 								Send Email:  - Sequence 1 of 1 complete - Sequence 1 of 1 complete. Parking mount  ...
40  - 								Goto Block: SKY FLATS
41  - 			Wait Time: 00:20:00 [hh:mm:ss] Interval
42  - 			Repeat Block For n Times: 3
43  - 			DO IF COUNTER VALUE: Number of Sequences is Greater than 1
44  - 				Send Email:  - Sequence 1 did not finish - Sequence 1 of X did not finish after mul ...
45  - 				Goto Block: SEQUENCE 2
46  - 			DO IF COUNTER VALUE: Number of Sequences is Equal to 1
47  - 				DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
48  - 					Send Email:  - Sequence 1 of 1 did not finish - Sequence 1 of 1 did not finish. Ending s ...
49  - 					Goto Block: TERMINATE SESSION
50  - 				DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
51  - 					Send Email:  - Sequence 1 of 1 did not finish - Sequence 1 of 1 did not finish. Parking  ...
52  - 					Goto Block: SKY FLATS
53  - 		Block: SEQUENCE 2
54  - 			DO IF COUNTER VALUE: Number of Sequences is Greater or Equal to 2
55  - 				Send Email:  - Starting Sequence 2 - Starting Sequence 2. 
56  - 				Sequence: Start Immediately - End Astronomical Night - C:\Users\Glenn\Documents\Voyager\ConfigSequence\SV102T\M81_LRGB_SV102T_Mach1_ASI1600.s2q
57  - 					IF OK
58  - 						DO IF COUNTER VALUE: Number of Sequences is Greater than 2
59  - 							Send Email:  - Sequence 2 of 3 complete - Sequence 2 of 3 complete. Starting seque ...
60  - 							Goto Block: SEQUENCE 3
61  - 						DO IF COUNTER VALUE: Number of Sequences is Equal to 2
62  - 							DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
63  - 								Send Email:  - Sequence 2 of 2 complete - Sequence 2 of 2 complete. Ending session ...
64  - 								Goto Block: TERMINATE SESSION
65  - 							DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
66  - 								Send Email:  - Sequence 2 of 2 complete - Sequence 2 of 2 complete. Parking mount  ...
67  - 								Goto Block: SKY FLATS
68  - 			Wait Time: 00:20:00 [hh:mm:ss] Interval
69  - 			Repeat Block For n Times: 3
70  - 			DO IF COUNTER VALUE: Number of Sequences is Greater than 2
71  - 				Send Email:  - Sequence 2 of 3 did not finish - Sequence 2 of 3 did not finish after 2 a ...
72  - 				Goto Block: SEQUENCE 3
73  - 			DO IF COUNTER VALUE: Number of Sequences is Equal to 2
74  - 				DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
75  - 					Send Email:  - Sequence 2 of 2 did not finish - Sequence 2 of 2 did not finish. Ending s ...
76  - 					Goto Block: TERMINATE SESSION
77  - 				DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
78  - 					Send Email:  - Sequence 2 of 2 did not finish - Sequence 2 of 2 did not finish. Parking  ...
79  - 					Goto Block: SKY FLATS
80  - 		Block: SEQUENCE 3
81  - 			DO IF COUNTER VALUE: Number of Sequences is Equal to 3
82  - 				Send Email:  - Starting Sequence 3 - Starting Sequence 3. 
83  - 				Sequence: Start Immediately - End Astronomical Night - C:\Users\Glenn\Documents\Voyager\ConfigSequence\SV102T\M81_LRGB_SV102T_Mach1_ASI1600.s2q
84  - 					IF OK
85  - 						DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
86  - 							Send Email:  - Sequence 3 of 3 complete - Sequence3 of 3 complete. Ending session  ...
87  - 							Goto Block: TERMINATE SESSION
88  - 						DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
89  - 							Send Email:  - Sequence 3 of 3 complete - Sequence 3 of 3 complete. Parking mount  ...
90  - 							Goto Block: SKY FLATS
91  - 			Wait Time: 00:20:00 [hh:mm:ss] Interval
92  - 			Repeat Block For n Times: 3
93  - 			DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 0
94  - 				Send Email:  - Sequence 3 of 3 did not finish - Sequence 3 of 3 did not finish. Ending s ...
95  - 				Goto Block: TERMINATE SESSION
96  - 			DO IF COUNTER VALUE: Dawn Sky Flats is Equal to 1
97  - 				Send Email:  - Sequence 3 of 3 did not finish - Sequence 3 of 3 did not finish. Parking  ...
98  - 				Goto Block: SKY FLATS
99  - 		Block: SKY FLATS
100 - 			Parking
101 - 			Wait Dawn: Data from connected Setup - Offset (After) 00:00:00 [hh:mm:ss]
102 - 			Unparking
103 - 			Flat: C:\Users\Glenn\Documents\Voyager\ConfigSequence\SkyFlats_LRGB_Mach1_Edge8_ASI1600.s2f
104 - 		Block: TERMINATE SESSION
105 - 			Good Night: Async Warmup - Park - No CCD Filter Select
106 - 			Send Email:  - Good Night action completed - The camera has been warmed and the mount ...
107 - 	End
108 - 	Events

N target forum.chg.vos (121.1 KB)

2 Likes
2 Likes

Hi all,

here is a DragScript which controls the image acquisition with a 10micron mount from dusk till dawn. Hopefully it will be a useful example for someone. It is not a polished, production ready solution. For example the error handling could be probably improved. But it works well for me.

I do not have a permanent pier or observatory and have to set up the scope at the evening. After that Voyager takes care of everything.

The script synchronizes the mount time with the notebook time using the 10micron Clock Sync utility:
https://www.10micron.eu/forum/viewtopic.php?f=3&t=441

When the sky is dark enough, the script builds a model for the mount using ModelCreator.
See Utilities: https://www.astromi.ch/downloads/

Then it automatically images a number of targets according to their hour angle position, i.e. when the targets are at the highest positions near the meridian. I’ve configured it to start at -3.5HA. Each sequence has the “Exit Sequence if Target is after this HourAngle” checkbox enabled. The EdgeHD scope here does not like meridian flips, so I set the “after this HourAngle” value to -0.1. For a different kind of equipment you can choose other values of course.

The script has a white list of targets to be imaged, so I do not have to remove targets from the script if I do not want to image them anymore. I can just edit the white list. M3 sequence is not active in the script example.

If you have never used ModelCreator before, then you should configure it first and make sure that it can build a model in interactive mode. I use it with an ASCOM camera driver. See the ModelCreator documentation for the meaning of the command line parameters. You will probably have to change the name of the model points file in the DragScript.

The DragScript uses two Python scripts, which are located in C:\Astro\Voyager directory on my notebook.

The first is mcpoll.py, which parses the ModelCreator’s log file in order to get the modelling results. You’ll have to install the latest Python 3.8.2 from https://www.python.org/downloads/ to be able to use it. Verify that the python script works by executing (assuming that the python script is located in C:\Astro\Voyager)

py C:\Astro\Voyager\mcpoll.py

from command prompt window (cmd.exe) and look for the output, which should be “OK”.
The python script assumes that the log is located in default directory:
C:/Users/USERNAME/Documents/Astromi/ModelCreator/Log
You can edit the mcpoll.py script to set a different location of the ModelCreator logs.

The other helper python script is signal.py. It is a custom Signal handler, similar to existing DragScript e-mail and other signals. Currently it simply writes the message to a log file.

I’ve tested the scripts only with English-US Windows 10 64 bit version. So I’m not sure how they will work with other languages.

Best regards,
Vitali

10MicronImaging_Forum_Public.vos (139.5 KB)

Here is the script in text form:

1   - 	Start: Events At Start are DISABLE
2   - 	Script
3   - 		Remark:  ================== Automation from Startup to Shutdown: GM1000HPS  ======================
4   - 		Remark: --- Edit the white list of the target names in the 'Run Sequences' block to choose targets
5   - 		External Script: py.exe  C:\Astro\Voyager\signal.py "Script started"
6   - 		Block: Start Required Applications
7   - 			Remark: ==========================================================
8   - 			Remark: --- For example start an application which controls the anti-dew heater
9   - 			Remark: --- 10Micron ClockSync for 2 minutes
10  - 			External Script: C:\Program Files (x86)\10micron\ClockSyncW\clocksync_w.exe 
11  - 		Block: Startup 45 min before Astronomical Darkness
12  - 			Remark: ==========================================================
13  - 			Remark: --- Put your location here
14  - 			Wait Astronomical Night: Manual Data [LAT:00° 00' 00" N  LON: 00° 00' 00" E] - Offset (Before) 00:45:00 [hh:mm:ss]
15  - 			Connect Setup
16  - 				IF OK
17  - 					Goto Block: Initial Setup
18  - 			Wait Time: 00:02:00 [hh:mm:ss] Interval
19  - 			Repeat Block For n Times: 5
20  - 			Goto Block: Terminate Session
21  - 		Block: Initial Setup
22  - 			Remark: ==========================================================
23  - 			Remark: ---- Stop tracking and wait, then unpark the mount, if it was in parked state
24  - 			Stop Tracking
25  - 			Remark: --- Verify: Dew schield. Scope temperature. Focuser position. Clouds. Tighten clutches.
26  - 			Wait User OK: without timeout
27  - 			Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
28  - 			Unparking
29  - 			Start Tracking
30  - 		Block: Initial focus
31  - 			Remark: ==========================================================
32  - 			Remark: --- Initial autofocus before building the model
33  - 			Goto ALT/AZ: ALT 80 00 00 - AZ 160 00 00 - FC: False
34  - 			Start Tracking
35  - 			Precise Pointing RoboStar Star: Bayer Matrix
36  - 				IF OK
37  - 					AutoFocus with RoboStar: Bayer Matrix - AutoFocus OnPlace
38  - 						IF OK
39  - 							Goto Block: Build model for the mount
40  - 			Wait Time: 00:05:00 [hh:mm:ss] Interval
41  - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:30:00 [hh:mm:ss]
42  - 			Goto Block: Terminate Session
43  - 		Block: Build model for the mount
44  - 			Remark: ==========================================================
45  - 			Remark: --- Run Model Creator. Use Python script which checks the modelling result
46  - 			Remark: --- Set the 'disconnectControl' value below to 'disconnect' in order to disconnect equipment before the ModelCreator run
47  - 			String: disconnectControl - Init Value = ""
48  - 			DO IF STRING VALUE: disconnectControl Contains "disconnect"
49  - 				Remark: --- Disconnect equipment to let Model Creator use the camera and the mount. Required if the mount is connected via a COM port
50  - 				Disconnect Setup
51  - 				Wait Time: 00:00:30 [hh:mm:ss] Interval
52  - 			Remark: --- Start ModelCreator without waiting. Python script will periodically read the ModelCreator log file
53  - 			External Script: C:\Program Files (x86)\ModelCreator 2\ModelCreator.exe --profile GM1000_EHD11_ASI071 --options ClearExisting,IncludeRefinement --modelPoints C:\Users\Vitali\Documents\Astromi\ModelCreator\Points\East_E3HA_W1HA_20-40Dec.csv
54  - 			Remark: --- Wait a bit before polling
55  - 			Wait Time: 00:02:00 [hh:mm:ss] Interval
56  - 			Block: Check modelling result
57  - 				Remark: --- Poll every 1 minute for 40 minutes
58  - 				String: result - Init Value = ""
59  - 				External Script: py.exe C:\Astro\Voyager\mcpoll.py; StringCheck=OK; OutString=result
60  - 					IF OK
61  - 						Goto Block: Reconnect equipment
62  - 				DO IF STRING VALUE: result Contains "Polar align error"
63  - 					External Script: py.exe  C:\Astro\Voyager\signal.py "PA error is too large"
64  - 					Goto Block: Terminate Session
65  - 				DO IF STRING VALUE: result Contains "RMS"
66  - 					External Script: py.exe  C:\Astro\Voyager\signal.py "RMS is large, repeating model run"
67  - 					Goto Block: Repeat modelling run
68  - 				DO IF STRING VALUE: result Contains "Failed"
69  - 					External Script: py.exe  C:\Astro\Voyager\signal.py "Model run failed"
70  - 					Goto Block: Repeat modelling run
71  - 				Wait Time: 00:01:00 [hh:mm:ss] Interval
72  - 				Repeat Block For n Times: 40
73  - 				Remark: --- ModelCreator took too long. Hangs? Terminate because it is not known what is happening
74  - 				External Script: py.exe  C:\Astro\Voyager\signal.py "MC timeout"
75  - 				Goto Block: Terminate Session
76  - 			Block: Repeat modelling run
77  - 				Wait Time: 00:01:00 [hh:mm:ss] Interval
78  - 			Repeat Block For n Times: 3
79  - 			External Script: py.exe  C:\Astro\Voyager\signal.py "Failed to build a model"
80  - 			Goto Block: Terminate Session
81  - 		Block: Reconnect equipment
82  - 			Remark: ==========================================================
83  - 			Remark:  ---- Reconnect equipment after the modelling run or if the script is restarted from here without modelling
84  - 			Connect Setup
85  - 				IF OK
86  - 					Goto Block: Start Sequences
87  - 			Wait Time: 00:02:00 [hh:mm:ss] Interval
88  - 			Repeat Block For n Times: 5
89  - 			External Script: py.exe  C:\Astro\Voyager\signal.py "Failed to reconnect equipment after a modelling run"
90  - 			Goto Block: Terminate Session
91  - 		Block: Start Sequences
92  - 			Remark: ==========================================================
93  - 			Cool Down: -5[°C] - Sync Cooling - Use CCD Firmware Cooldown
94  - 			Wait Astronomical Night: Data from connected Setup - Offset (Before) 00:10:00 [hh:mm:ss]
95  - 		Block: Run Sequences
96  - 			Remark: ==========================================================
97  - 			Remark: --- White list of targets to image. Followed by each target's sequence block
98  - 			String: targets - Init Value = "NGC4565 NGC5396 M013"
99  - 			Block: Sequence NGC4565
100 - 				DO IF STRING VALUE: targets Contains "NGC4565"
101 - 					DO IF HA BETWEEN:  Between -3.5 and -1 [Hours] - ( RA 12 36 21.000 - DEC 25 59 14.61 )
102 - 						Start Tracking
103 - 						External Script: py.exe  C:\Astro\Voyager\signal.py Imaging NGC4565
104 - 						Sequence: Start Immediately - End Astronomical Night - C:\Users\Vitali\Documents\Voyager\ConfigSequence\NGC4565.s2q
105 - 			Block: Sequence NGC5396
106 - 				DO IF STRING VALUE: targets Contains "NGC5396"
107 - 					DO IF HA BETWEEN:  Between -3.5 and -1 [Hours] - ( RA 13 56 56.000 - DEC 29 09 51.65 )
108 - 						Start Tracking
109 - 						External Script: py.exe  C:\Astro\Voyager\signal.py Imaging NGC5396
110 - 						Sequence: Start Immediately - End Astronomical Night - C:\Users\Vitali\Documents\Voyager\ConfigSequence\NGC5396.s2q
111 - 			Block: Sequence M3
112 - 				DO IF STRING VALUE: targets Contains "M003"
113 - 					DO IF HA BETWEEN:  Between -3.5 and -1 [Hours] - ( RA 13 42 11.620 - DEC 28 22 38.20 )
114 - 						Start Tracking
115 - 						External Script: py.exe  C:\Astro\Voyager\signal.py Imaging M3
116 - 						Sequence: Start Immediately - End Astronomical Night - C:\Users\Vitali\Documents\Voyager\ConfigSequence\M3.s2q
117 - 			Block: Sequence M13
118 - 				DO IF STRING VALUE: targets Contains "M013"
119 - 					DO IF HA BETWEEN:  Between -3.5 and -1 [Hours] - ( RA 16 41 42.000 - DEC 36 27 40.75 )
120 - 						Start Tracking
121 - 						External Script: py.exe  C:\Astro\Voyager\signal.py Imaging M13
122 - 						Sequence: Start Immediately - End Astronomical Night - C:\Users\Vitali\Documents\Voyager\ConfigSequence\M13.s2q
123 - 			Stop Tracking
124 - 			Wait Time: 00:01:00 [hh:mm:ss] Interval
125 - 			Repeat Block Until Astronomical Night End: Data from connected Setup - Offset (Before) 00:00:00 [hh:mm:ss]
126 - 		Block: Terminate Session
127 - 			Remark: ==========================================================
128 - 			Remark: ---- Run Good Night Shutdown action
129 - 			Good Night: Async Warmup - Park - No CCD Filter Select
130 - 			Disconnect Setup
131 - 			Disable Events
132 - 			Goto End
133 - 	End
134 - 	Events

mcpoll.py:

# Find the current ModelCreator log
# See if it is completed

from os import listdir
from os.path import isdir, isfile, join
from pathlib import Path
import re

# ModelCreator log directory default location
MCLogDir = join(str(Path.home()), 'Documents/Astromi/ModelCreator/Log')

# You should set the directory explicitely if you have customized the log location in FolderLocation.ini
#MCLogDir = 'C:/Users/Vitali/Documents/Astromi/ModelCreator/Log'

if not isdir(MCLogDir):
    print('No log')
    quit()

# Read the list of log files. MC naming allows to sort the list to find the latest log
MCLogFiles = [f for f in listdir(MCLogDir) if isfile(join(MCLogDir, f))]
if len(MCLogFiles) <= 0:
    print('No log')
    quit()
MCLogFiles.sort()
MCLastLog = join(MCLogDir, MCLogFiles[len(MCLogFiles) - 1])

# Read the log lines
l = 0
with open(MCLastLog, 'r') as f:
    l = f.read().splitlines()
if len(l) <= 0:
    print('No log')
    quit()

# Check if the modelling run is completed
# 22:41:06: General - Notice - Modelling run successfully completed
# 16:58:46: General - Notice - Shutting down
fCompleted = False
idxCompleted = -1
for i in range(len(l) - 1, -1, -1):
    if 'Modelling run successfully completed' in l[i]:
        idxCompleted = i
        break
    if 'Shutting down' in l[i]:
        fCompleted = True

if not fCompleted:
    print('Log incomplete')
    quit()

if  idxCompleted < 1:
    print('Failed')
    quit()

# TODO Check the log time, it should not be too far in the past


# Check if the model looks ok
# 22:41:06: General - Notice - Modelling statistics
# 22:41:06: General - Info - Model run completed in 0h 20min 15s
# 22:41:06: General - Info - Total Points in modelling run: 35
# 22:41:06: General - Info - Successfully solved points: 30
# 22:41:06: General - Info - Points failed to solve: 5
# 22:41:06: Mount - Notice - Alignment Info: 
# 22:41:06: Mount - Notice - Polar align error: 0* 0' 9.7"
# 22:41:06: Mount - Notice - Position Angle: 319* 51' 36.0"
# 22:41:06: Mount - Notice - Orthogonality: 0* 7' 28.1"
# 22:41:06: Mount - Notice - Model-Terms: 09
# 22:41:06: Mount - Notice - RMS:  6.4 "
# 22:41:06: General - Notice - Modelling run successfully completed

def findNumbers(value):
    return [float(v) for v in re.findall(r'[+|-]?\d*\.\d+|\d+', value)]

TotalPoints = 0
SolvedPoints = 0
FailedPoints = 0
PolarAlignError = [0.0, 0.0, 0.0] # [degrees, arcminutes, arcseconds]
RMS = 0.0

for i in range(idxCompleted, -1, -1):
    if 'Modelling statistics' in l[i]:
        break

    # What kind of a line is it
    parts = l[i].partition('Total Points in modelling run:')
    if parts[1] != '':
        value = parts[2].strip()
        TotalPoints = int(value)
        continue

    parts = l[i].partition('Successfully solved points:')
    if parts[1] != '':
        value = parts[2].strip()
        SolvedPoints = int(value)
        continue

    parts = l[i].partition('Points failed to solve:')
    if parts[1] != '':
        value = parts[2].strip()
        FailedPoints = int(value)
        continue

    parts = l[i].partition('Polar align error:')
    if parts[1] != '':
        value = parts[2].strip()
        PolarAlignError = findNumbers(value) # [degrees, arcminutes, arcseconds]
        continue

    parts = l[i].partition('RMS:')
    if parts[1] != '':
        value = parts[2].strip()
        valueFloats = findNumbers(value) # [arcseconds]
        RMS = valueFloats[0]
        continue

#print(TotalPoints, SolvedPoints, FailedPoints, PolarAlignError, RMS)

# PA error greater than 3 arcminutes is not OK
if PolarAlignError[0] > 0 or PolarAlignError[1] > 3.0:
    print('Polar align error', PolarAlignError)
    quit()

# RMS greater than 15 arcseconds is not OK
if RMS > 15.0:
    print('RMS', RMS)
    quit()

print('OK')

This is signal.py:

# Runs from drag script and delivers a message
import sys
import datetime

timestamp = '{date:%Y-%m-%d %H:%M:%S}: '.format( date=datetime.datetime.now() )

if len(sys.argv) <= 1:
    message = 'nothing'
else:
    message = ' '.join(sys.argv[1:])

# TODO A more visible notification.

# Simply write to a log file
with open('C:/Astro/Voyager/signals.txt', 'a') as f:
    f.write(timestamp)
    f.write(message)
    f.write('\n')
1 Like

Wonderful Vitali … great addition. Thanks for your time and effort on this.
It is truly a satisfaction when we see these developments for the use of DragScript, fantasy creativity and ingenuity.

All the best
Leonardo

1 Like