Repository navigation
Add GECI sensor parameter fallbacks and update gecis.csv #73
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these changes are not from your changes, but rather differences with master branch. Make sure to merge master into this branch to avoid stuff like this |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. your GECI code shouldn't affect any of this ephys code, so it's a red flag that there are changes here. Fix by |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's annoying to manually maintain the list of imports as opposed to a star import, but its necessary to make the package user-friendly for IDE auto-completion, etc. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,18 @@ | ||
| """Contains Scope and sensors for two-photon microscopy""" | ||
| from cleo.imaging.scope import Scope, target_neurons_in_plane | ||
| from cleo.imaging.sensors import ( | ||
| GECI, | ||
| CalBindingActivationModel, | ||
| CalciumModel, | ||
| DoubExpCalBindingActivation, | ||
| DynamicCalcium, | ||
| ExcitationModel, | ||
| LightExcitation, | ||
| NullBindingActivation, | ||
| NullExcitation, | ||
| PreexistingCalcium, | ||
| Sensor, | ||
| gcamp3, | ||
| gcamp6_rs06, | ||
| gcamp6_rs09, | ||
| gcamp6f, | ||
| gcamp6s, | ||
| geci, | ||
| jgcamp7b, | ||
| jgcamp7c, | ||
| jgcamp7f, | ||
| jgcamp7s, | ||
| ogb_1, | ||
| ) | ||
| from cleo.imaging.sensors import * | ||
|
|
||
| try: | ||
| from cleo.imaging.sensors import ( | ||
| gcamp3, | ||
| gcamp6s, | ||
| gcamp6f, | ||
| gcamp6_rs06, | ||
| gcamp6_rs09, | ||
| jGCaMP7s, | ||
| jGCaMP7f, | ||
| jGCaMP7b, | ||
| jGCaMP7c, | ||
| jRGECO1a, | ||
| ogb_1, | ||
| ) | ||
| except ImportError: | ||
| pass |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sure names are the way they are in literature (e.g., GCaMP3 instead of gcamp3). There is code that automatically turns those into names that are good for Python/Brian, called in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the citation column used for? Why are they all Dana2019? There are at least 3 different papers we could cite here...where the GECI was originally presented, where we get params from, and where we get the excitation spectrum from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the excitation spectrum have a 1 at 488? That would be green, as in the emission, right? We need the wavelengths used to excite the indicator. Which would be infrared for 2p imaging. We should have the data we need with Zhang 2023, Extended Data Fig. 5c, gray line.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are the params for the imaging power-brightness curve? Also in Zhang 2023 Extended Data Fig. 5. Will need to fit for different GECIs. Where is the code Stefano used to do that? I thought he extracted data from those plots and fit those Hill function params. That definitely needs to be in |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name,type,citation,notes,extra_doc,blank,K_d,n_H,dFF_max,sigma_noise_rel,dFF_1AP_rel,ca_amp,t_on,t_off,spectrum | ||
| gcamp3,GECI,Dana2019,,,"",345,2.4,11.8,1.2,0.3,0.05,20,200,"[(488, 1.0)]" | ||
| gcamp6s,GECI,Dana2019,,,"",144,2.9,28.8,1.0,1.0,0.1,50,400,"[(488, 1.0)]" | ||
| gcamp6f,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| gcamp6_rs06,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| gcamp6_rs09,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| jGCaMP7s,GECI,Dana2019,,,"",144,2.9,28.8,1.0,1.0,0.1,50,400,"[(488, 1.0)]" | ||
| jGCaMP7f,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| jGCaMP7b,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| jGCaMP7c,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(488, 1.0)]" | ||
| jRGECO1a,GECI,Dana2019,,,"",375,2.3,28.2,1.1,0.7,0.1,20,150,"[(561, 1.0)]" | ||
| ogb_1,GECI,Dana2019,,,"",205,1.0,14.0,1.0,1.0,0.1,50,400,"[(488, 1.0)]" |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this isn't done, we wouldn't want to merge it into master yet. In any case, this would go somewhere else, probably Also, it's unclear what this is for...if it's to show how the GECI affects runtime, then why is there a sweep of stimulus intensities? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import time | ||
| import numpy as np | ||
|
|
||
| # Simple template for benchmarking full network simulation sweeps | ||
| def benchmark_network_sweep(): | ||
| # 1. Define the sweep range (e.g., light intensity in mW/mm^2 or pulse duration in ms) | ||
| stimulus_intensities = [0.1, 0.5, 1.0, 5.0, 10.0] | ||
|
|
||
| print("=" * 60) | ||
| print(" Starting Cleo Network Simulation Sweep Benchmark") | ||
| print("=" * 60) | ||
|
|
||
| results = {} | ||
|
|
||
| for intensity in stimulus_intensities: | ||
| print(f"\n[+] Running network simulation for Intensity = {intensity}...") | ||
|
|
||
| start_time = time.time() | ||
|
|
||
| # ------------------------------------------------------------- | ||
| # TODO: Insert your Cleo network execution call here | ||
| # Example: | ||
| # sim.run(100 * ms) | ||
| # ------------------------------------------------------------- | ||
|
|
||
| # Temporary placeholder delay to verify script structure | ||
| time.sleep(0.5) | ||
|
|
||
| elapsed_time = time.time() - start_time | ||
| results[intensity] = elapsed_time | ||
|
|
||
| print(f" -> Completed in {elapsed_time:.3f} seconds.") | ||
|
|
||
| print("\n" + "=" * 60) | ||
| print(" SWEEP BENCHMARK SUMMARY") | ||
| print("=" * 60) | ||
| for intensity, exec_time in results.items(): | ||
| print(f" Intensity: {intensity:5.1f} | Execution Time: {exec_time:.3f} s") | ||
|
|
||
| if __name__ == "__main__": | ||
| benchmark_network_sweep() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like other one above, shouldn't be committed