[Numpy-discussion] Re: applying function under certain conditions

Christian Meesters meesters at uni-mainz.de
Fri May 20 23:57:46 EDT 2005


Hi

Oh yes, that's an idea. I actually really wanted log, though more for 
historical display reasons than for mathematical reasons. In my 
particular case it hardly makes a difference for the eye whether I use 
arcsinh or log, but in the near future I might want to use it. I will 
keep it in mind. Thanks for pointing this out to me.

Have a nice weekend,
Christian

On 21 May 2005, at 00:36, Russell E. Owen wrote:

> In article <cfc1a2ea4bfa61fa40080853c0875f87 at uni-mainz.de>,
>  Christian Meesters <meesters at uni-mainz.de> wrote:
>
>> Thanks. So, it is as easy as I thought ...
>> Since I do not want to modify the original array in this case (it's
>> only for plotting purposes), I will go for Alexandre's solution here.
>
> One more thing to consider...do you really want log? If you are looking
> for log-like behavior for positive values but graceful handling of 0 
> and
> negative values, consider arcsinh, e.g. arcsinh(scale * (x-offset)).
>
> -- Russell
>
> *Due to the properties I just mentioned, arcsinh is a very useful
> function for stretching astronomical images. Thanks to Robert Lupton 
> for
> pointing this out to me.
>
>
>





More information about the NumPy-Discussion mailing list