Friday, March 21, 2025

A Bit on Scripting

In a previous post "Multi-Unsharp Mask Sharpening" I commented on creating a script within Paintshop Pro (PSP) that applies a series of unsharp masks to a lunar or planetary image. The method is also known as wavelet sharpening something I did not know prior to the article cited in the aforementioned post. 

PSP uses Python as its scripting language. Coming from the Delphi world it took me quite some time to get familiar with Python and must admit I'm not a fan. It's syntax can be quite weird and unintuitive. Python's reliance on indentation for defining blocks of code make it easy to introduce bugs although an editor or IDE helps. Add to this PSP scripting documentation hasn't been updated since 2015. 

All that said each PSP command generates Python code that makes greatly simplifies building scripts. The lunar sharpening script uses four main parameters for sharpening an image. In earlier versions of the script I would go into the code and change these values to optimize the aesthetic sharpness. The downside to this is the need to edit and save the code between each run. 

It turns out PSP's scripting API does offer a simple 'GetNumber' dialog to change or enter parameters that can be passed on to variables. The values are also stored in a Python list that is saved to a parameters.txt file.  

This is a big improvement in efficiency although each parameter does require its own dialog; still a bit kludgy. A nicer option would be a customizable dialog that would allow the setting of multiple parameters. 

Tuesday, February 11, 2025

Lunar Images (02/07/2025)

With moon near zenith a good evening for a little lunar imaging. Format 800x600 raw16 with Celestron 8/SCT+ASI178MC at prime focus. Stack averaging from 3000 frames. Wavelet sharpening with script written by author.  Post processing with Paintshop Pro. As an aside wavelet script was recently upgraded with parameter input dialogs that allow me to vary the brightness and contrast, number of sharpening cycles, wavelet radius, strength and gauss radius. 

Bullialdus

Clavius

Copernicus

Kies.Mercator.Capuanus.Cichus

Lambert, Pytheas

Montes Recti

Plato

Reinhold