Jump to content


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Fully Automated Planetary Processing

  • Please log in to reply
2 replies to this topic

#1 Mike Phillips

Mike Phillips


  • *****
  • topic starter
  • Posts: 3,963
  • Joined: 21 Feb 2006
  • Loc: Swift Creek, NC - 35.6N, 78.7W

Posted 11 December 2023 - 03:51 PM

Overview of Fully Automated Planetary Processing






I use automation where ever possible.  These scripts will show you how I automate my routine of Astrophotography for making planetary photos.  I use this set of software and settings - https://astromaphilli14.blogspot.com/p/how-mike-images-planets.html


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!



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.



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.



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.



  1. AutoHotKey
  2. WSL - Windows Subsystem for Linux
  3. AutoStakkert folder
  4. AstraImage for sharpening
  5. Color pattern and pixel offsets for end detection needs AHK spying



Instruction manual and loose steps

  1. Lots of variables are written to a 'setup.ini' file and should be adjusted
  2. 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

  1. Asks for source avi/ser folder based upon 00-setup.ini and will open root in exploere for copy paste
  2. Selects all files and opens for stacking
  3. Stacks with fixed parameters based upon 00-setup.ini allows 20sec to override defaults
  4. Determine when done?
    1. Watch pixel values - https://www.autohotkey.com/docs/v1/lib/PixelGetColor.htm via discord
    2. 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.
    3. Count input files and compare to output over loop via AHK, status kicked into AHK TrayTip before and after loading new files.
    4. If incoming AVI/SER count = stacked count, the main loop is broken and then the pixel watcher starts to validate AS3 is complete
    5. If saved sharps equals stacks then the AstraImage Script is skipped
    6. Else AstraImage batch sharpening script is ran to resharp
    7. 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
  5. Automated AS!3 -> AI
    1. If resharpening is needed….
    2. After 'finalizing' AutoStakkert the AstraImage Script should be made to run
    3. Automatically set's parameters and sharpens
      1. Add means to set variables for folder name and actual set PSF / Iter
    4. Determine when done?
      1. Color change is RELATIVE based upon Win version or color scheme, and will need AHK Spy and setting variables
      2. Count input files and compare to output over loop
  6. Automated AI -> Imagemagik
    1. After 'finalizing' AstraImage, the RGB Script that runs in WSL python using imagemaik should be made to run
    2. AHK is used to launch a windows terminal defaulting to WSL (all manually installed and setup)
    3. Arguments passed from AHK to Python are in the following order:
      1. PATH - passed via AHK from start of automation
      2. PENDING: Animation Speed - read from setup.ini
      3. Image watermark / logo to place in lower right corner - read from setup.ini
    4. PENDING: Add croping
    5. PENDING: Add resizing
    6. Add offsets for text and watermarks to accommodate diff sizing
  7. Automated post to web
    1. Can copy to a mounted network share for use within apache/w3/homeassistant services  - read from setup.ini
    2. Investigate google photo or imgur api (like greenshot)


  • Flying_Fox, roelb, micromaxcomputer and 1 other like this

#2 Flying_Fox


    Ranger 4

  • -----
  • Posts: 363
  • Joined: 12 Sep 2005
  • Loc: Halifax, NS Canada

Posted 11 December 2023 - 09:30 PM








  • Mike Phillips likes this

#3 Mike Phillips

Mike Phillips


  • *****
  • topic starter
  • Posts: 3,963
  • Joined: 21 Feb 2006
  • Loc: Swift Creek, NC - 35.6N, 78.7W

Posted 11 December 2023 - 11:30 PM








Thanks, it is a long road of patience and obstinance !!!

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Recent Topics

Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics