Back to the main page.

Bug 3456 - Oblique way of dealing with trial-definition in ft_appendspike

Status NEW
Reported 2018-10-01 13:05:00 +0200
Modified 2018-10-01 13:15:44 +0200
Product: FieldTrip
Component: spike
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 enhancement
Assigned to: Martin Vinck
URL:
Tags:
Depends on:
Blocks:
See also:

Stephen Whitmarsh - 2018-10-01 13:05:35 +0200

ft_appendspike retrieves the trialdefinition from a .trl in a previous field in the cfg of the data. This results easily in unexpected behaviour and makes the function inflexible or at least ugly for other user cases that do not have a simple relationship between data and trl. For example, in my case I have both done spike fitting (using external software) and LFP analysis based on concatinated data. In this case ft_appendspike only finds the single trl of a single datafile (before concatination). More straightforward would be to enforce a trl in the cfg-argument, right? Or in any case return a warning that it will instead retrieve it from the data cfg. Cheers, Stephen


Stephen Whitmarsh - 2018-10-01 13:15:44 +0200

My workaround is to add my own trl to the data: data.cfg.trl = mytrl; Nicer would be to just add it to the cfg. cheers, s