Monday, December 11, 2023

Overview of Fully Automated Planetary Processing

 

Overview of Fully Automated Planetary Processing






Introduction

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!


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

  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)



Friday, October 6, 2023

Jupiter's Moon Io caught spying on the Great Red Spot

 

 

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.

 

 

_______________________________

Akule Planetary Equipment H/W

 

* Type: Custom Home Built Newtonian (https://astromikephillips.wixsite.com/home/mikesastronomyequipment)

 

* Aperture: 35.6cm (14")

 

* Focal Ratio: f/4.5 + 5x TeleVue Powermate at 0.078"/px | 9,109mm EFL

 

* Primary Mirror: Carl Zambuto 14" f/4.5

 

* Camera: FLIR Blackfly BFS-U3-32S4M-C (monochrome, USB3.0)

 

* Color Filter Wheel: Starlight Xpress 7 Position 1.25" Carousel for Starlight Xpress USB Filter Wheel

 

* Filters: Baader Planetarium LRGB Telescope Filter Set

 

* Filters: Astronomik ProPlanet 742 IR-pass filter

 

* Filters: Astrodon-Schuler UV filter

 

Images: http://imgur.com/a/0znBY#0

 

Blog: http://maphilli14.webs.com/apps/blog/?view_type=1

 

_______________________________

**Akule Planetary Processing S/W**

 

* OS: Lenovo P1 Gen 2 (Microsoft Windows 11 64-bit)

 

* Acquisition: Torsten Edelmann’s Firecapture

 

* Processing: AutoStakkert 3 -> AstraImage -> WinJUPOS -> PhotoShop -> Topaz DeNoise -> Google Nik -> Gimp - https://imgur.com/a/RhPRXD2

 

 

 

Detailed processing - https://astromaphilli14.blogspot.com/2020/09/mars-2020-processing-recipie-25x-pm.html

Music:

 Artist of the track: Guillaume Robbe

 Title of the track: fly

 Direct URL of the track: https://www.jamendo.com/track/1003092/fly

 Link to the license terms: https://www.jamendo.com/track/1003092/fly

 Terms of the license: cc-sa cc-by

Tuesday, June 13, 2023

Parting view of Jupiter!

 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!


Jupiter

Click the above link for past seasons, icons below for current season.

  • PqxRu9o
  • Google-Photos-Logo-2015

Sunday, January 29, 2023

Green comet - C/2022 E3 (ZTF)

 I've got a good wide field setup and wanted lots of the tail but for some reason the tail is really on faint side of my setup or the light dome of Raleigh but I got it 2x times this week and it is great to see how much changes the comet goes through in a short period of time.

January 23rd 2023



January 27th 2023




For the extra curious, yes there are TWO tails, a dust tail and gas tail.

https://en.wikipedia.org/wiki/Comet_tail


  The dust tail that is a trail of dust that is left behind as it travels through space and the gas tail is created by the warming from the sun and ALWAYS points away from the sun.  This is why you will see the tails in different directions.  In my January 23rd photo they're nearly 180 degrees offset.

Sunday, January 15, 2023

Mike Phillips' 2022 Solar System in review

 This year I also made a video tour in power point, thanks Leila Gharani for the great PPT morphing tips!





Here's the full photos, with labels



and without





Saturday, January 14, 2023

AutoHotKey GOODNESS!

 As a longtime Sikuli user I was struggling but reluctant to move.  I dabbled in pywinauto and struggled but really didn't want a "macro" solution but I recently discovered AutoHotKey and am a convert!  Here's a few hrs work to automate AS3!


 

 

 #Requires AutoHotkey v2.0
;
;This Script will open a set of FireCaputre recordings in AutoStakkert3 and stack with defaults
;20220114 - ver 1.0
;
;FireCaputre folder
FCSaves := "E:\E-Delete\Mars2022--Expiring-20241212\Mars_2022_11_24"
;
try
    Run "C:\Users\Mike Phillips\OneDrive\D-Permanent\Software\AutoStakkert\AutoStakkert.exe"
catch
    MsgBox "File does not exist."
sleep 5000
; Consider set focus and or wait for app
;
; Sends file / open
MenuSelect "AutoStakkert",, "File", "Open AVI/SER"
sleep 100
Send "^a"
sleep 100
Send FCSaves
sleep 100
Send "!o"
;
;This section gets window postion to click into middle of diaglog box
WinGetPos &X, &Y, &W, &H, "Open your file"
;
;MsgBox "Open your file is at " X "," Y " and its size is " W "x" H
nX := Integer((X+(W/2))/2)
ny := Integer((Y+(H/2))/2)
;MsgBox "X+(W/2) = " nX " Y+(H/2) = " nY
sleep 100
MouseClick "left", nX, nY
sleep 100
MouseClick "left", nX, nY
sleep 100
Send "^a"
sleep 100
Send "^a"
sleep 100
Send "!o"
;
; This section sets Mike's favorite Mars stacking parameters
;
WinActivate "ahk_class TFormImage"
sleep 2000
SetControlDelay -1
ControlClick "TRadioButton3","ahk_class TFormImage"
sleep 100
ControlClick "TButton3","ahk_class TFormImage"
sleep 100
WinActivate "ahk_class TFormMain"
ControlClick "TRadioButton4","ahk_class TFormMain"
sleep 100
ControlClick "TButton5","ahk_class TFormMain"

 

Blog Archive