Added custom inputs and basic cluster analysis#1
Added custom inputs and basic cluster analysis#1nairb1234 wants to merge 3 commits intomackelab:mainfrom
Conversation
|
Test from Brian |
| @@ -1,40 +0,0 @@ | |||
| # Data Download | |||
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
rdgao
left a comment
There was a problem hiding this comment.
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.
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.
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.