Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abort experiment #20

Open
cMadan opened this issue Jul 21, 2017 · 3 comments
Open

Abort experiment #20

cMadan opened this issue Jul 21, 2017 · 3 comments

Comments

@cMadan
Copy link

cMadan commented Jul 21, 2017

Is there any way to abort an experiment? (E.g., pressing certain keys.)

@DominiqueMakowski
Copy link
Member

@cMadan there are currently no generic way to abort an experiment other than alt+tab and console quit. However, this can be easily added within the experiment code whenever a key press is required.

For instance:

....
n.refresh()  # Diplay stimulus on screen
response, RT = n.response()  # Collect the response and its time

# Categorize the response
if response == "SPACE" and stimulus == "green":
    response_type = "HIT"  # Hit
if response != "SPACE" and stimulus == "green":
    response_type = "MISS"  # Miss
if response == "ESCAPE":
    quit()

@cMadan
Copy link
Author

cMadan commented Aug 7, 2017

Thanks! Maybe this can be added to the documentation somewhere?

I don't think alt-tab worked for me, but that may have been related to other video issues (see #21). In my case I had to ssh into my mac machine and kill the python process.

@DominiqueMakowski
Copy link
Member

DominiqueMakowski commented Aug 22, 2017

@cMadan I'm back from holidays 😄, I added an example of how to enable quitting in the stroop tutorial in docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants