Coder Social home page Coder Social logo

sam81 / pychoacoustics Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 10.0 11.2 MB

Software for psychoacoustics experiments

Home Page: http://samcarcagno.altervista.org/pychoacoustics/pychoacoustics.html

License: GNU General Public License v3.0

Makefile 0.36% Shell 0.11% Python 89.83% QMake 0.05% TeX 7.53% Batchfile 0.26% MATLAB 1.65% Inno Setup 0.20%
python sound psychoacoustics psychophysics audio psychology-experiments auditory hearing

pychoacoustics's People

Contributors

sam81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pychoacoustics's Issues

Real time results plot

The response box could have a panel showing the results update after each trial. The plot could be a staircase for adaptive procedures, and a barplot showing percent correct and/or d' for constant procedures.

Test coverage

Tests need to be written for many functions/procedures:

  • paradigms
  • pysdt
  • sndlib

smileys not displaing on OS X

Smileys are one of the feedback options for the response light box. They're not displaying on OS X (where also application icons are not displaying).

Build tags

It may be good to automate the process of adding tags (e.g. beta) to the builds

ImportError: cannot import name 'qrc_resources' from 'pychoacoustics'

Hi,

It appears I cannot run pychoacoustics with the version if I clone from github.

Here's what I did:

  1. Unzip "pychoacoustics-master.zip" as downloaded from Github.
  2. In command prompt, python setup.py install.
  3. In command prompt, python pychoacoustics.pyw.
  4. I get an error as written below:

Traceback (most recent call last):
File "pychoacoustics.pyw", line 38, in
from pychoacoustics import qrc_resources
ImportError: cannot import name 'qrc_resources' from 'pychoacoustics' (C:\Users\20185408\surfdrive\Spyder\pychoacoustics-master\pychoacoustics_init_.py)

I tried to compile the qrc resources myself and did the following steps:

  1. To compile, I use:
    pyrcc5 -o qrc_resources.py resources.qrc
  2. I copied qrc_resources.py to /build/lib/pychoacoustics/
  3. Rerun python setup.py install.
  4. I get the same error.

How can I get this fixed?

Internazionalization

Add support (translations, fromatting of numbers and dates) for languages other than English in the control window.

  • all the functions printing numbers '{0:5.3f}'.format(myFloat) should use self.currLocale.toString()
  • the sndlib and other modules should use translations too

Cannot load prm file in Windows

Hi,

I can't seem to load a prm file again in Windows. Here's the steps to reproduce it.

  1. Unzip "pychoacoustics-0.5.10.zip" as downloaded from the website.
  2. In command prompt, python setup.py install.
  3. In command prompt, python pychoacoustics.pyw.
  4. Click "load prm", and select a previously saved prm file.
  5. I get the error below.

Traceback (most recent call last):
File "C:\Users\20185408\surfdrive\Spyder\pychoacoustics-0.5.10_myV2\pychoacoustics\control_window.py", line 4947, in onClickLoadParametersButton
self.loadParameters(fName)
File "C:\Users\20185408\surfdrive\Spyder\pychoacoustics-0.5.10_myV2\pychoacoustics\control_window.py", line 5187, in loadParameters
tmp['b'+str(blockNumber)]['fileChooserCheckBox'].append(strToBoolean(allLines[foo['b'+str(blockNumber)]['startFileChooser']+i].split(':')[2].strip()))
File "C:\Users\20185408\surfdrive\Spyder\pychoacoustics-0.5.10_myV2\pychoacoustics\utils_general.py", line 68, in strToBoolean
return out
UnboundLocalError: local variable 'out' referenced before assignment

Here's what I have tried:

  1. Uninstall python completely, restart and reinstall it. I still get the same error.
  2. Clone the current version on github - that gives me another issue.
  3. Run Pychoacoustics in Linux in a VM. PRM file can be loaded successfully.

Is this a Windows specific problem? How can I resolve this?

Add Delete All button

Add 'Delete All' button. This may be useful in some cases. But its utility must be weighed with the downside of adding another button which may make the interface less useful. An alternative may be to have a menu entry in the toolbar.

Use of logging module

The logging module is already partly used to log error messages, but its use should be extended, also check errors on Windows with python GUI mode.

Hide all windows

It would be good to have a commandline option to start pychoacoustics with all windows hidden. This would be useful for running simulations in the background. Currently the best alternative is the commandline option to start with minimized windows.

More consistent naming scheme for result files

The block-summary and session-summary result files should be named with suffixes according to this categorization. The "full" files could be renames as "trial-summary" result files.

consistent naming scheme in result files

Several points:

  • the name "condition" should be reserved to the experimental condition labels assigned by the user to the experimental conditions. For example result files should peraphs use "trial type" for differentiating between a "same" and a "different" trial in a same-different experiment. Likewise, in experiment with multiple constant stimuli, the "conditions" within a block should be consistently referred to as sub-conditions (this is already done for some paradigms).
  • use of underscore or camel case should be consistent
  • the nDifferences parameter should be renamed nSubconditions (this works for both number of adaptive tracks, and number of constant differences)

Comprehensive documentation

Documentation is currently incomplete. The pychoacoustics manual needs to cover all functions.

Document

  • Installation (mostly done)
  • Graphical user interface (mostly done)
    • Write PSI paradigm widgets
    • Review UML paradigm widgets
  • Command line user interface (mostly done)
  • Paradigms (a lot to do)
  • Result file (partly done)
  • Default experiments (partly done)
  • Engine (partly done)
  • Writing your own experiments (a lot to do)
  • sndlib
  • pysdt

Taskbar icon for response box with pyqt5

on pyqt5 a QMainWindow without a parent is a primary window and has an entry in the taskbar, but a
QMainWindow with a parent is a secondary window and doesn't have an entry in the task bar (see http://doc.qt.io/qt-5/application-windows.html). The response box, being a child of the control window doesn't have an entry in the task bar and cannot be shown independently of the control window, which is annoying.

what's this and tooltips coverage

Write 'what's this' and tooltips for all widgets. The 'what's this' are currently written for the text fields, choosers etc. Copy them also for the text field labels, chooser labels, etc...

Block performance feedback

Add block performance feedback at the end of each block. Usually it's not a very good idea to give block-level feedback because participants should not know about different experimental conditions. However, block-level feedback be added as an option.

UML random sweetpoint selection

Currently the UML procedure can be used only with n-Down n-Up sweetpoint selection rules. The ability to run the UML procedure with a random sweetpoint selection rule should be added.

Qthread for playing audio

Could experiment on using a separate QThread for playing sounds in trials. Should make sure that this doesn't compromise the synchronization of the sounds with the lights.

Feedback options

Correct/Incorrect and smiley feedback options. Also, add the ability to change color of feedback lights.

Allow setting lambda estimation point dynamically in UML procedure

The lambda estimation point is fixed at a level where performance correct is expected to be at ceiling. The choice of this value may be problematic in some situations (e.g. finding the level of a tone that works well for normal hearing and hearing impaired listeners in a signal detection task may be tricky). To address this issue there should be an option to change the lambda estimation point dynamically.

The proposed change is detailed below:

use the inverse of the chosen psychometric function to estimate the stimulus level at a high percent correct point (e.g 99%) on the psychometric function using the current parameter estimate:

xCeiling = invPsy(0.99-estLambda, estAlpha, estBeta, gamma, estLambda)

and use this stimulus value for the lambda sweetpoint when it exceeds a 'suggested' stimulus value that should work for most listeners:

stimValForLambdaSwtp = max(suggestedVal, xCeiling)

The procedure would use this value for estimating lambda, except if it falls below the estimated stimulus value at the 0.99-estLambda proportion correct. As a final touch one could add an absolute upper stimulus level 'highestStimAllowed' (dictated by equipment limitations or safety concerns) that will be used if the 0.99-estLambda value is very high:

stimValForLambdaSwtp = min(max(suggestedVal, xCeiling), highestStimAllowed)

Use `subprocess`

Replace os.system with subprocess, possibly popen for sending kill signal. This has been partly done but need to check all code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.