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

Need to have my change pulled into nmi-lab/pyNCS #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/pyNCSre/neurosetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def reload(self):
self.load(self.setupfile, offline = self.offline, validate = self.validate)
self.update()

def _pre_process(self, stim):
def _pre_process(self, stim, file=None):
if stim is None:
stim = self.sequencers
evs_in = self.mon.exportAER(stim, isi=True)
Expand Down Expand Up @@ -441,6 +441,12 @@ def stimulate(self, stim=None, **kwargs):
'''
stim_evs = self._pre_process(stim)
#run rec for run and record (consider using run for recording TODO)
try:
if ( kwargs['spikefile'] is not None ):
self.communicator.send_transfer(stim_evs, kwargs['spikefile'])
except:
pass

evs = self.communicator.run_rec(stim_evs, **kwargs)
return self._post_process(evs, self.monitors.channels)

Expand Down
2 changes: 2 additions & 0 deletions src/pyNCSre/population.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ def populate_by_addr_list(self, setup, chipid, neurontype, id_list=[]):
"""
self.__populate_init__(setup, chipid, neurontype)
try:
# print('chipid {}'.format(chipid))
# print('addresses {}'.format(id_list))
self.soma.populate_line(
setup, chipid, grouptype='out', addresses=id_list)
except Exception as e:
Expand Down
2 changes: 2 additions & 0 deletions src/pyNCSre/pyST/spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,9 @@ def raster_plot(self, id_list=None, t_start=None, t_stop=None, display=True, kwa
length = t_stop - t_start
set_axis_limits(subplot, t_start - 0.05 *
length, t_stop + 0.05 * length, min_id - 2, max_id + 2)

pylab.draw()
return subplot

#######################################################################
## Method to convert the SpikeList into several others format ##
Expand Down