Skip to content
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

current progress #6

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

FujishigeTemma
Copy link

@FujishigeTemma FujishigeTemma commented May 26, 2023

  • use os.path.join
  • use devcontainer
  • add a better saving method for APs
  • any other changes are auto format


curr_shelve = shelve.open(full_file_path, flag='n')
# BUG with paradigm_frequency_inhibition at 1Hz, possibly too long sim?
curr_shelve['populations'] = [[(i, timestamps) for i, timestamps in enumerate(p.get_timestamps()) if len(timestamps) > 0] for p in self.populations]
Copy link
Author

@FujishigeTemma FujishigeTemma May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here(L210) is the only change I want you to check:pray:

@danielmk
Copy link
Owner

This generally works but it has the disadvantage that it produces a ragged list of lists (ragged meaning, that the lists have different sizes depending on the number of spikes. The issue with this is that when we convert this to an array the datatype of the array is object rather than a numerical type, which makes it annoying to deal with.

The way I am doing it now is that I have one array that contains the unit that emitted the spike and another array with the spike time.

So I would suggest something along those lines: curr_shelve['populations'] = [[(i, ts) for i, timestamps in enumerate(p.get_timestamps()) for ts in timestamps] for p in self.populations]

But I would have to actually run the code in the lab to know if the details are right.

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