BinConverter Draft

Posted by Geoff, Published: 4 years, 10 months ago (Updated: 4 years, 7 months ago)

BinConverter is a Python Graphical User Interface (GUI) that converts the raw data (.bin) recorded from Axona's DacqUSB1 to the Tint format. Although you can perform a conversion from .bin to Tint using the DacqUSB software provided by Axona (this will use whichever threshold was set during the recording), BinConverter was designed so that we could retroactively decide on a threshold based upon statistical analysis of the entirety of the session (standard deviation).

When recording using the DacqUSB you must decide on a threshold before you begin the recording. You are essentially deciding on a threshold based off of the spike data you visualize in the DacqUSB software at that point in time. You do not have the whole picture, nor do you know what is going to happen to this signal during the recording. Therefore, I made BinConverter, as a way so that the user can choose a threshold based off statistical analysis (# of standard deviations from the mean). This provides a more standardized thresholding method instead of choosing an arbitrary threshold value at the beginning of the session.

Requirements:

  1. Python: This code was written using Python 3.7, however the compatibility really only depends on PyQt5, which requires Python 2.6+. This was written in Python 3 so I suggest getting the latest version of Python2. It will make the installation process easier as PyQt5 used to be a pain to download in the older versions (3.4 for example). If you happen to have problems downloading PyQ5t, you will need to search for a wheel (.whl) file for PyQt5 for your version (of Python and OS).

  2. Operating System: BinConverter does not technically have any Operating System (OS) requirements. However you have the ability to sort the newly converted data using Tint (KlustaKwik), and Tint does require Windows3. Some Linux users have been starting to use this, so I have been working out any bugs that maybe be caused by Linux. The .set file is encoded in cp1252, which Python does not default to when reading text files.

Python Dependencies

  1. BinConverter
  2. BatchTINTV3
  3. NumPy
  4. PyQt5
  5. PyQt5-sip
  6. SciPy

Installation

  1. BinConverter allows you to use BatchTINTV34 to sort the newly converted data. For this functionality to work properly you need to first ensure that you have Tint downloaded, and that this version has the command line interface (might need to e-mail Jim from Axona for that).
  2. Once Tint is downloaded, you will also need to ensure that the Tint file-path is added to the Path environmental variable, this will prevent any 'tint' is not recognized as an internal or external command, operable program or batch file. errors raised from the Command Prompt. To add the Tint filepath perform the following:
    1. Navigate to the Environment Variables window (Control Panel -> System -> Advanced System Settings -> Environmental Variables)
    2. Edit the "Path" option in the System Variables list
    3. Add the file-path to tint.exe to this list, an example would be the following:
      C:\Program Files (x86)\Axona\Tint
  3. I have uploaded BinConverter as a PyPI package, therefore you can simply use the pip module to install, for example:
    python -m pip install BinConverter
  4. Now you can launch the GUI using the following command:
    python -m BinConverter
  5. Alternatively the code exists in a GitHub repository5 so you can install using the following command:
    git clone "https://github.com/HussainiLab/BinConverter.git"

References

  1. Axona's Company Website: http://www.axona.com
  2. Python Downloads: https://www.python.org/downloads/
  3. Axona's Compatible Operating Systems: http://axona.com/support/faq#S1
  4. BatchTINTV3 Project: https://geba.technology/project/batchtintv3
  5. BinConverter GitHub Repository: https://github.com/HussainiLab/BinConverter

Project Contents

BinConverter User Guide Draft

Now that you have installed BinConverter (along with any necessary Python modules), we can discuss how to use the BinConverter Graphical User Interface (GUI) to convert any .bin files to the Tint file format.

User Guide

  1. Launch BinConverter: As discussed previously, you can now launch the BinConverter GUI by performing the following command in the Command Prompt / Terminal:
    python -m BinConverter​

    If download properly, the BinConverter GUI's Main Window should appear, an example is shown i…

Read More →

Comments

Post Comment