AllenInstitute / AllenInstitute/bmtk
Example CSV for Custom Input Waveform
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 335
- Forks
- 102
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 6
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bmtk/simulator/bionet/modules/xstim.py and xstim_waveforms.py, especially the WaveformCustom class, then compare the existing bmtk/examples/bio_components/stimulations/485058595_0000.csv example. Document the custom waveform CSV format and the requested amp and position units, and identify how neuron Cartesian positions can be accessed. Done means the repository contains a usable waveform0.csv example or clear documentation addressing these questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100