Skip to content

Commit

Permalink
Docs and log
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Oct 3, 2019
1 parent 9910683 commit 9c62628
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 18 deletions.
56 changes: 38 additions & 18 deletions circus/shared/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,45 +768,65 @@ def load_data(params, data, extension=''):
elif data == 'spatial_whitening':
filename = file_out_suff + '.basis.hdf5'
if os.path.exists(filename):
myfile = h5py.File(filename, 'r', libver='earliest')
spatial = numpy.ascontiguousarray(myfile.get('spatial')[:])
myfile.close()
return spatial
try:
myfile = h5py.File(filename, 'r', libver='earliest')
spatial = numpy.ascontiguousarray(myfile.get('spatial')[:])
myfile.close()
return spatial
except Exception:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
else:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
elif data == 'temporal_whitening':
filename = file_out_suff + '.basis.hdf5'
if os.path.exists(filename):
myfile = h5py.File(filename, 'r', libver='earliest')
temporal = myfile.get('temporal')[:]
myfile.close()
return temporal
try:
myfile = h5py.File(filename, 'r', libver='earliest')
temporal = myfile.get('temporal')[:]
myfile.close()
return temporal
except Exception:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
else:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
elif data == 'basis':
filename = file_out_suff + '.basis.hdf5'
if os.path.exists(filename):
myfile = h5py.File(filename, 'r', libver='earliest')
basis_proj = numpy.ascontiguousarray(myfile.get('proj')[:])
basis_rec = numpy.ascontiguousarray(myfile.get('rec')[:])
myfile.close()
return basis_proj, basis_rec
try:
myfile = h5py.File(filename, 'r', libver='earliest')
basis_proj = numpy.ascontiguousarray(myfile.get('proj')[:])
basis_rec = numpy.ascontiguousarray(myfile.get('rec')[:])
myfile.close()
return basis_proj, basis_rec
except Exception:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
else:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
elif data == 'basis-pos':
filename = file_out_suff + '.basis.hdf5'
if os.path.exists(filename):
myfile = h5py.File(filename, 'r', libver='earliest')
basis_proj = numpy.ascontiguousarray(myfile.get('proj_pos')[:])
basis_rec = numpy.ascontiguousarray(myfile.get('rec_pos')[:])
myfile.close()
return basis_proj, basis_rec
try:
myfile = h5py.File(filename, 'r', libver='earliest')
basis_proj = numpy.ascontiguousarray(myfile.get('proj_pos')[:])
basis_rec = numpy.ascontiguousarray(myfile.get('rec_pos')[:])
myfile.close()
return basis_proj, basis_rec
except Exception:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
sys.exit(0)
else:
if comm.rank == 0:
print_and_log(["The whitening step should be launched first!"], 'error', logger)
Expand Down
4 changes: 4 additions & 0 deletions docs_sphinx/introduction/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ Release 0.8.4
* comments can now be added in the trigger/dead times files
* 4096 channels can now run on a single machine, with low memory consumption
* basic support for 3d probes, without any visualization
* more robust to saturating channels with nan_to_num
* cc_merge set to 1 automatically if templates on few channels are detected
* fix a bug if only one artefact type is given
* fix a bug if only 2 spikes are found on a single electrode


=============
Release 0.8.3
Expand Down

0 comments on commit 9c62628

Please sign in to comment.