Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
nixgroup.multi_tags.append(nixmt)
if waveforms is not None:
wfdata = list(wf.magnitude for wf in
list(wfgroup for wfgroup in
spiketrain.waveforms))
wfunits = units_to_string(spiketrain.waveforms.units)
wfda = nixblock.create_data_array(
"{}.waveforms".format(nix_name), "neo.waveforms",
data=wfdata
)
wfda.unit = wfunits
wfda.metadata = nixmt.metadata.create_section(
wfda.name, "neo.waveforms.metadata"
)
nixmt.create_feature(wfda, nix.LinkType.Indexed)
# TODO: Move time dimension first for PR #457
# https://github.com/NeuralEnsemble/python-neo/pull/457
wfda.append_set_dimension()
wfda.append_set_dimension()
wftime = wfda.append_sampled_dimension(
spiketrain.sampling_period.magnitude.item()
)
wftime.unit = units_to_string(spiketrain.sampling_period.units)
wftime.label = "time"
if spiketrain.left_sweep is not None:
self._write_property(wfda.metadata, "left_sweep",
spiketrain.left_sweep)