Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECP module not recording consistently #321

Open
GregGlickert opened this issue Sep 7, 2023 · 0 comments
Open

ECP module not recording consistently #321

GregGlickert opened this issue Sep 7, 2023 · 0 comments

Comments

@GregGlickert
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant