Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Python for psychology experiments - looking for advice
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ian hussey  
View profile  
 More options Sep 14 2012, 1:13 pm
From: ian hussey <ianhusseysi...@gmail.com>
Date: Fri, 14 Sep 2012 10:13:53 -0700 (PDT)
Local: Fri, Sep 14 2012 1:13 pm
Subject: Python for psychology experiments - looking for advice

Hi everyone,

I'm a psychology PhD student at NUI Maynooth, and I've just started looking
at Python. I have a little VB6 experience, and am working my way through
Learn Python the Hard Way at the moment. I'll ramble for on a bit about
where I'm coming from and if anyone makes it to the end and has any advice,
that'd be great!

I have a pretty specific goal in mind, I'm looking to work my way up to
programming a psychology experiment that presents participants with pairs
of word or picture stimuli and record their key-press response times. We
have a VB6 app that we use for this already (you can download a copy of it
at IRAP 2012 Program update<http://dl.dropbox.com/u/18453750/IRAP%202012%20update%20program.zip> if
you were interested for some reason) but the code is a mess. It needs to be
redone from the ground up and in something that we can a) deploy one
multiple operating systems, and b) distribute as a single executable with
no or minimal dependancies so that other researchers can pick it up and use
it with little setup time. I asked around and was pointed towards
Python. I've looked at packages like PsychoPy to make my job easier, but
they don't give adequate control over randomisation, looping, or data
output. I'm now considering using wxpython or Python Card (I
was initially a little stumped as to how to create a GUI - shows my lack of
knowledge!).

So, my questions are as follows:
1. Am I making any obvious errors in thinking that Python + wxpython are a
relatively easy way to do this, or am I looking to do something with Python
that would be better done with another language or with another set of
tools?
2. One colleague suggested I use a proprietary language called LiveCode,
but others have suggested this would be a bad call as I'd be locked in to
their system (and paying money I didn't have to). Thoughts?

Thanks for reading!

Best,
Ian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Kennedy  
View profile  
 More options Sep 18 2012, 12:26 am
From: Alan Kennedy <a...@alan.kennedy.name>
Date: Tue, 18 Sep 2012 05:26:50 +0100
Local: Tues, Sep 18 2012 12:26 am
Subject: Re: Python for psychology experiments - looking for advice
Hi Ian,

It appears to me that you want to develop something that requires fine
control over user interface and interactivity, perhaps akin to a game?

Python has several libraries devoted to developing games, which would
give you a large headstart on GUI development, keypress and joystick
control, etc, because they are custom designed for such purposes. (As
opposed to starting completely from scratch, as you would have to
with, say, wxpython).

I haven't used it myself, but people speak highly of PyGame, which
seems very well documented, with oodles of tutorials, documentation
and examples.

http://www.pygame.org/

In particular, this site seems to be a thorough tutorial for learning
both python and pygame at the same time, and would be a very good
introduction to the language and writing interactive games in the
language.

http://programarcadegames.com/

Several other sites linked from the "Tutorials" page seem to be
targeted at teaching the language as well as game programming
technique.

http://www.pygame.org/wiki/tutorials

A cursory overview of the documentation shows that there are
mechanisms for packaging developed games into standalone applications
(although this one refers only to windows, but there I'd be very
surprised if there are not multi-platform equivalents).

http://www.pygame.org/wiki/Pygame2exe?parent=CookBook

Alan.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Harry van Haaren  
View profile  
 More options Sep 18 2012, 11:54 am
From: Harry van Haaren <harryhaa...@gmail.com>
Date: Tue, 18 Sep 2012 16:54:22 +0100
Local: Tues, Sep 18 2012 11:54 am
Subject: Re: Python for psychology experiments - looking for advice

Hi Ian,

I have a little experience in this area, and while Python indeed does fit
the bill for cross-platform it does have its own set of drawbacks:

-Time: You mentioned that you're recording response time by key presses: If
you're doing a PhD you'll likely need very accurate information, which you
most likely won't get from Python. There are various timing issues and
inconsistencies in the language (google "Python GIL" or "garbage
collection" for various specifics). Although you probably *can* make it
work, and do lots of tests to prove that your collected data is accurate
and verifyable, perhaps its not the easy route.

There are various domain specific languages set up for this kind of thing,
you mentioned LiveCode : I'm not sure it has the timing critical elements
that you'll find are most likely necessary for your project.

I would advise you to look at languages / enviroments that are designed for
writing psychology experiments:
I'm an open source guy, so will advise starting here :)
http://pebl.sourceforge.net

Perhaps the best "next step" is to get some details on how timing-accurate
your data will need to be, and how you can best collect that data based on
that?

HTH, -Harry

PS: I'm doing low-latency real-time audio programming, which is extremely
timing dependent, and hence I just can't use Python for the audio
processing - its too slow. That said, python is very powerful to use for
writing glue code / code that isn't timing critical : like a menu that
allows you choose which test / experiment to run, etc etc..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »