Script for occultation observation

Post Reply
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Script for occultation observation

#1

Post by Jean-Francois »

Hello,

Here a short preview of the future SharpCap script (and OccultWatcher Addin).
Addin_OccultWatcher.SC_report.pdf
(868.1 KiB) Downloaded 138 times
It should simplify the preparation of an observation.
An event file is generated from OccultWatcher and then import in SharpCap.

I'm still programming the "capture" part, but you can see in the PDF the actual status of my codes.

Please send me your comments and ideas (if it is not too complicated to add, I will add it if it simplify the preparation and the capture of the occultation events). One "new" idea I have is to add a "voice" in my script. I found how to do.

Part OccultWatcher Addin:
The Addin is finished ... but it needs an small update of OccultWatcher.
I have a beta version from Hristo. It will be necessary to wait until this new version of OccultWatcher is released.

Part SharpCap scripts:
First I write the codes of the script for the future version 4.1 (some changes in ASCOM).
The beta 4.1 version is working properly, but it is still not an official released version.
I updated my LED_Calibration script that can be started in the new "Occultation" script.

Robin, I code a "night vision", but is it possible to "transfer" the SharpCap night vision to the script window ?

Regards,
Jean-Francois
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Script for occultation observation

#2

Post by admin »

Hi Jean-Francois,

that looks very interesting - great to see this sort of thing :)

Not quite sure about the night mode for the scripting window - the main part of the scripting window should take on night mode colours (does in my testing). Unfortunately the title bar stays in system colours. This is the hardest part of the window to change, particularly because the console is a separate library that I pull into SharpCap, so I cannot easily use the solution for the problem that I use for the rest of the SharpCap windows.

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Script for occultation observation

#3

Post by Jean-Francois »

Hello Robin,

The IronPython Console (window) changes to the Nigh vision when the main window of SharpCap changes to the Night Vision (with F12 or from the menu). That is "nice" for the people that want to code during a night session.

I was asking if it is possible the have the Night Vision in a Windows Form generated by the script, also what my script shows.
If it is possible to use one class of SharpCap with the view in the Night mode.

And yes the title bar is not easy to change. I try to find how to change the tabs too.

Regards,
Jean-Francois
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Script for occultation observation

#4

Post by admin »

Hi Jean-Francois,

ah, I get it now.

Unfortunately all of SharpCap's night mode is based on WPF (Windows Presentation Framework) as a UI technology, not Windows Forms - actually one of the reasons I made the change was because it made the night mode much easier and also more complete (for instance scroll bars cannot really have their colours changed in Windows Forms, but can in WPF).

You can however discover if SharpCap is in night mode (SharpCap.NightModeControl.Enabled), and you can then set the foreground and background of your windows forms window using the 'BackColor' and 'ForeColor' properties (ie Black background, DarkOrange foreground to roughly match SharpCap). Some other controls on the form (buttons, etc) may also need their colours setting.

Hope this helps,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Script for occultation observation

#5

Post by Jean-Francois »

Hello Robin,

OK, WPF not Windows Forms.

I already use the "SharpCap.NightModeControl.Enabled" in my script.
But it is not complete ... the tabs and the upper title bar stay in white/grey.

Regards,
Jean-Francois
User avatar
admin
Site Admin
Posts: 13350
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Script for occultation observation

#6

Post by admin »

Hi,

yes, that's the problem with Windows Forms - much harder to change the colour of some things without rewriting the whole thing from scratch. WPF does give you the ability to re-theme moderately easily. Unfortunately, writing WPF in python is probably close to impossible sadly :(

cheers,

Robin
Jean-Francois
Posts: 402
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Script for occultation observation

#7

Post by Jean-Francois »

Hello occultation observers,

I have now a new version of my script.
Occultation_Addin_SharpCap_script_2023-07-02.zip
(849.7 KiB) Downloaded 121 times
What can you do with my script ?
- From OccultWatcher for a future event ... export a file with all the information of the event
- In SharpCap ... import the file with the information and you can do the following things
- GOTO to the star coordinates
- Plate Solve and centre to the star coordinates
- With the QHY-174GPS camera: perform the LED calibration
- Prefill the weather condition in the SODIS template
- Start a test capture (for checking if the images transfer is stable)
- Start the countdown and start automatically the capture of the film at a predefined time before the expected event time

The ZIP file contains a PDF with a lot of explanation ... please read it before doing something with the script (really, read it).

If at the beginning you do not want use the automatic start of the film ... it is OK.
You can use the script for the preparation (GOTO, Plate Solve, LED calibration). The film capture can be done manually.

But before using my script with a real occultation ... please use it with several test events.
You can do the following, for a future event (some days before the event), you can use the file after changing the date (and or time) from the tags
#StarRA, #StarDEC, #PredictTime, #EventDate, #EventTime (scroll down to the end of the file).
Yes, if the future event is at 3 O'clock in the morning ... you can change the time for 22 O'clock.



In addition for the QHY-174GPS camera LED calibration ... you can install the "menu" version of the LED calibration script.
The same script is used with the "Occultation" script.
Calibration_LED_2023-04-27_menu_41.zip
(4.51 KiB) Downloaded 123 times
Occultation_SC_32.png
Occultation_SC_32.png (28.47 KiB) Viewed 7247 times
Regards,
Jean-Francois
Post Reply