Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b8a3218
First fork commit
sebastianruizsebas Feb 16, 2026
321afbd
edit readme
sebastianruizsebas Feb 16, 2026
45c945e
Update readme and environment.yml
sebastianruizsebas Feb 16, 2026
8099c63
last commit of the night
sebastianruizsebas Feb 16, 2026
f5028ca
Added comments to code modifications
sebastianruizsebas Feb 16, 2026
e0e4efc
Added workshop for Mar 30, 2026
sebastianruizsebas Mar 30, 2026
c177eb4
final commit
sebastianruizsebas Mar 30, 2026
6daae7d
fix: environment.yml
sebastianruizsebas Apr 5, 2026
8502560
fix: environment.yml neuron with pip
sebastianruizsebas Apr 6, 2026
c5dc057
fix: remove legacy neuron version from environment
sebastianruizsebas Apr 6, 2026
e98d855
Add contributor page
chumboooo Apr 6, 2026
ee95630
Merge branch 'CompNeuroSociety:master' into master
chumboooo Apr 6, 2026
92f1f53
Add contributor instructions and template
chumboooo Apr 6, 2026
ad8435a
Merge branch 'master' of https://github.com/chumboooo/fork-escape-res…
chumboooo Apr 6, 2026
50aebd2
Update readme with contributor instructions
chumboooo Apr 6, 2026
b14e1aa
Remove old contributors file
chumboooo Apr 6, 2026
32ca951
Merge pull request #2 from chumboooo/master
sebastianruizsebas Apr 6, 2026
0b13414
contributor markdown file created
joncineus Apr 6, 2026
d630603
Bianca Blevins Info
nahible Apr 6, 2026
f4a62e6
Add contributor profile for Cooper Wherley
Wherleybird Apr 6, 2026
8066dd6
Merge pull request #3 from joncineus/updated-environment
sebastianruizsebas Apr 6, 2026
bd4f7ab
Merge pull request #4 from Wherleybird/master
sebastianruizsebas Apr 6, 2026
4e36c59
Merge pull request #5 from nahible/master
sebastianruizsebas Apr 6, 2026
4668f09
My contributor folder
gndurta16 Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Python cache
__pycache__/
*.pyc
*.pyo
*.pyd

# VS Code settings
.vscode/

# Generated figures (optional - remove if you want to track them)
figures/*
!figures/.gitkeep

# NEURON compiled mechanisms
channels/x86_64/
*.o
*.lo
*.la
.libs/

# Other common patterns
*.swp
*.swo
*~
.DS_Store
73 changes: 73 additions & 0 deletions SYLLABUS_MAPPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Syllabus Mapping: Workshop Demo Cells to Weekly Goals

---

## Cell 1 -- Imports

Syllabus connection:
- Week 2: Python and conda setup. Install Brian2 via conda, set up environment.
- Week 5: Open science workflow. The environment.yml pins all dependency versions.

---

## Cell 2 -- Neuron Equations (Gunay et al. 2015 kinetics)

Syllabus connection:
- Week 3: Brian2 basics. Differential equations, NeuronGroup, how simulators step through time.
- Week 4: Reading the paper. Parameters come from Table 1, channel kinetics from Gunay et al. (2015). These are Boltzmann steady-state formulations, not classic HH alpha/beta.

---

## Cell 3 -- Neuron Groups (GF, TTMn, PSI, DLMn)

Syllabus connection:
- Week 3: Brian2 basics. NeuronGroup is the basic building block. Initial conditions from steady-state at resting potential.
- Week 4: Paper reading. Figure 2A shows the four-cell architecture: GF, TTMn, PSI, DLMn. Each cell has a defined role in the escape pathway.
- Week 6: Building the model. The single-compartment version here is the starting skeleton. The paper uses multi-compartment neurons (1-3 sections, 51 segments each).

---

## Cell 4 -- Synapses (gap junctions + chemical synapse)

Syllabus connection:
- Week 4: Paper reading. The paper emphasizes that gap junction conductance reduction with age accounts for increased escape latency. g_gap young = 135 uS, old = 34.5 uS.
- Week 6: Building the model. Three connections: two gap junctions (GF->TTMn, GF->PSI) and one chemical synapse (PSI->DLMn with double-exponential kinetics).

---

## Cell 5 -- Stimulus and Simulation

Syllabus connection:
- Week 3: Brian2 simulation mechanics. Network construction, network_operation for stimulus injection, run() method.
- Week 6: First simulation run. Apply stimulus to GF and propagate through the circuit.

---

## Cell 6 -- Latency Measurement

Syllabus connection:
- Week 4: Paper reading. The paper measures latency as time from stimulus to AP peak, plus 0.35 ms NMJ delay. Experimental values: young TTM = 0.93 ms, DLM = 1.44 ms; old TTM = 1.22 ms, DLM = 1.85 ms.
- Week 7 (future): Refine latency measurement. Compare model output to paper values and debug discrepancies.

---

## Cell 7 -- Voltage Traces

Syllabus connection:
- Week 2: Basic plotting with matplotlib.
- Week 6: Validate model behavior visually. Signal propagation order: GF -> TTMn/PSI -> DLMn.

---

## Cells 8-9 -- Parameter Sweep and Latency Plot

Syllabus connection:
- Week 6: Parameter exploration. Sweep g_gap and observe the latency trend.
- Week 8 (future): Reproduce Figure 2C quantitatively. Explore additional parameters (Na/K conductances, Figure 3; anatomic changes, Figure 4).
- Week 9 (future): Compare sweep output to the published latency curves.

---

## Cell 10 -- Summary

Maps all cells to syllabus weeks 1-6 and lists remaining work for weeks 7-11.
Empty file added contributors/Gillian-Durta.md
Empty file.
4 changes: 4 additions & 0 deletions contributors/bianca-blevins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Name: Bianca Blevins
Major: Computer Science
Role: Members
Hobbies: Photography, hiking, and video games
Empty file added contributors/cooper-wherley.md
Empty file.
6 changes: 6 additions & 0 deletions contributors/jonathan-alcineus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Jonathan Alcineus

Name: Jonathan Alcineus
Major: Post-Bacc (Graduated with Computer Science and Statistics major)
Role: Lead Research Intern
Hobbies: Surviving
Empty file.
Empty file added contributors/template.md
Empty file.
9 changes: 9 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: neuron2018
channels:
- conda-forge
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
dependencies:
- matplotlib
- ipykernel
- brian2
22 changes: 15 additions & 7 deletions gfs_param_scan_conductances.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

param1 = 'g_gap'
param2s = ['gnatbar', 'gkbar', 'gleak']
fig1 = plt.figure()
fig1 = plt.figure(figsize=(15, 10)) # Width, height in inches

ii = 1
for p2 in param2s:
Expand All @@ -57,14 +57,17 @@
y_young = g.params[param1]
y_old = old_g_gap

x_young = (double(len(ranges[param2])) - 1.) * (x_young - ranges[param2][0]) / (ranges[param2][-1] - ranges[param2][0])
y_young = (double(len(ranges[param1])) - 1.) * (y_young - ranges[param1][0]) / (ranges[param1][-1] - ranges[param1][0])
y_old = (double(len(ranges[param1])) - 1.) * (y_old - ranges[param1][0]) / (ranges[param1][-1] - ranges[param1][0])

# 2026
# added call to np name space to make sure the division is done in double precision, otherwise it can cause overflow when multiplying by the length of the range
x_young = (np.double(len(ranges[param2])) - 1.) * (x_young - ranges[param2][0]) / (ranges[param2][-1] - ranges[param2][0])
y_young = (np.double(len(ranges[param1])) - 1.) * (y_young - ranges[param1][0]) / (ranges[param1][-1] - ranges[param1][0])
y_old = (np.double(len(ranges[param1])) - 1.) * (y_old - ranges[param1][0]) / (ranges[param1][-1] - ranges[param1][0])


delay_dict = g.param_mesh(param1, ranges[param1], param2, ranges[param2])
delay_dict['DLMn_delays'][delay_dict['DLMn_delays']==-1] = nan
delay_dict['TTMn_delays'][delay_dict['TTMn_delays']==-1] = nan
delay_dict['DLMn_delays'][delay_dict['DLMn_delays']==-1] = np.nan
delay_dict['TTMn_delays'][delay_dict['TTMn_delays']==-1] = np.nan


tcks = np.linspace(np.min(delay_dict['TTMn_delays']), np.max(delay_dict['TTMn_delays']), 20)
Expand Down Expand Up @@ -107,4 +110,9 @@
plt.scatter([x_young], [y_young])
plt.scatter([x_young], [y_old])

ii += 1

ii += 1
# 2026
# Added savefig line to save the figure after running in command line
plt.tight_layout()
plt.savefig('gfs_param_scan_conductances_' + param2 + '.png')
128 changes: 96 additions & 32 deletions readme
Original file line number Diff line number Diff line change
@@ -1,37 +1,101 @@
Model files from the manuscript:
# Fork Escape Response

Augustin, H, Zylbertal, A and Partridge L, "A computational model of the escape latency in the Giant Fiber System of D. melanogaster" (preprint)
The file gfs_param_scan_conductances.py reproduces the protocol used
in Fig. 3 of the article by calling the module gfpn.py.
This repository is a fork of the 2019 eNeuron paper model:

Questions on how to use this model should be directed to
"A Computational Model of the Escape Response Latency in the Giant Fiber System of Drosophila melanogaster"
by Augustin H, Zylbertal A, and Partridge L

The purpose of this fork is to create a shared starting point for the Spring 2026 Pena Lab Project Team to work toward reproducing the paper using Brian2.

We installed `neuron=7.5.0` because it was released around the time of the original paper and was the earliest version that worked on WSL during testing.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

## Model files from the manuscript

Augustin H, Zylbertal A, and Partridge L
"A computational model of the escape latency in the Giant Fiber System of D. melanogaster" (preprint)

The file `gfs_param_scan_conductances.py` reproduces the protocol used in Figure 3 of the article by calling the module `gfpn.py`.

Questions about how to use the original model should be directed to:
asaph.zylbertal at mail.huji.ac.il

Synopsis:

The Giant Fiber System (GFS) is a multi-component neuronal pathway mediating rapid escape
response in adult fruit-fly Drosophila melanogaster, usually in the face of a threatening visual
stimulus. Two branches of the circuit promote the response by stimulating an escape jump
followed by flight initiation. Our recent work demonstrated an age-associated decline in the
speed of signal propagation through the circuit, likely due to the diminishing number of gap
junctions between its components in ageing flies. In this work, we generated a realistic
conductance-based computational model of the GFS that recapitulates our experimental
results and identifies some of the critical anatomical and physiological components governing
the response latency of the circuit. Overall, anatomical properties of the GFS neurons have a
stronger impact on the transmission speed compared to the effect of changes in neuronal
membrane conductance densities. Our model and provides testable predictions for improving
the circuit’s performance in ageing animals by means of experimental interventions.

This example protocol plots the GFS latency as a function of gap junction conductance and:
1) Transient voltage gated sodium conductance
2) Voltage gated potassium conductance
3) Leak conductance

Example use:

Extract the archive, run nrnivmodl in the channels directory
(linux/unix) or mknrndll (mswin or mac os x) (see
## Synopsis

The Giant Fiber System (GFS) is a multi-component neuronal pathway that mediates rapid escape responses in adult fruit fly Drosophila melanogaster, usually in response to a threatening visual stimulus. Two branches of the circuit promote the response by stimulating an escape jump followed by flight initiation.

Prior work showed an age-associated decline in the speed of signal propagation through the circuit, likely due to a diminishing number of gap junctions between circuit components in aging flies. This model reproduces those experimental results and identifies several critical anatomical and physiological components that influence response latency.

Overall, the model suggests that anatomical properties of GFS neurons have a stronger effect on transmission speed than changes in neuronal membrane conductance densities. The model also provides testable predictions for improving circuit performance in aging animals through experimental intervention.

## Example protocol

This protocol plots GFS latency as a function of gap junction conductance and:

1. Transient voltage-gated sodium conductance
2. Voltage-gated potassium conductance
3. Leak conductance

## Example use

Extract the archive, then compile the channels in the `channels` directory.

- On Linux/Unix, run `nrnivmodl`
- On Windows or macOS, run `mknrndll`

For more help with compiling NEURON channel mechanisms:
http://senselab.med.yale.edu/ModelDB/NEURON_DwnldGuide.html
for more help) to compile the channels, and run the file
gfs_param_scan_conductances.py. After a while, it will plot
the latency maps.

After compiling the channels, run:

`gfs_param_scan_conductances.py`

After some time, the script will generate the latency maps.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

## Contributors

Each project member should create their own file in the `contributors` folder instead of editing one shared contributor file. This helps reduce merge conflicts.

### Contributor steps

1. Pull the latest version of the repo
2. Create a new file in the `contributors` folder using the template
3. Name the file with your own name
4. Fill out your information
5. Commit and push your changes

### Contributor file format

Name:
Major:
Role:
Hobbies:

### Suggested file name

`contributors/your-name.md`

Example:
`contributors/sebastian-davalos.md`

### Example workflow

Pull the latest changes:

`git pull origin master`

Create your file in the `contributors` folder and fill it out using the template.

Then run:

`git add contributors/your-name.md`
`git commit -m "Add contributor profile for Your Name"`
`git push origin master`

If your push is rejected, pull the latest changes and try again:

`git pull origin master`
`git push origin master`
Loading