When I am running constrained foopsi method on my calcium df/f traces given decay constants, sometimes I get the following error:
code:
[c, s, options] = deconvolveCa(trace,'constrained','ar1', 0.9381, 'optimize_b');
error:
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-8500.
Error in constrained_oasisAR1/update_lam_b (line 189)
active_set(end,1) = active_set(end,1) - lam*g^(active_set(end,4));
Error in constrained_oasisAR1 (line 125)
update_lam_b();
Error in deconvolveCa (line 114)
[c, s, options.b, options.pars, options.lambda] = constrained_oasisAR1(y,...
This is the plot of calcium traces that is being deconvoluted:

Also, if I just run with foopsi method, no error occurs.
When I am running constrained foopsi method on my calcium df/f traces given decay constants, sometimes I get the following error:
code:
[c, s, options] = deconvolveCa(trace,'constrained','ar1', 0.9381, 'optimize_b');error:
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-8500.Error in constrained_oasisAR1/update_lam_b (line 189)active_set(end,1) = active_set(end,1) - lam*g^(active_set(end,4));Error in constrained_oasisAR1 (line 125)update_lam_b();Error in deconvolveCa (line 114)[c, s, options.b, options.pars, options.lambda] = constrained_oasisAR1(y,...This is the plot of calcium traces that is being deconvoluted:
Also, if I just run with foopsi method, no error occurs.