Just to clarify what I'm attempting:
I've used Luminosity Masks for landscape (non-astro) images before using the tutorial and background here:
http://goodlight.us/writing/luminositymasks/luminositymasks-1.html . But those are using PhotoShop. Thought I'd have a go at trying them in PI. If I understand the theory of the above links correctly, I think it can be achieved using PixelMath (PM).
The "
Lights Mask" (as defined in the above link) is pretty straight forward to understand, and I think many PI users probably use them a bit already, even if they don't call it the same thing. Simply a mask created from the luminance of the image. I achieved this using (thanks to your help) in PM using CIEL($T).
For the
other lights masks, again assuming I understand the theory, I used CIEL($T)^2 for "light lights", CIEL($T)^4 for "bright lights", and CIEL($T)^8 for "super lights".
The "Dark Mask" I think is just inverse of "Light Mask", so used ~CIEL($T). Then (~CIEL($T))^2 for "Dark Darks" and so on.
The "Midtones Masks" are a bit trickier. The description on the web page for the "Basic Midtones" is to select all, then subtract the "Lights Mask" and the "Dark Mask" from it. To me that sounds like "1-CIEL($T)-(~CIEL($T))", but clearly that just cancels itself out, so I added a small factor to change it to "1-CIEL($T)^x-(~CIEL($T)^x)" and have been playing with x around 1.05 to 1.2. The "Wide Midtones" etc are more straightforward as "1-CIEL($T)^2-(~CIEL($T)^2)" and so on.
If someone has a better idea of the "Basic Midtones" formula, I'd appreciate feedback.