-
Notifications
You must be signed in to change notification settings - Fork 6
Added custom inputs and basic cluster analysis #1
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: main
Are you sure you want to change the base?
Conversation
Test from Brian |
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.
oops my bad
@@ -1,40 +0,0 @@ | |||
# Data Download |
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.
why did this file get deleted? undo undo!
automind/sim/b2_models.py
Outdated
### TO DO: also randomly initialize w to either randint(?)*b or randn*(v-v_rest)*a | ||
|
||
poisson_input_E = b2.PoissonInput( | ||
''' poisson_input_E = b2.PoissonInput( |
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.
what happened here? This func didn't need to be changed right (or is used at all)?
automind/sim/b2_models.py
Outdated
### TO DO: also randomly initialize w to either randint(?)*b or randn*(v-v_rest)*a | ||
|
||
poisson_input_E = b2.PoissonInput( | ||
''' poisson_input_E = b2.PoissonInput( |
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.
what happened here? This func didn't need to be changed right (or is used at all)?
automind/sim/b2_models.py
Outdated
### TO DO: also randomly initialize w to either randint(?)*b or randn*(v-v_rest)*a | ||
|
||
poisson_input_E = b2.PoissonInput( | ||
''' poisson_input_E = b2.PoissonInput( |
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.
what happened here? This func didn't need to be changed right (or is used at all)? The quotes are typos / accidents?
automind/sim/b2_models.py
Outdated
### TO DO: also randomly initialize w to either randint(?)*b or randn*(v-v_rest)*a | ||
|
||
poisson_input_E = b2.PoissonInput( | ||
''' poisson_input_E = b2.PoissonInput( |
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.
what happened here? This func didn't need to be changed right (or is used at all)? The quotes are typos / accidents?
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.
Yes sorry I probably wanted to check if the custom inputs were working and silenced this to confirm, the Poisson input should be kept.
|
||
def _filter_spikes_random(spike_trains, n_to_save): | ||
"""Filter a subset of spike trains randomly for saving.""" | ||
np.random.seed(42) |
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.
I forgot if we talked about this but should this be reproduceably random, i.e., using the model random_seed
?
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.
I guess easiest is just to provide an optional seed with default value=42, otherwise can be provided, e.g., with the simulation random seed
automind/utils/data_utils.py
Outdated
# recorded more than necessary, subselect for saving | ||
spike_dict[sm.name] = b2_interface._deunitize_spiketimes( | ||
_filter_spikes_random(spike_trains, n_to_save) | ||
_filter_spikes_random(spike_trains, n_to_save) # THIS IS WHERE THE NEURONS ARE RANDOMLY DROPPED BEFORE SAVING (AND PLOTTING??) |
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.
so it's not being randomly dropped anymore?
for j in range(pvals.shape[0]): | ||
if pvals[i, j] < alpha_level: | ||
ax.plot(j, i, fmt, ms=ms, alpha=1) | ||
|
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.
so this is not being used anymore because you extracted the sorting function right? Then I think it can be removed
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.
the two notebook files are nice and demonstrate the new capabilities well, but making it more like a demo / pedagogical notebook, with some more descriptions would be good, in the style of the two existing demo notebooks. I think some of the code can also be removed or at least cleaned up?
changed ```adaptive_exp_net_clustered_custom_input``` function description
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.
changes look good, thanks!
so once the remaining comments for the decoding stuff are resolved then it's ready to merge right?
|
||
def DM_simple(all_param_dict, mu = 10**-9, sigma = 2.5*10**-11, buffer_period = 10, stim_time = 5): | ||
""" | ||
Inputs: |
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.
maybe noisy_rectangle
, since the gaussian noise is still added?
|
||
def _filter_spikes_random(spike_trains, n_to_save): | ||
"""Filter a subset of spike trains randomly for saving.""" | ||
np.random.seed(42) |
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.
I guess easiest is just to provide an optional seed with default value=42, otherwise can be provided, e.g., with the simulation random seed
No description provided.