Skip to content

Commit

Permalink
BUG-Fix NeuralEnsemble#424: t_start information was lost while transp…
Browse files Browse the repository at this point in the history
…osing lfp (NeuralEnsemble#432)

This is a fix related to issue NeuralEnsemble#424: 
t_start was lost while transposing lfp, because t_start was not set in the redefinition of the new neo.analogSignal. Fixed by transposing the neo.Analogsignal directly. @ojoenlanuca , @rgutzen
  • Loading branch information
ojoenlanuca committed Nov 23, 2021
1 parent b637b2c commit 8fd05f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions elephant/current_source_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,8 @@ def estimate_csd(lfp, coordinates=None, method=None,
raise ValueError("The order of {} filter must be \
specified".format(kwargs['f_type']))

lfp = neo.AnalogSignal(np.asarray(lfp).T, units=lfp.units,
sampling_rate=lfp.sampling_rate)
csd_method = getattr(icsd, method) # fetch class from icsd.py file
csd_estimator = csd_method(lfp=lfp.magnitude * lfp.units,
csd_estimator = csd_method(lfp=lfp.T.magnitude * lfp.units,
coord_electrode=coordinates.flatten(),
**kwargs)
csd_pqarr = csd_estimator.get_csd()
Expand Down

0 comments on commit 8fd05f6

Please sign in to comment.