Hi Luc,
If I understand what you are looking for, it must be the formulation proposed by Lupton et al. (
arXiv:astro-ph/0312483v1). In that case, I'll excerpt some information from the PixelMath tutorial. This is the stretching formula:
where the α parameter applies a linear stretch, Q governs the improvement of bright features, and m is the minimum displayed value (we always have m=0 in PixInsight/PixelMath). For example, with α=0.01 and Q=5, this is the PixelMath expression that implements this transform in PixInsight:
a = 0.01;
Q = 5;
ArcSinh( a*Q*$target )/Q
Useful values for α seem to be in the range from 0.1 to 0.001, and for Q between 1 and 20.
<criticize>
I can't understand why the people seems to love this simple stretching formula so much. This is in my opinion a simplistic solution, conveniently dressed with an academic envelope. There are extremely powerful and refined tools available (in PixInsight and other applications) that I recommend to explore instead of these fast food solutions. For example, a curves tool can do everything this asinh thing does, and much more.
</criticize>
Hope this helps