bug: 'linear' stimScale does not work with negative numbers (xarray RuntimeWarning)
Hi, thanks for this package! I am using it in psychopy :) unfortunately the 'linear' stimScale does not behave as expected for negative intensityVals/thresholdVals as it results in a RuntimeWarning. Maybe it's just my code, but "linear" with positive values works great and using "log10" with negative intensity values also gives a good estimate.
Please let me know if you need more information to debug or decide if this is a bug. Thank you!
[/lib/python3.8/site-packages/xarray/core/computation.py:771](/lib/python3.8/site-packages/xarray/core/computation.py:771): RuntimeWarning: invalid value encountered in log result_data = func(*input_data)
Example using 'linear'-scale and negative intensity values:
Hello! Thanks for reporting this issue! Could you perhaps provide a reproducible example? Thank you!
Hi, sorry it took me a while to find the time to create a clean example: https://gist.github.com/dominikue/9a750e9cfffad7f0b572ccfddf85e59d I hope this helps to find the reason for this issue. Maybe it's just my parameters. Please let me know if you have any questions about the example!
br, Dominik