AllenInstitute / AllenInstitute/bmtk

ECP module not recording consistently

Open
#321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
102
Avg merge
1d 5h
Merged PRs (30d)
6

Description

I am recording a biophysical model's ECP using the ECP module

  "reports": {
    "ecp1": {
      "cells": {"pop_name": "PV"},
      "variable_name": "v",
      "module": "extracellular",
      "tmp_dir": "$OUTPUT_DIR",
      "electrode_positions": "$COMPONENTS_DIR/recXelectrodes/linear_electrode.csv",
      "file_name": "ecp_pv1.h5",
      "electrode_channels": "all",
      "contributions_dir": "ecp_pv1"
      },
    "ecp2": {
      "cells": {"pop_name": "PV"},
      "variable_name": "v",
      "module": "extracellular",
      "tmp_dir": "$OUTPUT_DIR",
      "electrode_positions": "$COMPONENTS_DIR/recXelectrodes/linear_electrode.csv",
      "file_name": "ecp_pv2.h5",
      "electrode_channels": "all",
      "contributions_dir": "ecp_pv2"
      },
    "ecp3": {
      "cells": "all",
      "variable_name": "v",
      "module": "extracellular",
      "tmp_dir": "$OUTPUT_DIR",
      "electrode_positions": "$COMPONENTS_DIR/recXelectrodes/linear_electrode.csv",
      "file_name": "ecp_all1.h5",
      "electrode_channels": "all",
      "contributions_dir": "ecp_all1"
      },
    "ecp4": {
      "cells": "all",
      "variable_name": "v",
      "module": "extracellular",
      "tmp_dir": "$OUTPUT_DIR",
      "electrode_positions": "$COMPONENTS_DIR/recXelectrodes/linear_electrode.csv",
      "file_name": "ecp_all2.h5",
      "electrode_channels": "all",
      "contributions_dir": "ecp_all2"
      }
  },

Then when I compare either the two ECPs that recorded only PV cells or the two ECPs that recorded all cells the signal is different. The signal looks largely the same but once closes examined it's clear that it is different. To analysis the output I did

import h5py
import matplotlib.pyplot as plt
%matplotlib inline

path1  = "outputECP1/ecp_pv1.h5"
path2 = "outputECP1/ecp_pv2.h5"

f1 = h5py.File(path1)
f2 = h5py.File(path2)

fig, ax = plt.subplots(2,1,figsize=(15,4.8))
ax[0].plot(f1["ecp/data"][:])
ax[0].title.set_text("PV recording 1")
ax[0].set_xlim(4000,5000)
ax[1].plot(f2["ecp/data"][:])
ax[1].title.set_text("PV recording 2")
ax[1].set_xlim(4000,5000)

plt.show()

The result was

output

You can see that the signals are different when they recorded the same thing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ECP configurations in the issue and the Python h5py comparison of ecp_pv1.h5 and ecp_pv2.h5. Reproduce the two recordings using identical settings, then inspect the ECP recording path and determine why repeated recordings differ; done means the inconsistency is explained and the repeated outputs behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.