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

Example CSV for Custom Input Waveform #207

Open
mjhyman opened this issue Mar 17, 2022 · 0 comments
Open

Example CSV for Custom Input Waveform #207

mjhyman opened this issue Mar 17, 2022 · 0 comments

Comments

@mjhyman
Copy link

mjhyman commented Mar 17, 2022

Hello,

I would like to use a custom biphasic waveform as the input to the extracellular stimulating electrode (xstim module). I am using a simulation_config.json file that contains a field for "Extracellular_Stim"

"inputs": {  
    "Extracellular_Stim": {
      "input_type": "lfp",
      "node_set": "all",
      "module": "xstim",
      "positions_file": "$STIM_DIR\\485058595_0000_position1.csv",
      "mesh_files_dir": "$STIM_DIR",
      "waveform": {
        "shape": "sin",
        "del": 1000.0,
        "amp": 0.500,
        "dur": 2000.0,
        "freq": 8.0
      }
    }
  },

The CSV file "485058595_0000_position1.csv" is a modified version of the original one from the directory: "bmtk/examples/bio_components/stimulations/485058595_0000.csv" on the develop branch. It contains the following:

ip electrode_mesh_file pos_x pos_y pos_z rotation_x rotation_y rotation_z waveform
0 stimxmesh.csv 100.0 100.0 100.0 0. 0. 0. waveform0.csv

I was unable to find mention of the waveform0.csv file elsewhere in the repository nor on the BMTK website. Do you have an example of the waveform0.csv file?

I examined the files "xstim.py" and "xstim_waveforms.py" in the directory "bmtk\bmtk\simulator\bionet\modules." I saw that the file "xstim_waveforms.py" contains a class "WaveformCustom" that reads a waveform csv file, but I'm unable to understand how it parses the waveform csv file.

As an aside, I have a few related questions:

  • What are the units in the "amp" value in the waveform field in the simulation_config.json file?
  • What are the units of "pos_*" in the positions file "485058595_0000_position1.csv"?
  • I would like to create a 3D figure of a population of neurons and the electrode point. Is there a class that contains the position of the neuron(s) in cartesian coordinates?
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