Skip to content

[Bug]: StairHandler minVal and maxVal will be ineffective when set stepSizes to negative #7188

@cubxx

Description

@cubxx

PsychoPy Version

2024.2.5

What OS are your PsychoPy running on?

Linux-based systems

Bug Description

see following

Expected Behaviour

see following

Steps to Reproduce

  from psychopy import data

  handler = data.StairHandler(
      startVal=0,
      minVal=0,
      stepType="lin",
      stepSizes=-1,
  )
  i = 20
  for e in handler:
      handler.addResponse(0)
      print(e)
      i = i - 1
      if i <= 0:
          break

It should not print negative numbers, but 0.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugIssue describes a bug (crash or error) or undefined behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions