Skip to content

bug: 'linear' stimScale does not work with negative numbers (xarray RuntimeWarning) #52

@dominikue

Description

@dominikue

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:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions