Commit e8a58d13 by Turnhout, M.C. van

those cell are indeed (all) in channel 2

parent d5db289f
 ... ... @@ -51,7 +51,7 @@ for d = 1:numel(dois) pcel = zeros(param.nchan-1, nframe); for c = 1:param.nchan-1 % reshape ncel into p(rocessed)cel: nchan by nframe pcel(c, :) = ncel(dois(d), c:param.nchan-1:end) pcel(c, :) = ncel(dois(d), c:param.nchan-1:end); % identify gaps in cell detection gap = 0; ... ... @@ -83,12 +83,15 @@ for d = 1:numel(dois) % find dead cell events for dc = 1:max(pcel(end, :)) % first instance of dead cel dframe = find(pcel(end, :) == dc, 1, 'first') dframe = find(pcel(end, :) == dc, 1, 'first'); % dead cell centre & radius in first detected frame x = obx((dois(d)-1)*param.maxcells+dc, dframe*numel(param.fluo)) % param.maxcells*size(bf, 1) by nframe*(param.nchan-1) y = oby((dois(d)-1)*param.maxcells+dc, dframe*numel(param.fluo)) r = sqrt(obA((dois(d)-1)*param.maxcells+dc, dframe*numel(param.fluo))/pi) x = obx((dois(d)-1)*param.maxcells+dc, ... dframe*numel(param.fluo)); y = oby((dois(d)-1)*param.maxcells+dc, ... dframe*numel(param.fluo)); r = sqrt(obA((dois(d)-1)*param.maxcells+dc, ... dframe*numel(param.fluo))/pi); % check channels for matching cells checkcells; ... ... @@ -137,19 +140,21 @@ fclose(fid); cellfound = 0; if dframe > 1 % loop over channels for ch = 1:param.nchan-2 ch = ch % loop over detected cells in this channel for q = 1:param.maxcells % get coordinates xc = obx((dois(d)-1)*param.maxcells+q, ch + (dframe-1)*numel(param.fluo)) yc = oby((dois(d)-1)*param.maxcells+q, ch + (dframe-1)*numel(param.fluo)) xc = obx((dois(d)-1)*param.maxcells+q, ... ch + (dframe-1)*numel(param.fluo)); yc = oby((dois(d)-1)*param.maxcells+q, ... ch + (dframe-1)*numel(param.fluo)); if xc > 0 % check distance to dead cell if sqrt( (x-xc)^2 + (y-yc)^2 ) <= r % this is the one! cellfound = ch cellfound = ch; break end else ... ... @@ -164,10 +169,6 @@ fclose(fid); end % % dead cell centre & radius in first detected frame % x = obx(dois(d), dframe*numel(param.fluo)); % y = oby(dois(d), dframe*numel(param.fluo)); % r = sqrt(obA(dois(d), dframe*numel(param.fluo))/pi); % part of DMAlab: https://gitlab.tue.nl/STEM/DMAlab end \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!