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

Small fixes to Blue Brain Models #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mrkrause
Copy link

This PR makes a few small fixes to the code incorporated from the Blue Brain Project's NMC Portal to ensure that it works immediately and on recent versions of Python. The issues are actually in the upstream code, but it is already modified slightly in this repo, so it seems sensible to fix it here as well.

For every model directory in cells, this PR

  • Updates the Python code in run.py and run_RmpRiTau.py so that they run under Python 3. First, they now build a numpy array for numpy.savetxt, instead of passing it a zip built from two arrays (which is not a list, and thus an array_like in Python 3). Some deprecated plotting code is replaced as well.

  • Adds a python_recordings and hoc_recordings folder, so that the included scripts can run right out of the box (Missing directories  #2). These folders were present in the original BBP code here, but seem to have been lost because git removes empty directories. These now include empty .placeholder files so that the directories get recreated on checkout.

To do for all 25 cells, I used the attached script. This should work on the original BBP models, and I will try to get these changes incorporated there as well.
fixup.sh.txt

Closes #2 and #3

Resolves ValueError when writing out somatic voltages
To ensure that run.py and run_RmpRiTau.py run right out of the box,
python_recordings folders were added where expected. These contain
an empty .placeholder file, so that git will re-create the folder
on checkout.

An alternative solution would be to include .gitignore files that
ignore any model output, but perhaps people want to track code there.
Revised Python code so the same things are done in the same way
the two example files.
Window title now set when creating figure instead.
Create empty (but for a .placeholder file) directories so that hoc
scripts also work out of the box.

See 34d61e9 for details
Copy link

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@AurelienJaquier
Copy link

I don't have the rights to merge this. @wvangeit could you merge this or indicate me whom to ask for merging this?

@wvangeit
Copy link

wvangeit commented Nov 9, 2022

I also don't have the rights. But I approve the changes though.
Maybe @alkino can merge?

@ramcdougal
Copy link

I'll take care of it later today. EBRAINS first

@wvangeit
Copy link

wvangeit commented Nov 9, 2022

Thank you @ramcdougal

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.

Missing directories
4 participants