Hi Philippe,
Thank you for your kind words, and welcome to PixInsight Forum.
Building star masks is a complex and critical task, especially for deconvolution of deep sky images. Everybody has problems creating them, including me
1) When do you define the star mask
The key question actually is: When do you apply deconvolution?
Image restoration procedures, either with Deconvolution, ATrousWaveletTransform, or with the new RestorationFilter, must be done when the image is linear. In the case of Deconvolution and RestorationFilter, these tools actually don't work properly with nonlinear images. ATrousWaveletTransform is different, but it is in general more efficient when applied to linear images.
Since a star mask is necessary for deconvolution or wavelets, it obviously must be built before applying these tools. However, building a star mask from a linear image is a very difficult task. For this reason, the StarMask tool includes a histogram transformation (the Shadows, Midtones and Highlights parameters of StarMask) that is applied as the very first step of the mask generation process.
On the other hand, nothing stops you from making a duplicate of the image, stretch it with HistogramTransformation, and then build your star mask on that duplicate. This is also the recommended procedure to implement a star mask generation technique based on wavelets, as the one described in
Daniel's tutorial.
You have also a very good example of star mask generation in
a recent tutorial by Carlos Sonnenstein. In this tutorial, look for the title "Morphological transforms", where you'll find another wavelet-based star mask generation procedure that works extremely well.
- Do you make the deconvolution on the star mask file
- or do you "add" the star mask to the luminance image then you process the result image ?
- or do you process the luminance image then you "add" the star mask image to ghost the wrong stars with halo ?
3) Adding the star mask image to the luminance image : how ? which method / algorithm ?
Never! None of the above. With the Deconvolution tool, enable the Deringing option and select the mask as the
deringing support image. With the other tools, the mask must be activated for the target image in the usual way (Mask > Select Mask), *before* applying them..
I hope this clarifies the topic. Let me know if you need further help - we are here to help you.