Skip to content

Conversation

nairb1234
Copy link

No description provided.

@nairb1234
Copy link
Author

Test from Brian

Copy link
Collaborator

@rdgao rdgao left a 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
Copy link
Collaborator

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!

### 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(
Copy link
Collaborator

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)?

### 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(
Copy link
Collaborator

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)?

### 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(
Copy link
Collaborator

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?

### 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(
Copy link
Collaborator

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?

Copy link
Author

@nairb1234 nairb1234 May 21, 2025

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)
Copy link
Collaborator

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?

Copy link
Collaborator

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

# 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??)
Copy link
Collaborator

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)

Copy link
Collaborator

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

Copy link
Collaborator

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
Copy link
Collaborator

@rdgao rdgao left a 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:
Copy link
Collaborator

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants