I have been
assembling all my best planet photos from each calendar year and arranging them
into a single solar system family photo since 2008.If you think they seem good that is partially
because I fail on lots and you only get to see the best!
Most of my high-res
planet photos are from a 14" f/4.5, home built Newtonian telescope.
Why do you care? I leverage existing applications and cut out the mundane steps of clicking, loading and watching paint dry! Typically I find myself stacking in AS3 and then grabbing the results as they process and sharpening in AstraImage. This set of scripts automates all of that!
Notes
For ease of use I will maintain tiny scripts that I can use to rerun sub portions of my routine. Such as being able to run a script that ONLY executes commands within AstraImage or ONLY moves files from one phase or set of directories to another.
Note logging into the script running host via VNC can cause issues with the watcher scripts so it's likely better to spy on the computer with the homeassistant agent or a dropbox or onedrive log sync.
Goals
The goal of the whole project was to have a single button to press at the end of the night and a loosely processed final product would shoot out the other side.
Background
For a long time I used Sikuli, which is a great script language to work in as python/jython, but it's strength in Computer Vision (CV) was ultimately the hardest part to work with, lack of ability to change and adapt to new version, resolutions and theme or color changes. Example as seen 12 years ago -Automating Registax with Sikuli
Then I tried to work with other, python native things such as PYWinAuto but had little success.
I gave up and tried AutoHotKey, which as an outsider I always believed to be more a macro tool than a true programming language. I still have lots of learning to do and still prefer to write specific elements of my workflow in python.
Dependencies
AutoHotKey
WSL - Windows Subsystem for Linux
AutoStakkert folder
AstraImage for sharpening
Color pattern and pixel offsets for end detection needs AHK spying
Instruction manual and loose steps
Lots of variables are written to a 'setup.ini' file and should be adjusted
Pathing is static and you should find replace your script path manually until further notice
Each script can be run as a starting point and will drive to the end. The end is currently a script that loads a single final RGB with labels as well as the whole night's animation.
The full scripted process begins with an automated 'end of night' starting with -> AS!3
and then running into AstraImage for sharpening
-> RGB assembly and animation building in ImageMagik within WSL
-> archiving files and loading finals to webshare and local display!
Deep dive of steps
Manually run start of end of night autohotkey to start the following:
Automated AutoStakkert
Asks for source avi/ser folder based upon 00-setup.ini and will open root in exploere for copy paste
Selects all files and opens for stacking
Stacks with fixed parameters based upon 00-setup.ini allows 20sec to override defaults
Use relative window grap pixel color for top / total progress bar, all F's is not started or not complete, all 0's is black and done within v3.0.x AS3. Color change is absolute regardless of Win version or color scheme.
Count input files and compare to output over loop via AHK, status kicked into AHK TrayTip before and after loading new files.
If incoming AVI/SER count = stacked count, the main loop is broken and then the pixel watcher starts to validate AS3 is complete
If saved sharps equals stacks then the AstraImage Script is skipped
Else AstraImage batch sharpening script is ran to resharp
Either way next step is to archive all AVI/SER as to denote that the AS3 step is done and avoid confusion as to completeness
Automated AS!3 -> AI
If resharpening is needed….
After 'finalizing' AutoStakkert the AstraImage Script should be made to run
Automatically set's parameters and sharpens
Add means to set variables for folder name and actual set PSF / Iter
Determine when done?
Color change is RELATIVE based upon Win version or color scheme, and will need AHK Spy and setting variables
Count input files and compare to output over loop
Automated AI -> Imagemagik
After 'finalizing' AstraImage, the RGB Script that runs in WSL python using imagemaik should be made to run
AHK is used to launch a windows terminal defaulting to WSL (all manually installed and setup)
Arguments passed from AHK to Python are in the following order:
PATH - passed via AHK from start of automation
PENDING: Animation Speed - read from setup.ini
Image watermark / logo to place in lower right corner - read from setup.ini
PENDING: Add croping
PENDING: Add resizing
Add offsets for text and watermarks to accommodate diff sizing
Automated post to web
Can copy to a mounted network share for use within apache/w3/homeassistant services - read from setup.ini
Investigate google photo or imgur api (like greenshot)
This animation was
taken from processing 235 AVI video files.Each file was cropped at 1008x950 and ranged in size from 2.02 to 2.38GB
in size.After stacking in AutoStakkert3
the files were sharpened in AstraImage and RGB combined via automation with
Python and AutoHotKey resulting in 75 images that were then converted with
ImageMagik into an animation.The total
time imaging was 117minutes and I would have had the rest of Io's transit if
not for misjudging the scope placement into the path of a gorgeous Oak tree in
my front yard.
Sitting around for 6 months in my 'Latest' workflow folder I found this in some decent seeing. I was setup in a spot to dodge the trees for Mars and found a small gap to hit Jupiter while I waited!