Git Product home page Git Product logo

jonescompneurolab / hnn Goto Github PK

View Code? Open in Web Editor NEW
76.0 15.0 22.0 57.76 MB

The Human Neocortical Neurosolver (HNN) is a software tool that gives researchers/clinicians the ability to develop/test hypotheses on circuit mechanisms underlying EEG/MEG data.

Home Page: http://hnn.brown.edu

License: Other

Python 50.00% Shell 17.41% PowerShell 2.58% Dockerfile 1.03% Ruby 0.01% HTML 0.34% SCSS 28.63%
computational-neuroscience eeg meg simulation-modeling neocortex brain biophysical neuronal-network erp alpha

hnn's Introduction

Human Neocortical Neurosolver (HNN)

About

The Human Neocortical Neurosolver (HNN) is an open-source neural modeling tool designed to help researchers/clinicians interpret human brain imaging data. HNN presents a convenient GUI to an anatomically and biophysically detailed model of human thalamocortical brain circuits, which makes it easier to generate and evaluate hypotheses on the mechanistic origin of signals measured with MEG/EEG or intracranial ECoG. A unique feature of HNN's model is that it accounts for the biophysics generating the primary electric currents underlying such data, so simulation results are directly comparable to source localized data (nano-Ampere-meters); this enables precise tuning of model parameters to match characteristics of recorded signals.

We are integrating the circuit-level modeling with the minimum-norm-estimate (MNE) source localization software, so researchers can compute MEG/EEG source estimates and test hypotheses on the circuit origin of their data in one software package. Our goal is to design HNN to be useful to researchers with no formal computational neural modeling or coding experience.

For more information visit https://hnn.brown.edu . There, we describe the use of HNN in studying the circuit-level origin of some of the most commonly measured MEG/EEG and ECoG signal: event related potentials (ERPs) and low frequency rhythms (alpha/beta/gamma).

Installation

Please follow the links on our installation page to find instructions for your operating system.

Quickstart

Just do:

$ python hnn.py

to start the HNN graphical user interface

Command-line usage

HNN is not designed to be invoked from the command line, but we have started hnn-core, a new Python project that can run simulations with native Python code. Dipole and spiking data are stored in Python objects and some plotting functions have been implemented. Future versions of this code (HNN) will import the hnn-core module for running simulations.

Questions

For questions, comments/feedback, or troubleshooting information please contact us at [email protected], and review our user forum at https://www.neuron.yale.edu/phpBB/viewforum.php?f=46 .

References

To cite the HNN software please use the following references:

eLife 2020;9:e51214 DOI: 10.7554/eLife.51214 and DOI

Build Status

hnn's People

Contributors

blakecaldwell avatar borismarin avatar cjayb avatar dylansdaniels avatar jashlu avatar jasmainak avatar lkasser1 avatar ramcdougal avatar rythorpe avatar salvadord avatar samnemo avatar stephanie-r-jones avatar vintagesucks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hnn's Issues

HNN Installation Issue

I was able to download Download Docker and the HNN repo, but when I run ./hnn_docker.sh -u start in Terminal during the initial installation process, I get an error message saying that:
Error: set_local_display_from_port (L:1613) expects DISPLAY to be set
Error: Script cannot continue
Terminal Error

Fails to load param file with only rythmic inputs

A bug in commit 466606 meant that the following traceback would be printed when trying to load a param file without 3 evoked inputs:

Traceback (most recent call last):
  File "/Users/blake/repos/hnn-new/hnn_qt5.py", line 3348, in selParamFileDialog
    self.baseparamwin.updateDispParam()
  File "/Users/blake/repos/hnn-new/hnn_qt5.py", line 3071, in updateDispParam
    for dlg in self.lsubwin: dlg.setfromdin(din) # update to values from file
  File "/Users/blake/repos/hnn-new/hnn_qt5.py", line 2588, in setfromdin
    self.rebuildOptStepInfo()
  File "/Users/blake/repos/hnn-new/hnn_qt5.py", line 2350, in rebuildOptStepInfo
    self.ltabkeys.pop(tab_index)
IndexError: pop index out of range
Abort trap: 6

Spiking activity fails to display

When running this Param file, "View Simulation Spiking Activity" fails to open a dialog. The error message is below:

(mne) MacBook-Pro:hnn-new blake$ python hnn.py 
Starting simulation (8 cores). . .
making dout: /Users/blake/hnn_out/data/oldControl
Traceback (most recent call last):
  File "visrast.py", line 396, in <module>
    ex = SpikeGUI()
  File "visrast.py", line 276, in __init__
    self.initUI()
  File "visrast.py", line 359, in initUI
    self.initCanvas()
  File "visrast.py", line 345, in initCanvas
    self.m = SpikeCanvas(paramf, self.index, parent = self, width=12, height=10, dpi=getmplDPI())
  File "visrast.py", line 203, in __init__
    self.plot()
  File "visrast.py", line 256, in plot
    if bDrawHist: self.lax.append(drawhist(dhist,self.figure,self.G))
  File "visrast.py", line 122, in drawhist
    ax.plot(np.arange(binsz/2,tstop+binsz/2,binsz),dhist[ty]*fctr,dclr[ty],linestyle='--')
  File "/Users/blake/miniconda3/envs/mne/lib/python3.7/site-packages/matplotlib/__init__.py", line 1867, in inner
    return func(ax, *args, **kwargs)
  File "/Users/blake/miniconda3/envs/mne/lib/python3.7/site-packages/matplotlib/axes/_axes.py", line 1528, in plot
    for line in self._get_lines(*args, **kwargs):
  File "/Users/blake/miniconda3/envs/mne/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 406, in _grab_next_args
    for seg in self._plot_args(this, kwargs):
  File "/Users/blake/miniconda3/envs/mne/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 383, in _plot_args
    x, y = self._xy_from_xy(x, y)
  File "/Users/blake/miniconda3/envs/mne/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 242, in _xy_from_xy
    "have shapes {} and {}".format(x.shape, y.shape))
ValueError: x and y must have same first dimension, but have shapes (247,) and (246,)

View / View simulation dipoles problem

Under Mint18.3:
View / View simulation dipoles
elicits
File "visdipole.py", line 2, in
from PyQt5.QtWidgets import QMainWindow, QAction, qApp, QApplication, QToolTip, QPushButton, QFormLayout
ImportError: No module named PyQt5.QtWidgets

But python3-pyqt5 has been installed, and
ted@fleck ~/Desktop $ python3 -c "from PyQt5 import QtWidgets"
generates no complaints.

starting hnn cannot open display

Hello,

Running HNN on a linux Mint Tessa (Ubuntu Xenial). I can give other specs if you ask.

The script hnn_docker.sh runs as follows:

~/hnn$ ./hnn_docker.sh -u start
Upgrade HNN image requested

Starting HNN container requested

Performing pre-checks before starting HNN
--------------------------------------
Checking OS version... linux
Checking if Docker is installed... ok
Checking if docker-compose is found... ok
Checking if Docker is working... ok
Downloading new HNN image from Docker Hub (may require login)...
Using default tag: latest
latest: Pulling from jonescompneurolab/hnn
Digest: sha256:c296d51043a186fb97bff95b9886f0373b5be68436df717d12835de112486125
Status: Image is up to date for jonescompneurolab/hnn:latest
docker.io/jonescompneurolab/hnn:latest
HNN image already up to date.
Locating HNN source code... /home/maximilien.chaumon/hnn

Starting HNN
--------------------------------------
Checking for running HNN container... found
Starting HNN container... done
Script hnn_docker.sh finished successfully

But the gui doesn't show up, and the hnn log shows the following:

Starting hnn_container ... �[32mdone�[0m
�[1BAttaching to hnn_container
�[36mhnn_container |�[0m Starting HNN GUI...
�[36mhnn_container |�[0m No protocol specified
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :0
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 45:    12 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:1
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :1
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    23 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:1
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Trying to start HNN with DISPLAY=:2
�[36mhnn_container |�[0m qt.qpa.xcb: could not connect to display :2
�[36mhnn_container |�[0m qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
�[36mhnn_container |�[0m This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m HNN failed to start GUI using DISPLAY=:2
�[36mhnn_container |�[0m ***************************************************
�[36mhnn_container |�[0m 
�[36mhnn_container |�[0m Failed to start HNN on any X port
�[36mhnn_container |�[0m /home/hnn_user/start_hnn.sh: line 15:    34 Aborted                 (core dumped) python3 hnn.py
�[36mhnn_container exited with code 1
�[0mdone
Script hnn_docker.sh finished successfully

Spectral timescale is not computed before 50 ms

Spectral data is not computed near zero for edge-effects, but it's not also chopped for edge effects at the end of the simulation. If the scale is manually adjusted to display early data, there is nothing to display.

Optimization fails after step 1

C:\Users\ckohl\hnn>python hnn.py
Loaded data in C:\Users\ckohl\Documents\SourcePlay\adult_r_base.txt
Starting simulation (6 cores). . .
Starting model optimization. . .
Optimization step 1, iteration 1
weighted RMSE = 0.034794, RMSE = 0.036376
...
Optimization step 1, iteration 30
weighted RMSE = 0.042405, RMSE = 0.041158
Optimization step 2, iteration 1
Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2452, in updatesaveparams
for win in self.lsubwin: win.setfromdin(dtest)
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 1832, in setfromdin
self.updateDispRanges()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 1763, in updateDispRanges
initial_value = float(self.initial_opt_info[tab_index][label]['initial'])
KeyError: 't_evdist_1'

add a link to hnn-core

It would be nice if a link to hnn-core can be added on the website saying there is a WIP command-line API that is being developed here: https://hnnsolver.github.io/hnn-core/. So, those with more programming experience can give it a try if they want to try more advanced things.

improve installation process

@samnemo I started trying to play around with hnn but I hit a roadblock.

It seems that the installation process requires one to have sudo rights. This is a no go for many people working in labs since they do not necessarily have sudo rights. Typically, in the python world, we use the anaconda package which is added to the path. Then everything else can be done without sudo.

Are there any libraries that really need sudo? Otherwise, I would recommend, replacing this with non-sudo options. I'm going to attempt an install without sudo, so I can make a pull request for this if you agree.

Also, it would be good to have some developer documentation -- such as a CONTRIBUTING.md (that github recommends) so those wanting to edit the code can understand how to get into it! Happy to help with it

Failed simulation

(hnn) C:\Users\ckohl\hnn>python hnn.py
Starting simulation (6 cores). . .
Starting simulation (6 cores). . .
Terminating simulation. . .
INFO: Failed starting mpiexec, retrying with 3 cores
Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2516, in stopsim
self.parent().stopsim()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 3289, in stopsim
self.runthread.stop() # killed = True # terminate()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 197, in stop
self.killproc()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 240, in killproc
kill_and_check_nrniv_procs()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 136, in kill_and_check_nrniv_procs
print("ERROR: failed to kill nrniv process(es) %s"%pids.join(','))
AttributeError: 'list' object has no attribute 'join'

Scripting multiple simulations

Hi there,

I’m interested in running a reasonably large number of HNN simulations with different parameters (to fine tune some of my model configuration). It would be impracticable to do this by point and click in the GUI.

Is it possible for me to make a Python (or shell) script to run this large number of simulations? If so, can you advise my how to do so?

I’ve looked at some files in the GitHub repo (including in the scripts folder) but couldn’t find anything that I could get working without errors. Nor could I find any documentation regarding scripting. If this information does exist, I apologize for the e-mail. Can you please point me in the correct direction?

Note: I’m working on a Mac, but also have access to a Linux machine.

Thanks,
Tim.

Deleting an evoked input among a series of evoked inputs causes improper ordering/labeling in param file

I originally had 4 evoked proximal inputs and then deleted the 2nd input through the GUI. This caused a problem in how the simulation recognized my specified inputs in the param file. Proximal input 3 was implemented in the simulation but didn't show up properly in the main dipole plot (via a red arrow), and proximal input 4 wasn't implemented at all. See the attached param file for reference.

param_file.zip

Docker installation fails to start: various issues *fixed*

Hello,

I just installed HNN to my mac, and I am running into a following problem when I try to start hnn:

(base) Kaisus-MacBook-Air:hnn kaisul$ ./hnn_docker.sh -u start
Upgrade HNN image requested

Starting HNN container requested

Performing pre-checks before starting HNN
--------------------------------------
Checking OS version... mac
Checking if Docker is installed... ok
Checking if docker-compose is found... ok
Checking if Docker is working... ok
Downloading new HNN image from Docker Hub (may require login)...
Using default tag: latest
latest: Pulling from jonescompneurolab/hnn
Digest: sha256:c296d51043a186fb97bff95b9886f0373b5be68436df717d12835de112486125
Status: Image is up to date for jonescompneurolab/hnn:latest
docker.io/jonescompneurolab/hnn:latest
HNN image already up to date.
Checking if XQuartz is installed... done
Checking for xauth... done
Retrieving current XQuartz authentication keys... done
Locating HNN source code... /Users/kaisul/hnn
Setting up SSH authentication files... cat: ./installer/docker/id_rsa_hnn.pub: No such file or directory
done

Starting HNN
--------------------------------------
Checking for running HNN container... found
Looking up port to connect to HNN container... done
Starting HNN GUI... hnn_user@localhost's password: 
hnn_user@localhost's password: 
hnn_user@localhost's password: 
failed
failed
Please see hnn_docker.log for more details

I don't know what is the hnn_user password that it is asking for? At least it is not my docker ID. What is the "id_rsa_hnn.pub" file that I seem to have missing?

Thanks!

Crash when running opt with parameters removed from opt

@kohl-carmen reported the following crash trying to run parameter optimization when some parameters have been disabled for optimization.

Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2448, in updatesaveparams
for win in self.lsubwin: win.setfromdin(dtest)
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 1831, in setfromdin
self.updateDispRanges()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 1755, in updateDispRanges
initial_value = float(self.initial_opt_info[tab_index][label]['initial'])
KeyError: 'gbar_evprox_1_L2Pyr_ampa'

Windows native install not completing successfully

@ntolley reported an issue with the Windows native install. It appears to be a permissions issue, and only happens when cloning the repository first and then running the script from the directory. Running the script directly from the URL works as expected.

More specifically, the install couldn't compile .mod files. After manually compiling NEURON modules
and installing mingw, running a simulation fails from GUI with "couldn't start mpiexec". Note that nlopt couldn't be installed automatically with conda.

Update installation to allow counting downloads by OS

Right now all OS installs of HNN require a git clone. This conflates user installs with developer workflow. It would be nice if the install was a self-executable file for Windows and a .pkg for Mac. The number of binary downloads would be easy to track. Developer code pulls would still be tracked by git clones and upgrades could be tracked by Docker Hub downloads.

HNN Visualize Spectrogram,Spiking - add return status, ICE Default IO Error

I encountered the following error (ICE default IO error handler doing an exit(), pid = 14630, errno = 32) mentioned here https://stackoverflow.com/questions/39270988/ice-default-io-error-handler-doing-an-exit-pid-errno-32-when-running/42120263
when trying to visualize spectrogram/raster from HNN. I saw the error in the terminal window but the main HNN GUI didn't report a problem. After deleting .ICeAuthority and .Xauthority files I was able to view the spectrograms from HNN. Would be good for HNN to report the error status in the GUI so the user would know status of visualization windows. And/or to deal with the IO error above automatically.

Optimization crashes when input times > data

I think I broke the optimization because I have an input into the network that is set to a time greater than the length of my data (I only entered 80ms of data and had a distal input with an initial timing of 99ms). That's clearly my own fault, but maybe there's a way to not let users be as silly as me?

Loaded data in C:\Users\ckohl\Documents\SourcePlay\adult_r_base_80ms.txt
Starting simulation (6 cores). . .
Starting model optimization. . .
Optimization step 1, iteration 1
weighted RMSE = 0.031590, RMSE = 0.032852
...
Optimization step 1, iteration 30
weighted RMSE = 0.032096, RMSE = 0.033743
Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 208, in run
self.optmodel() # run optimization
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 411, in optmodel
self.runOptStep()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 557, in runOptStep
opt_results = optimize(self.opt_params['ranges'], self.opt_params['num_sims'], algorithm)
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 546, in optimize
opt_results = opt.optimize(opt_params)
File "C:\Users\ckohl\Miniconda3\envs\hnn\lib\site-packages\nlopt\nlopt.py", line 402, in optimize
return _nlopt.opt_optimize(self, *args)
ValueError: bounds 0 fail 74.4327 <= 99.6567 <= 80

Load/view simulation problem

I noticed a few issues with how the GUI now loads param files.

  1. Upon loading a new param file, the theoretical evoked input time distributions do not update accordingly.

  2. When running a new simulation (loading a param file without an associated output data file), the y-axis does not rescale correctly.

  3. The simulation drop-down menu at the bottom does not show that the default param simulation is active. See the screenshot below.

Screen Shot 2019-08-20 at 1 13 49 PM

Crashed loading file

making dout: C:\Users\ckohl\hnn_out\data\default
making dout: C:\Users\ckohl\hnn_out\data\default
making dout: C:\Users\ckohl\hnn_out\data\from_here_10_opt_adjusted
Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 3248, in selParamFileDialog
self.baseparamwin.updateDispParam()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2971, in updateDispParam
for dlg in self.lsubwin: dlg.setfromdin(din) # update to values from file
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2492, in setfromdin
self.updateOptDialog()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2429, in updateOptDialog
self.rebuildOptStepInfo()
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 2170, in rebuildOptStepInfo
self.ltabkeys.pop(tab_index)
IndexError: pop index out of range

add parameter value checking

Add parameter value checking from GUI, before the param files are written, to ensure that all parameters are within valid ranges. Otherwise, there can be problems when the simulation is run (e.g. numerical errors from NEURON, etc.).

Crash after plotting with default file

HNN crashes if I try to plot dipoles/spiking activity on the default parameters immediately after starting GUI.

Traceback (most recent call last):
File "C:\Users\ckohl\hnn\hnn_qt5.py", line 3380, in showRasterPlot
lcmd = [getPyComm(), 'visrast.py',paramf,os.path.join(basedir,'spk.txt')]
File "C:\Users\ckohl\Miniconda3\envs\hnn\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Installation problem with Xauth on Mac

Hi there -- I'm trying to install HNN on a Macbook Pro running Mojave. The latest version of XQuartz is installed and works with another app. (I reinstalled it and still get this problem.) The Docker error message is:

Checking if XQuartz is installed... done
Checking for xauth... done
Retrieving current X11 authentication keys... XQuartz authentication keys need to be updated
Restarting XQuartz... done
Error: still no keys valid keys
Please see hnn_docker.log for more details

I'm attaching hnn_docker.log. I read the other Xauth problem by a Windows user and verified that .Xauthority seems to be rewritten each time XQuartz is started during the install.

Thanks for your help-
Kevin
hnn_docker.log

Installation failed due to Xauth error

hnn_docker.log
Unable to install hnn on windows 10 enterprise, using docker desktop, as there is an error with Xauth.

VcXsrv has downloaded fine. I've seen that a similar problem was listed before but there is no solution - Does anyone know how I can solve this?

Handle exceptions while starting HNN

Exceptions shouldn't prevent HNN from starting when possible.

(base) Blakes-MacBook-Pro:mac blake$ docker-compose up
Starting hnn_container ... done
Attaching to hnn_container
hnn_container | Starting simulation (4 cores). . .
hnn_container | /home/hnn_user/hnn_source_code/simdat.py:94: UserWarning: loadtxt: Empty input file: "/home//hnn_user/hnn_out/data/default/spk.txt"
hnn_container |   ddat['spk'] = np.loadtxt(dfile['spk'])
hnn_container | /home/hnn_user/hnn_source_code/spikefn.py:152: UserWarning: loadtxt: Empty input file: "<_io.BufferedReader name='/home//hnn_user/hnn_out/data/default/spk.txt'>"
hnn_container |   s_all = np.loadtxt(open(fspk, 'rb'))
hnn_container | Traceback (most recent call last):
hnn_container |   File "/home/hnn_user/hnn_source_code/simdat.py", line 236, in __init__
hnn_container |     self.plot()
hnn_container |   File "/home/hnn_user/hnn_source_code/simdat.py", line 709, in plot
hnn_container |     self.plotsimdat()  # creates self.axdipole
hnn_container |   File "/home/hnn_user/hnn_source_code/simdat.py", line 584, in plotsimdat
hnn_container |     xo = self.plotinputhist(xl, dinty)
hnn_container |   File "/home/hnn_user/hnn_source_code/simdat.py", line 264, in plotinputhist
hnn_container |     extinputs = spikefn.ExtInputs(dfile['spk'], dfile['outparam'])
hnn_container |   File "/home/hnn_user/hnn_source_code/spikefn.py", line 76, in __init__
hnn_container |     self.inputs = self.__get_extinput_times(fspk)
hnn_container |   File "/home/hnn_user/hnn_source_code/spikefn.py", line 158, in __get_extinput_times
hnn_container |     if self.gid_pois is not None:  inputs['pois'] = self.unique_times(s_all, self.gid_pois)
hnn_container |   File "/home/hnn_user/hnn_source_code/spikefn.py", line 138, in unique_times
hnn_container |     for arr in lfilttime:
hnn_container | TypeError: 'NoneType' object is not iterable

Spike viewer doesn't load for a resting network simulation

In a simulation with no driving inputs (e.g. no evoked inputs or rhythms inputs), the network goes to rest and the somatic voltages can be viewed as such. However, the spike viewer wouldn't open to display no spiking activity. Perhaps this is because there is also no driving input, and driving input is needed to initiate the spike viewer?

saving figures error

I changed thee save figures open from 0 to 1, in the run -> analysis dialog box and the simulation got stuck. Error" Failed running sim using /home//hnn_user/hnn_out/param/ERPYes25Trials.param. Saved data/figures in: /home//hnn_user/hnn_out/data/ERPYes25Trials

VcXsrv not launching with proper autherization

I'm getting the error:
image

A window quickly pops up indicating an error while executing, but closes almost immediately so I cannot read what the error actually is. I've tried reinstalling and a variety of configs, making sure to select the "disable access control" option as specified. Thus far I have not been able to successfully open the program.

Any help would be greatly appreciated.

[Feature Request] Check for Updates

It would be valuable if HNN could automatically check for updates every X number of days and notify the user via the GUI! That way the user is informed when a new update is made to the software. Thanks!

Docker Desktop on Win 10 fails: Creating HNN container... failed

I have an issue starting and creating HNN container after following every step successfully, towards the end I had this error:

zmkan@DESKTOP-QNINHQE MINGW64 ~/hnn (master)
$ ./hnn_docker.sh -u start
Upgrade HNN image requested

Starting HNN container requested

Performing pre-checks before starting HNN
-----
Checking OS version... windows
Checking if Docker is installed... ok
Checking if docker-compose is found... ok
Checking if Docker is working... ok
Downloading new HNN image from Docker Hub...
Using default tag: latest
latest: Pulling from jonescompneurolab/hnn
Digest: sha256:81618584720895dd0ee0fad8d95fe80862d31b703e03d2268c411e95e0321c96
Status: Image is up to date for jonescompneurolab/hnn:latest
docker.io/jonescompneurolab/hnn:latest
Checking if VcXsrv is running... no
Checking if VcXsrv is installed... done
Starting VcXsrv... done
Checking for xauth.exe... done
Retrieving current X11 authentication keys... done
Locating HNN source code... /c/Users/zmkan/hnn

Starting HNN
------
Checking for running HNN container... not found
Looking for existing containers...not found
Creating HNN container... failed
Please see hnn_docker.log for more details

****************
The Log reports:

 Starting HNN
---------
Checking for running HNN container... not found
Looking for existing containers...
Command: docker.exe ps -a |grep hnn_container
not found
Creating HNN container... 
Command: timeout 60 docker-compose.exe -f /c/Users/zmkan/hnn/installer/windows/docker-compose.yml up --no-start hnn
Creating hnn_container ... 

�[1A�[2K
Creating hnn_container ... �[31merror�[0m
�[1B
ERROR: for hnn_container  Cannot create container for service hnn: Mount denied:
The source path "\\Users\\zmkan:C:\\Users\\zmkan:rw"
too many colons

ERROR: for hnn  Cannot create container for service hnn: Mount denied:
The source path "\\Users\\zmkan:C:\\Users\\zmkan:rw"
too many colons
Encountered errors while bringing up the project.
failed
Killing VcXsrv PID 1579

Add troubleshooting info when python alias links to Microsoft store

In an update released last year, a python alias is put in place that links to the Microsoft store. This foils the Windows native install because the new alias is found earlier in the path environment variable than the version installed by anaconda. Create a troubleshooting entry that tells users how to delete this alias.

Prevent spurious HNN crashes when running in Docker

Some users have noted that when HNN is not being actively used, it will crash and require restarting the docker container. This only happens when running within a docker container and has to do with the X11 connection breaking. Come up with a better way to make this connection reliable.

View menu -> View local network (3D) problem

Under Mint18.3
View menu -> View local network (3D)
elicits
Traceback (most recent call last):
File "visnet.py", line 2, in
import pyqtgraph as pg
ImportError: No module named pyqtgraph

But pyqtgraph has been installed
ted@fleck ~ $ python3 -c "import pyqtgraph"
ted@fleck ~ $

unable to start gui hnn in kali linux

docker-compose run hnn
ERR: could not create /home//hnn_user/hnn_out/data
Trying to start HNN with DISPLAY=192.168.99.1:0
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.99.1:0
Trying to start HNN with DISPLAY=192.168.65.2:0
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.65.2:0
Trying to start HNN with DISPLAY=0:
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=0:
Trying to start HNN with DISPLAY=192.168.99.1:1
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.99.1:1
Trying to start HNN with DISPLAY=192.168.65.2:1
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.65.2:1
Trying to start HNN with DISPLAY=1:
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=1:
Trying to start HNN with DISPLAY=192.168.99.1:2
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.99.1:2
Trying to start HNN with DISPLAY=192.168.65.2:2
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.65.2:2
Trying to start HNN with DISPLAY=2:
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=2:
Trying to start HNN with DISPLAY=192.168.99.1:3
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.99.1:3
Trying to start HNN with DISPLAY=192.168.65.2:3
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.65.2:3
Trying to start HNN with DISPLAY=3:
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=3:
Trying to start HNN with DISPLAY=192.168.99.1:4
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.99.1:4
Trying to start HNN with DISPLAY=192.168.65.2:4
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=192.168.65.2:4
Trying to start HNN with DISPLAY=4:
ERR: could not create /home//hnn_user/hnn_out/data
HNN failed to start GUI using DISPLAY=4:
Failed to start HNN on any X port at host

Crash when running optimization on specific parameter file

When starting the third round of optimization for the tutorial, the "Failed simulation" dialog will pop up after a running the very first trial. It appears to be specific to the parameters that are set.

Error message:

Starting model optimization. . .
Optimization step 1, simulation 1
Simulation exited with return code -11. Stderr from console:
0 nrniv: Vector Vector argument to .add() wrong size

0  near line 0
0  dp_total_L5 = 0.
^
0 Vector[1].add(...)
2 nrniv: Vector Vector argument to .add() wrong size

2  near line 0
2  dp_total_L5 = 0.
^
3 nrniv: Vector Vector argument to .add() wrong size

3  near line 0
3  dp_total_L5 = 0.
^
3 Vector[1].add(...)
6 nrniv: Vector Vector argument to .add() wrong size

6  near line 0
6  dp_total_L5 = 0.
^
6 Vector[1].add(...)
7 nrniv: Vector Vector argument to .add() wrong size

7  near line 0
7  dp_total_L5 = 0.
^
1 nrniv: Vector Vector argument to .add() wrong size

1  near line 0
1  dp_total_L5 = 0.
^
1 Vector[1].add(...)
2 Vector[1].add(...)
4 nrniv: Vector Vector argument to .add() wrong size

4  near line 0
4  dp_total_L5 = 0.
^
4 Vector[1].add(...)
5 nrniv: Vector Vector argument to .add() wrong size

5  near line 0
5  dp_total_L5 = 0.
^
5 Vector[1].add(...)
7 Vector[1].add(...)
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
Traceback (most recent call last):
File "run.py", line 467, in <module>
if ntrial > 1: runtrials(ntrial,p['inc_evinput'])
File "run.py", line 369, in runtrials
runsim() # run the simulation
File "run.py", line 435, in runsim
net.aggregate_currents() # aggregate the currents independently on each proc
File "/Users/blake/repos/hnn-new/network.py", line 387, in aggregate_currents
self.current['L2Pyr_soma'].add(I_soma)
RuntimeError: hoc error
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
[MacBook-Pro:55313] *** Process received signal ***
[MacBook-Pro:55313] Signal: Segmentation fault: 11 (11)
[MacBook-Pro:55313] Signal code:  (0)
[MacBook-Pro:55313] Failing at address: 0x0
[MacBook-Pro:55313] [ 0] 0   libsystem_platform.dylib            0x00007fff6fedb42d _sigtramp + 29
[MacBook-Pro:55313] [ 1] 0   ???                                 0x0000000116f5a798 0x0 + 4680165272
[MacBook-Pro:55313] [ 2] 0   mca_pmix_pmix3x.so                  0x0000000107856ca6 OPAL_MCA_PMIX3X_pmix_ptl_base_recv_handler + 1302
[MacBook-Pro:55313] [ 3] 0   libopen-pal.40.dylib                0x0000000107674c38 opal_libevent2022_event_base_loop + 2040
[MacBook-Pro:55313] [ 4] 0   mca_pmix_pmix3x.so                  0x000000010781c2be progress_engine + 30
[MacBook-Pro:55313] [ 5] 0   libsystem_pthread.dylib             0x00007fff6fee6e65 _pthread_start + 148
[MacBook-Pro:55313] [ 6] 0   libsystem_pthread.dylib             0x00007fff6fee283b thread_start + 15
[MacBook-Pro:55313] *** End of error message ***

Parameter settings:

$ diff -u ~/repos/hnn-new/param/default.param ERPYes3Trials_173ms_opt3.param 
--- /Users/blake/repos/hnn-new/param/default.param	2019-11-26 12:18:38.000000000 -0500
+++ ERPYes3Trials_173ms_opt3.param	2020-01-07 12:28:33.000000000 -0500
@@ -1,9 +1,9 @@
-sim_prefix: default
-expmt_groups: {default}
-tstop: 170
+sim_prefix: ERPYes3Trials_173ms_opt3
+expmt_groups: {ERPYes3Trials_173ms_opt3}
+tstop: 173.325
 dt: 0.025
 celsius: 37.0
-N_trials: 1
+N_trials: 3
 threshold: 0.0
 save_figs: 0
 save_spec_data: 0
@@ -11,7 +11,7 @@
 dipole_scalefctr: 3000
 dipole_smooth_win: 30
 save_vsoma: 0
-prng_seedcore_opt: 0
+prng_seedcore_opt: 1
 prng_seedcore_input_prox: 4
 prng_seedcore_input_dist: 4
 prng_seedcore_extpois: 4
@@ -20,6 +20,7 @@
 prng_seedcore_evdist_1: 4
 prng_seedcore_evprox_2: 4
 prng_seedcore_evdist_2: 0
+spec_cmap: jet
 L2Pyr_soma_L: 22.1
 L2Pyr_soma_diam: 23.4
 L2Pyr_soma_cm: 0.6195
@@ -165,37 +166,37 @@
 input_dist_A_weight_L5Pyr_ampa: 0.0
 input_dist_A_weight_L5Pyr_nmda: 0.0
 input_dist_A_delay_L5: 5.0
-t_evprox_1: 26.61
-sigma_t_evprox_1: 2.47
+t_evprox_1: 18.977317
+sigma_t_evprox_1: 3.682554
 numspikes_evprox_1: 1
-gbar_evprox_1_L2Pyr_ampa: 0.01525
-gbar_evprox_1_L2Pyr_nmda: 0.0
-gbar_evprox_1_L2Basket_ampa: 0.08831
-gbar_evprox_1_L2Basket_nmda: 0.0
-gbar_evprox_1_L5Pyr_ampa: 0.00865
-gbar_evprox_1_L5Pyr_nmda: 0.0
-gbar_evprox_1_L5Basket_ampa: 0.19934
-gbar_evprox_1_L5Basket_nmda: 0.0
-t_evdist_1: 63.53
-sigma_t_evdist_1: 3.85
+gbar_evprox_1_L2Pyr_ampa: 0.033945
+gbar_evprox_1_L2Pyr_nmda: 0.000086
+gbar_evprox_1_L2Basket_ampa: 0.274861
+gbar_evprox_1_L2Basket_nmda: 0.364855
+gbar_evprox_1_L5Pyr_ampa: 0.03423
+gbar_evprox_1_L5Pyr_nmda: 0
+gbar_evprox_1_L5Basket_ampa: 0.624393
+gbar_evprox_1_L5Basket_nmda: 0.375863
+t_evdist_1: 63.220155
+sigma_t_evdist_1: 3.795375
 numspikes_evdist_1: 1
-gbar_evdist_1_L2Pyr_ampa: 0.000007
-gbar_evdist_1_L2Pyr_nmda: 0.004317
-gbar_evdist_1_L2Basket_ampa: 0.006562
-gbar_evdist_1_L2Basket_nmda: 0.019482
-gbar_evdist_1_L5Pyr_ampa: 0.142300
-gbar_evdist_1_L5Pyr_nmda: 0.080074
-t_evprox_2: 137.12
-sigma_t_evprox_2: 8.33
+gbar_evdist_1_L2Pyr_ampa: 0.000022
+gbar_evdist_1_L2Pyr_nmda: 0.043572
+gbar_evdist_1_L2Basket_ampa: 0.0167
+gbar_evdist_1_L2Basket_nmda: 0.205952
+gbar_evdist_1_L5Pyr_ampa: 0.815666
+gbar_evdist_1_L5Pyr_nmda: 0.076704
+t_evprox_2: 120.475139
+sigma_t_evprox_2: 9.996456
 numspikes_evprox_2: 1
-gbar_evprox_2_L2Pyr_ampa: 1.438840
-gbar_evprox_2_L2Pyr_nmda: 0.0
-gbar_evprox_2_L2Basket_ampa: 0.000003
-gbar_evprox_2_L2Basket_nmda: 0.0
-gbar_evprox_2_L5Pyr_ampa: 0.684013
-gbar_evprox_2_L5Pyr_nmda: 0.0
-gbar_evprox_2_L5Basket_ampa: 0.008958
-gbar_evprox_2_L5Basket_nmda: 0.0
+gbar_evprox_2_L2Pyr_ampa: 2.798832
+gbar_evprox_2_L2Pyr_nmda: 0.015651
+gbar_evprox_2_L2Basket_ampa: 0.000005
+gbar_evprox_2_L2Basket_nmda: 0.397462
+gbar_evprox_2_L5Pyr_ampa: 2.449362
+gbar_evprox_2_L5Pyr_nmda: 0.067545
+gbar_evprox_2_L5Basket_ampa: 0.010116
+gbar_evprox_2_L5Basket_nmda: 0.062405
 sync_evinput: 0
 inc_evinput: 0.0
 L2Pyr_Pois_A_weight_ampa: 0.0

Adding some debug statements around the .add() function indicate that vectors indeed have different sizes. The value for size1 is for self.current['L2Pyr_soma'].

L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000
L2_pyramidal: size1=3744, I_soma.size=3743.000000

They should be equal, but the actual size can vary:
default.param

L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000
L2_pyramidal: size1=4586, I_soma.size=4586.000000

Simulations aborted on Mac

Hello,

I just did a fresh install of HNN on a macOS High Sierra.

When I tried to run the Simulating Rhythmic Proximal Inputs: Alpha Only tutorial, the simulation instantly aborts and the terminal gives off the following message:

Starting simulation. . .

mpiexec noticed that the job aborted, but has no info as to the process
that caused that situation.

WARN: could not read simulation outputs: dict_values(['/Users/ashish/hnn/data/default/dpl.txt', '/Users/ashish/hnn/data/default/rawspec.npz', '/Users/ashish/hnn/data/default/spk.txt', '/Users/ashish/hnn/data/default/param.txt'])

Not really informative as the error message doesn't know what exactly caused the simulation to abort. Please let me know if you need any other info to solve this. Thank you!

Spike Viewer Colors

In the spike viewer, the same shades of red and green are used in the input histograms and to show the spiking of the pyramidal cells. This leads to confusion since it looks like the histograms summarise the internal spiking rate rather than the external drive.
Stephanie suggested to change the pyramidal spikes to shades of blue and cyan since we use blue to show pyramidal neurons in the model schematics.
It might also be useful to change the background color from black to white.
Thanks :)

[Feature Request]: Load data of a variable sampling rate

It'd be great to be able to load a data file without having to change the sampling rate of the time series, or at least have a standard set of sampling rates to choose from so that more datasets are compatible while minimizing information loss.

Abort after loading data with new param file

Running HNN on Oscar VNC, I first loaded a param file located in a different directory than $HOME/hnn/param and then loaded a dataset. Immediately HNN aborted and I got the following traceback:

Singularity hnn.simg:/home/hnn_user/hnn_repo> python3 hnn.py hnn.cfg
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rthorpe'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rthorpe'

(process:2683): Gtk-WARNING **: 15:46:47.253: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 15:47:13.959: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 15:48:02.089: GtkDialog mapped without a transient parent. This is discouraged.
Loaded data in  /users/rthorpe/data/rthorpe/n20_mne.txt
WARNING: could not plot data from  /users/rthorpe/data/rthorpe/n20_mne.txt
Traceback (most recent call last):
  File "/home/hnn_user/hnn_repo/hnn_qt5.py", line 2364, in loadDataFileDialog
    if fn[0]: self.loadDataFile(os.path.abspath(fn[0])) # use abspath to make sure have right path separators
  File "/home/hnn_user/hnn_repo/hnn_qt5.py", line 2350, in loadDataFile
    self.m.plot()
  File "/home/hnn_user/hnn_repo/simdat.py", line 632, in plot
    self.plotextdat(recalcErr)
  File "/home/hnn_user/hnn_repo/simdat.py", line 397, in plotextdat
    calcerr(ddat, find_param(dfile['outparam'],'tstop')) # recalculate/save the error?
  File "/home/hnn_user/hnn_repo/paramrw.py", line 485, in find_param
    _, p = read(fparam)
  File "/home/hnn_user/hnn_repo/paramrw.py", line 429, in read
    lines = fio.clean_lines(fparam)
  File "/home/hnn_user/hnn_repo/fileio.py", line 206, in clean_lines
    with open(file) as f_in:
FileNotFoundError: [Errno 2] No such file or directory: '/users/rthorpe/hnn/data/n20_mne_100trials_2019_05_17/param.txt'
Aborted

Optimization crashes with cannot serialize '_io.BufferedReader' object

This bug appeared in the past month, probably a result of a change in a python library. Not related to NERUON upgrade from 7.6 to 7.7 or related to running in a docker container.

Starting model optimization. . .
Traceback (most recent call last):
File "/home/hnn_user/hnn_source_code/hnn_qt5.py", line 214, in run
self.optmodel() # run optimization
File "/home/hnn_user/hnn_source_code/hnn_qt5.py", line 374, in optmodel
simdat.initial_ddat = deepcopy(simdat.ddat)
File "/usr/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.7/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: cannot serialize '_io.BufferedReader' object
/home/hnn_user/start_hnn.sh: line 42: 38 Aborted python3 hnn.py

[Feature Request] Configurable output directory

It would be useful if location of simulation output directory was configurable.
At the moment all output is saved in ~/hnn/... it would be great if this could be set in hnn.cfg file.

This locations is set in 2 places and I'm unsure if one place overrides the other etc.

hnn/fileio.py

Lines 136 to 137 in de20760

# returns the directory for the sim
def __simdir (self): return os.path.join(os.path.expanduser('~'),'hnn','data',self.sim_prefix)

and

hnn/conf.py

Lines 150 to 152 in de20760

if d['homeout']: # user home directory for output
dbase = os.path.join(os.path.expanduser('~'),'hnn') # user home directory
if not safemkdir(dbase): sys.exit(1) # check existence of base hnn output dir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.