Dash Data Explorer

An application written in python that uses the dash modules from plotly to create a (relatively) fast, interactive graph of raw binary data (.Net.Mat) collected in Bonsai-rx.

Get the app

  1. Click on this link to the application file. Then hit CONTROL+S and a “Save As” window will pop up (or right mouse click in the window over the text and and select ‘Save As…’). Save the file to your computer (using the default file name ‘Data-Explorer’ with file extension ‘py’). Save the file somewhere easy to access, like your documents folder.

  2. If you are on WindowsOS, the OS often automatically appends ‘txt’ to the end when you Save As. This will prevent the application from running. Use Sublime Text Editor to open the file. In the Sublime text editor, select File>SaveAs and select the Python file type option. Delete the txt file.

Usage

Install Anaconda

  1. Make sure you have installed Anaconda Individual Edition by downloading and executing the appropriate installer for your operating system.

Launch Command Line

Launch a Command Line prompt to run Anaconda programs (slightly different for Mac and PC)

PC:

  1. Launch the Anaconda Navigator

  2. Open the PowerShell Prompt application

MAC:

  1. Open Terminal (comes with Mac computers)

Run the Dash Data Explorer

Running the Dash Data Explorer once Anaconda and the neurolab environment are set up on your computer:

  1. Activate the neurolab anaconda environment (created in step 3: ‘Creating an environment with dash’) by typing the text conda activate neurolab into the PowerShell Prompt command line and then hitting the Enter key.

  2. Navigate the command line to the folder that contains the Data-Explorer.py application file that you downloaded/saved.

  3. Follow the command line syntax below to provide the application with all the necessary information about your file and how you want it plotted in the Data Explorer when it launches.

    filepath TIP

    copy the full filepath to your data from the file browswer so that you can paste it into the command line rather than typing it out.

    • on a Mac right mouse click the filename, then press the option key, then select “Copy as Pathname”

    • on a Windows hold down the Shift key while right-clicking the file name. then select “Copy Full Path”

    command line syntax: python Data-Explorer.py [-h] -filepath FILEPATH -fs FS -n NUMBER_CHANNELS -p NUMBER_SUBPLOTS -c CHANNELS_PER_SUBPLOT [provide additional -c flags for additional subplots >1]

    optional arguments:

    • -h, –help show this help message and exit required arguments:

    • -filepath FILEPATH full path to the file location on your local computer

    • -fs FS sampling rate of the data in file

    • -n NUMBER_CHANNELS number of channels data in file

    • -p NUMBER_SUBPLOTS number of subplots to create

    • -c CHANNELS_PER_SUBPLOT [CHANNELS_PER_SUBPLOT …] list of channels to plot on each subplot (listed in order of appearance)

  4. Open a browser window (Chrome recommended) and go to your local server (127.0.0.1:8050)

    Note that this link will only work if you have already run the Data Explorer application from the terminal

  5. Shut down the application appropriately

    • Mac: hold down the Control key while you press the C key.

    • Windows: hold down the Control key while you press the Pause/Break key.

HELP: Screen Recordings

Sign in to your Wesleyan Gmail account to see the videos shared via Microsoft Stream.
Links to the videos shared via Google Drive are below each header.

Downloading the Data-Explorer application

Google Drive share link

Setting up Anaconda with Python Environment

Google Drive share link

Running the Data-Explorer application

This screen recording of the process includes some troubleshooting as well.

Google Drive share link