Author Topic: How to asinh with PixelMath  (Read 5662 times)

Offline Luc Coiffier

  • Newcomer
  • Posts: 18
    • http://deepskystacker.free.fr
How to asinh with PixelMath
« on: 2007 November 06 13:53:25 »
Hi All,

Well the question is not so simple :wink:

In fact I would like to mimic the behavior of the ASINH function of Iris using PixelMath.
(and no just using ArcSinh(x)*Ln(x+Sqrt(x*x++1)) is not working)

It should be quite simple but I can't seem to find the right formula to do it.
(my results have been really disappointing so far).

Any help will be appreciated,

Thanks,
Luc

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
How to asinh with PixelMath
« Reply #1 on: 2007 November 06 15:29:31 »
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:

Code: [Select]
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
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Luc Coiffier

  • Newcomer
  • Posts: 18
    • http://deepskystacker.free.fr
How to asinh with PixelMath
« Reply #2 on: 2007 November 07 00:08:03 »
Hi Juan,

Perfect answer to lousy question  :)

In fact I completely agree with your <criticize> comment.

Warning to other readers:  :evil: This must not be used to post process any image!  :twisted:

I am just looking for quick and nice ways to quickly preview notoriously dark RAW images and I am using PixInsight's PixelMath as a test bed for various methods.
That's much quicker than coding them in C++ to discard them a few second later.

Thanks,
Luc

Offline David Serrano

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 503
How to asinh with PixelMath
« Reply #3 on: 2007 November 07 01:57:56 »
Next step is making a javascript to try all those methods and store the result of each one on a new image. Then with just a couple of clicks you can get all work done ;).
--
 David Serrano

Offline Luc Coiffier

  • Newcomer
  • Posts: 18
    • http://deepskystacker.free.fr
How to asinh with PixelMath
« Reply #4 on: 2007 November 07 05:29:44 »
Hi David,

Since it will be in DSS Live I think that I will skip the Javascript stuff this time   :wink:

Anyway it's an idea to just group all the quick and dirty processings available in all the other software packages in just one Javascript...

Just a way to say that what was previously presented as being top notch is in fact an after-product of a scripting engine...

Clear skies,
Luc