I have been working on a Linux preprocessing utility for about two years, primarily for my own use as an educational tool and the essential ingredients, curiosity and fun. Now in its fourth iteration, it is a more functional package with a new name features and interface.
Noted: there are plenty of excellent preprocessing programs out there... and I use PixInsight for many tasks. I am just sharing what I have been doing in astrophotography - DIY software.
Primarily intended for consumer digital camera RAW data, the Asterism user manual explains far more than I should include here.
Asterism is a bash script that performs a number of tasks more clearly arranged in a tabbed user interface - compared to previous versions.
Asterim uses existing programs to do the preprocessing work. Yad (GUI) ImageMagick (Q16) and Panotools are required. Hugin MacroFusion and Enfuse are optional. Note: libtiff should be installed on most Linux distros - if not it is also a requirement.
Asterism's primary function is preprocessing. That is image reduction / calibration deBayer alignment and stacking. Secondary processes are stand-alone image calibration, without alignment and stacking. Master frame creation. Conversion (16 bit monochrome Bayer) - not that useful unless you have special requirements.
There are range of other options, again better explained by viewing the documentation and playing with a small image set to illustrate the various functions.
Not much more to say on the topic. It's a work in progress, but functional, all the same.
Update: I've added a polynomial stacking routine. Essentially a noise rejection filter. Removes satellite trails and hot pixels. Before and after shots. These are low resolution jpg normalized gamma 2.2 to illustrate the effect.
A new version. No major changes. Largely bug fixes, code tidy up and provision for setting ImageMagick in-built resources - threads and memory - on a per-session basis. Removed unnecessary parallel processing routines, letting ImageMagick handle the resources.
EDIT: with reference to the first post, dcraw is also required
EDIT: this process is essentially a large kernel median filter. The larger the kernel the longer the process. Comparing histograms of various kernel sizes, the latest iteration should be a good compromise between noise reduction in the bias and processing time.
This latest version includes hot pixel map correction. Certainly removes hot pixels. Flat illumination correction method reviewed and simplified, hopefully. Not to mention a significant manual rewrite.
The interface has seen change as well as the inclusion of links to documentation and other resources from the Documentation tab.
Please note that hot pixel map is pretty much testing and I am working on improving the process or abandoning it altogether - it is optional. Polynomial stacking takes care of hot pixels and other outliers very well besides.
The manual has been overhauled and should be easier to follow.
The defect map process has been redesigned
Noise reduction may be applied to the final image
The intent has been to find authentic methods of noise reduction which may be applied non-destructively during image preprocessing
I have tested the new processes over and again. The original binarized defect map is still the default. The better (IMHO), mean-shift method, is activated by setting a 'Noise - radius' - '7' is adequate and a 'Noise - amount' - 0.1% at most.
1 or more dark frames may be used to create the defect map; which is really a master dark with considerable noise reduction, leaving the white and black pixels intact. A median dark is a fair substitute.
With mean-shift noise reduction of the final image, combined with polynomial stacking, the statistical handling of data appears authentic and visually non-destructive - pixels retain their shape and there is no evidence of smearing, unless the 'Noise - amount' operator is overdone - 0.1 - 0.25% is adequate.
Update: A number of issues associated with increased complexity in the previous two versions are resolved.
Asterism_0.0.5.3 is tested current and stable. Upgrade to the latest version is recommended, as it includes a number of improvements;
Flat auto correction - this is proving very robust. The default setting of 5 appears to be ideal. The old manual flat illumination correction is retained, for the time being.
Defect map - the process seems to work very well, with no issues observed - use a ‘Noise - radius’ of 7 and a ‘Noise - amount’ of 0.1. It may be necessary to alter settings for different cameras, although, tested on 3 Canon model RAW data and Nikon, I see no variation, except clean flat division.
Linear noise reduction - this is the noise reduction routine used by Defect map, applied to the stacked linear image.
While Asterism is designed to reduce noise in a number of ways, I have found linear noise reduction very effective. The ‘Noise - amount’ value should not be too high - 0.1
Correctly applied, the stacked image processed in StarTools, with Tracking ‘off’, the default noise reduction is adequate.
A ‘Noise - radius’ size, 0 (off) to 30 is available, with sensible radii between 5 - 15; and ‘Noise - amount’ 0.1. Increase the radius for noisy images.
The User Manual requires an update, however, the differences are noted in the version available for download.
I am fairly happy with the latest version, in terms of usability and features. 0.0.5.5 is tested and stable and includes a significant user manual rewrite. This version has a redesigned 'Processing and options' tab with segregated fields which are easier to navigate. Options layout is better arranged and should be more intuitive, in the order; input and output, main process selection, optional processes, followed by system defaults.
New Asterism_beta is tested and stable, run from the Asterism folder in a terminal. Largely cosmetic changes. PMStack may be launched from the Asterism window.
When complete, all processes return the user to the Asterism main window, automatically, to perform other tasks. Asterism may be closed with the 'Quit' button. Otherwise in accordance with the user manual, which needs an update.