• 熊孩子不小心把弟弟锁进快递柜 消防5分钟破拆 2019-08-20
  • 春运首日 追忆那些年我们坐过的绿皮车 2019-08-20
  • 推动乡村振兴的重要举措(新知新觉) 2019-08-16
  • 中国民生投资集团获第十二届人民企业社会责任奖年度企业奖 2019-08-12
  • 蓝天下的河北—波光潋滟衡水湖 2019-08-10
  • 美对500亿美元中国商品征税 外媒美做法很不体面 2019-08-09
  • 栗战书主持召开十三届全国人大常委会第五次委员长会议 决定十三届全国人大常委会第三次会议6月19日至22日举行 2019-08-09
  • 受“闰月”影响今年端午节比去年“晚”了19天 2019-07-28
  • 海淀创业园双创文化:工艺师传播纸制花艺术与花道 2019-07-28
  • 朝韩将军级会谈时隔11年后在板门店重启 2019-07-23
  • Conférence de presse du Premier ministre chinois 2019-07-09
  • 大观园举办“古琴雅集” 市民感受“古韵端午” 2019-06-30
  • 文脉颂中华——黄河新闻网 2019-06-30
  • 水费欠账竟“穿越”16年?用户质疑:为何没见催缴过? 2019-06-21
  • 买房怎么看风水这个真的实在是太重要了 ——凤凰网房产北京 2019-06-11
  • Python + GestaltReVision logo

    山西十一选五走势图表:Python for Vision Research

    500元 倍投方案 稳赚 www.gvqn.net Welcome to the introductory series to using Python in vision research brought to you by the GestaltReVision group (KU Leuven, Belgium).

    The series consist of seven IPython notebooks meant as a three-day crash course for vision researchers in programming with Python, building experiments with PsychoPy and psychopy_ext, learning the fMRI multi-voxel pattern analysis with PyMVPA, and understading image processing in Python.

    There are more extensive resources for vision scientists on our GestaltReVision wiki.

    Please report any bugs or share ideas on our GitHub repo.

    Available tutorials

    License

    Authors: Maarten Demeyer, Jonas Kubilius
    Year: 2014
    Copyright: Public Domain as in CC0 (except where noted otherwise). Feel free to reuse these materials for your teaching or any other purposes.

    Contents of this notebook

    What you'll need

    Unfortunately, getting Python and all necessary packages is one of the major difficulties for beginners. So please be patient and try to get everything in order because once you get it running, magic can start.

    Tutorial code

    All materials, including this notebook, are available here.

    Python and its packages

    Windows

    The easiest method is to install our own Python distribution that has all necessary packages included.

    Linux

    Linux user? Awesome! Go to the NeuroDebian website, follow the instructions on how to add their repositories, and just sit back and relax while your system installs packages through sudo apt-get install <package_name> and sudo pip install <package_name>, as listed below:

    sudo apt-get install python-pip python-numpy python-scipy python-imaging python-matplotlib
    sudo apt-get install psychopy spyder ipython-notebook
    sudo apt-get install python-pandas python-docutils python-nibabel python-mvpa2 python-h5py
    sudo pip install pillow
    sudo pip install seaborn svgwrite
    sudo pip install psychopy_ext
    

    Mac OS

    Unfortunately, we have a very limited in-house Mac experience. We do offer instructions how to install most packages but you may (or are quite likely to) run into problems and we will probably not know how to help you.

    What? I don't want to mess with my machine!

    If you are having troubles installing Python and its packages, or you just don't want to change anything in your current setup, an excellent alternative is to install the NeuroDebian Virtual Machine. This will create a Linux desktop environment within your operating system, allowing you to follow the much simpler Linux installation procedures instead. Moreover, this Linux environment will be entirely separate from any other Python installation you may have on your machine, so you won't mess anything up by trying. Detailed instructions can be found here.

    Alternatively, if you are only interested in Scietific Python and or PsychoPy (sessions 1-4 and 7), the Standalone PsychoPy installation will largely suffice. You will not have IPython installed, but all examples should be working otherwise.

    For even more options, check our wiki.

    Checking your installation

    Run the following cell (by pressing the ? button above or Ctrl+Enter) to check whether your computer contains all needed packages. This will generate a txt output file which you can e-mail to us, should a problem arise. Press a key when asked to, and close the new IPython Notebook window that will be opened. If the cell keeps running for up to 10 seconds after closing the notebook, just wait; this is normal.

    In [2]:
    import os
    
    os.system('python check_install.py')
    
    try:
        f = open('workshop_req_check.txt','r')
        for line in f.readlines():
            print line,
        f.close()
    except IOError:
        print 'The script could not be executed!'
    
    win32
    ['D:\\Dropbox\\Destymas\\python_for_visres', 'C:\\Miniconda32\\lib\\site-packages\\pymvpa2-2.3.1-py2.7-win32.egg', 'C:\\Miniconda32\\lib\\site-packages\\tabular-0.1-py2.7.egg', 'C:\\Miniconda32\\lib\\site-packages\\psychopy-1.80.06-py2.7.egg', 'C:\\Miniconda32\\python27.zip', 'C:\\Miniconda32\\DLLs', 'C:\\Miniconda32\\lib', 'C:\\Miniconda32\\lib\\plat-win', 'C:\\Miniconda32\\lib\\lib-tk', 'C:\\Miniconda32', 'C:\\Miniconda32\\lib\\site-packages', 'C:\\Miniconda32\\lib\\site-packages\\PIL', 'C:\\Miniconda32\\lib\\site-packages\\win32', 'C:\\Miniconda32\\lib\\site-packages\\win32\\lib', 'C:\\Miniconda32\\lib\\site-packages\\Pythonwin', 'C:\\Miniconda32\\lib\\site-packages\\setuptools-3.6-py2.7.egg', 'C:\\Miniconda32\\lib\\site-packages\\wx-3.0-msw']
    
    ===============================================================================
    MODULE CHECK
    
        Python: base installation
            OK
        Spyder: IDE
            OK
        NumPy: numerical computing
            OK
        SciPy: scientific functions
            OK
        Matplotlib: plot graphs
            OK
        PsychoPy_ext: streamline research
            OK
        Seaborn: statistical data visualization
            OK
        Docutils: documentation utilities
            OK
        Svgwrite: create svg images
            OK
        Pandas: data analysis toolkit
            OK
        NiBabel: access neuroimaging files
            OK
        h5py: store huge amounts of numerical data
            OK
        PyMVPA: fMRI MVPA package
            OK
        Pillow: handle images
            OK
        PsychoPy: build experiments
    C:\Miniconda32\lib\site-packages\psychopy-1.80.06-py2.7.egg\psychopy\preferences\configobj.py:28: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
      import compiler
    
    *************************************************************
    *                                                           *
    * A new window will open. Please follow instructions on it. *
    *                                                           *
    *************************************************************
    
    0.0716 	WARNING 	Creating new monitor...
    0.0718 	WARNING 	Creating new monitor...
            OK
        IPython: interactive notebooks
    
    *************************************************************
    *                                                           *
    * An IPython notebook should open in your browser.          *
    * Please wait for this test to finish. Do not hit Control-C *
    *                                                           *
    *************************************************************
    
            OK
    
    ===============================================================================
    HOW WELL ARE YOU PREPARED?
    
    Session: Introduction to Python
        FULLY PREPARED
    
    Session: Introduction to PsychoPy
        FULLY PREPARED
    
    Session: Transitioning from MATLAB to Python
        FULLY PREPARED
    
    Session: More practice with PsychoPy
        FULLY PREPARED
    
    Session: Streamline research with psychopy_ext
        FULLY PREPARED
    
    Session: Natural image statistics
        FULLY PREPARED
    
    Session: Multi-voxel pattern analysis
        FULLY PREPARED
    
    ===============================================================================
    WHAT TO DO NOW?
    
    1. Check in the list above how well you're prepared for the sessions
       you signed up.
    2. Ideally, you should be fully prepared. Mostly prepared might
       still suffice but not everything may work. Minimally prepared means
       you will not be able to execute significant parts of the code.
    3. If you're underprepared, download and install missing packages,
       and rerun this script. You may find information at
       //gestaltrevision.be/wiki/python/check_install useful.
    4. A file `workshop_req_check.txt` was generated in the same folder
       where this script is. When ready, please **email** it to 
       <[email protected]> so that we can verify that 
       you're ready for the workshop.
    
    ===============================================================================
    
    

    Getting started

    Opening IPython notebooks

    Windows

    1. Open command-line (Start button > Type cmd > Enter)
    2. Navigate to the folder where the IPython notebook is using the cd command e.g. cd C:\Users\u000001\Documents\python_for_visres.

      Tip: if you need to switch partitions, first type partition letter (no cd) and hit enter, e.g., D:

    Mac OS / Linux

    1. Open command line (look for Terminal.app or xterm, or similar)
    2. Navigate to the folder where the IPython notebook is using the cd command, e.g. cd ~/python_for_visres.

    Then:

    1. Type ipython notebook and hit enter. A new tab on your default browser should open with notebook choices listed. Doesn't work properly? Make sure you're not using an outdated or ridiculous browser (like some old Internet Explorer).
    2. Click on the notebook you want to open and play with.

    Editing Python scripts

    Python scripts are just text files. If you want, you can open them using any text editor, even Notepad. However, it is best to use specialized text editors for the task because they help you to code. Although in this tutorial we rely exclusively on IPython to write and run our scripts, in real life people usually use other text editors or integrated developments environments (IDEs) to create and run their scripts. Here is a list of some of our favorites:

  • 熊孩子不小心把弟弟锁进快递柜 消防5分钟破拆 2019-08-20
  • 春运首日 追忆那些年我们坐过的绿皮车 2019-08-20
  • 推动乡村振兴的重要举措(新知新觉) 2019-08-16
  • 中国民生投资集团获第十二届人民企业社会责任奖年度企业奖 2019-08-12
  • 蓝天下的河北—波光潋滟衡水湖 2019-08-10
  • 美对500亿美元中国商品征税 外媒美做法很不体面 2019-08-09
  • 栗战书主持召开十三届全国人大常委会第五次委员长会议 决定十三届全国人大常委会第三次会议6月19日至22日举行 2019-08-09
  • 受“闰月”影响今年端午节比去年“晚”了19天 2019-07-28
  • 海淀创业园双创文化:工艺师传播纸制花艺术与花道 2019-07-28
  • 朝韩将军级会谈时隔11年后在板门店重启 2019-07-23
  • Conférence de presse du Premier ministre chinois 2019-07-09
  • 大观园举办“古琴雅集” 市民感受“古韵端午” 2019-06-30
  • 文脉颂中华——黄河新闻网 2019-06-30
  • 水费欠账竟“穿越”16年?用户质疑:为何没见催缴过? 2019-06-21
  • 买房怎么看风水这个真的实在是太重要了 ——凤凰网房产北京 2019-06-11
  • 新时时彩任选一玩法 上海11选5开奖直播 重庆老时时彩走势图 湖北十一选五开奖直播 香港宝典开奖搅珠现场i 重庆时时走势图软件 腾讯分分彩1个月赢40w 飞艇开奖几点到几点 全民欢乐捕鱼礼包码 快乐十分147组合 新世纪pk10官网 3d近3000走势图 开数下期必开七肖 内蒙古十一选五走势 北京单场胜平负投注 时时开奖结果