Is your feature request related to a problem? Please describe.dat.loadBlock can't filter by expDef type, only 'expType'.
Describe the solution you'd like
The signals expType should be the expDef name or 'custom' if the expDef is an anonymous function. This should be added in exp.SignalsExp/cleanup. The 'type' field in the Signals parameters should be changed too (it is set in exp.inferParameters). Whether it is a signals experiment can already be determined by the presence of the expDef field.
Describe alternatives you've considered
Another solution would be to change the filterFun in dat.loadBlock to something like this:
function TF = filterFun(b, expType)
if isfield(b, 'expType')
TF = strcmp(b.expType, expType);
elseif isfield(block, 'expDef')
if strcmp(expType, 'custom')
TF = true;
else
TF = endsWith(b.expDef, expType);
end
end
Additional context
People filter blocks to ensure that all selected blocks have the same fields. The filterFun could also be an optional input arg.
Is your feature request related to a problem? Please describe.
dat.loadBlock
can't filter by expDef type, only 'expType'.Describe the solution you'd like The signals expType should be the expDef name or 'custom' if the expDef is an anonymous function. This should be added in
exp.SignalsExp/cleanup
. The 'type' field in the Signals parameters should be changed too (it is set inexp.inferParameters
). Whether it is a signals experiment can already be determined by the presence of the expDef field.Describe alternatives you've considered Another solution would be to change the filterFun in
dat.loadBlock
to something like this:Additional context People filter blocks to ensure that all selected blocks have the same fields. The filterFun could also be an optional input arg.