start - AntonioST/NeuroCarto GitHub Wiki

Get Start

Run.

neurocarto

Then your default web-browser will popup (http://localhost:5006/) with the application.

  • warning: we tested application in Google Chrome.

Commandline options

usage: neurocarto [-h] [-C PATH] [-P NAME] [--selector MODULE:NAME] [--atlas NAME]
                  [--atlas-root PATH] [--config-file FILE] [--view MODULE:NAME]
                  [--server-address URL] [--server-port PORT] [--no-open-browser]
                  [FILE]

positional arguments:
  FILE                  open channelmap file.

options:
  -h, --help            show this help message and exit

Source:
  -C PATH, --chmap-dir PATH
                        channel saving directory

Probe:
  -P NAME, --probe NAME
                        use probe family. default use "npx" (Neuropixels probe family).
  --selector MODULE:NAME
                        use which electrode selection method

Atlas:
  --atlas NAME          atlas mouse brain name
  --atlas-root PATH     atlas mouse brain download path

Bokeh Application:
  --config-file FILE    global config file.
  --view MODULE:NAME    install extra views in right panel
  --server-address URL
  --server-port PORT
  --no-open-browser     do not open browser when server starts

Application View

image

Left panel

fig4a-left

ChannelMap File

Input file

Channelmap files lists under -C PATH.

  • New : Create a new channelmap from supporting probe types.

  • Load : load channelmap file from the Input file .

  • Save: Save current channelmap file.

Save filename

The filename give to the saved channelmap file.

Electrode State

Select/Unselect electrodes that captured by bk-tool-icon-box-select.

Electrode Category

Set electrode category for electrodes captured by bk-tool-icon-box-select.

Log

Application logging messages.

Top Panels

probe-desp Probe[CODE] CURRENT/TOTAL.

CODE : current probe type.

TOTAL : total channel number.

CURRENT : number of electrodes selected as channels.

figure-toolbar

Bokeh provides figure tools, there are:

  • bk-tool-icon-pan (mouse drag): figure view moving.
  • bk-tool-icon-box-select (mouse drag): select electrodes for setting its state and category.
  • bk-tool-icon-wheel-zoom (mouse wheel): figure view zoom
  • bk-tool-icon-wheel-pan (mouse wheel): vertical moving viewport.
  • bk-tool-icon-box-edit: moving background image. (shifted-drag) move/scale image inside the dragged rectangle.
  • bk-tool-icon-reset: reset figure view
  • bk-tool-icon-hover: display electrode information when mouse moves on electrodes.
  • bk-logo-small: bokeh logo. Goto bokeh website on clicking.

Figure Panel

electrodes

custom-chmap

Electrode colors indicate:

  • black : selectable electrodes
  • green: selected electrodes
  • red: un-selectable (disabled) electrodes
  • yellow: highlighted electrodes that related to the electrode captured by bk-tool-icon-box-select.

Background Image

Atlas mouse image. It requires extra package. Please check Atlas Mouse Brain.

Right Panel

fig4a-right

All components have a common layout structures:

+-----------------+-------+-------+-----------+--------+
| visible_switch? | title | help? | controls? | status |
+-----------------+-------+-------+-----------+--------+
| custom contents                                      |
+------------------------------------------------------+

Build your first channelmap

A simple channelmap

  1. Press New and choose a probe type to create/reset an empty channelmap.

    new-probe

  2. Move the probe (shown in electrodes) to the proper place.

  3. Use rectangle-tool in the figure toolbar to select electrodes.

    rect-select-tool

    Selected electrodes will be kept in black and highlighted in yellow, and other electrodes will be faded.

    Other electrodes are also highlighted in yellow, which indicates they will be unable to be selected, according to Neuropixels’ hardware restriction.

    rect-select-electrodes

  4. Click Enable to set the captured electrodes as readout channels.

    enable-electrodes

    The yellow highlighted electrodes, except the captured ones, will disappear. However, they are still selectable and will overwrite the previous ones when they are enabled.

    before: rect-select-electrodes-overwrite after: rect-select-electrodes-after

  5. Repeat picking until text becomes probe-desp at the top of the figure.

  6. Type the new filename for your channelmap in Save filename field.

    save-map

  7. Press Save.

    You will see the messages in Log said files are saved.

    save-log

Saved Files

Once you save a channelmap (use previous example), then you will get files under -C PATH:

  • First_map.imro: channelmap file
  • First_map.blueprint.npy: electrode blueprint matrix
  • First_map.config.json: view configurations of each component, such as the coordinate of atlas mouse image.

Once First_map.imro load, the other files are also loaded to restore states.

A custom channelmap

  1. Press New and choose a probe type to create/reset an empty channelmap.

  2. (optional) Move and adjust the atlas image to proper view according to your experimental goal.

    For example, I want to record signals from the Hippocampus.

    1. Change Slice view to coronal. atlas-slice

    2. Move Slice Plane to 290.

    3. Adjust other setting if needed.

    4. use box-edit at the figure toolbar to move the atlas image to the proper position that the probe passes through the Hippocampus.

      box-edit-tool-hinted

  3. Move the probe (shown in electrodes) to the proper place.

    atlas-image-probe

  4. Use rectangle-tool bk-tool-icon-box-select in the figure toolbar to select electrodes in a particular area, then press one of the buttons in Electrode Category.

    policy-full-density

    In this step, rather than directly selecting electrodes as readout channels, we set category on captured electrodes. By this category setting, we can build a blueprint for all electrodes, and the application will generate a channelmap follow the given blueprint.

    There are recommended steps for building a blueprint.

    1. Set electrodes outside the brain with Excluded category, so forbidden electrodes are never selected.

      select electrodes-outside set excluded

    2. Set electrodes around the regions of interest (Hippocampus structure here) with Set or Full Density category.

      roi

    3. Set the other electrodes with a category.

    4. A valid channelmap will be updated automatically auto.

  5. Check text becomes probe-desp at the top of the figure.

    custom-chmap

    If not, it means the current blueprint isn’t compatible with the Neuropixels hardware restriction. Please check tips

  6. Type the new filename for your channelmap in Save filename field.

  7. Press Save.

Tips on building custom channelmap

TODO

⚠️ **GitHub.com Fallback** ⚠️