Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkLTSAsessions bug if time is found in 2 LTSAs #40

Open
kfrasier opened this issue Sep 18, 2019 · 1 comment
Open

mkLTSAsessions bug if time is found in 2 LTSAs #40

kfrasier opened this issue Sep 18, 2019 · 1 comment
Labels

Comments

@kfrasier
Copy link
Contributor

@asolsonaberga on line ~173 in mkLTSAsessions, this code that catches the case where K has multiple items doesn't seem to work right:

if length(K) > 1
K = find(sTime(k) <= sb(k) & eTime(k) >= eb(k));
end

sTime and eTime are generally shorter than k (lowercase) so I'm getting a crash. Should it be stime(K) and eTime(K) instead? But then I think that doesn't change what K ends up being...

Do you remember what the intended output was?

@kfrasier kfrasier added the bug label Sep 18, 2019
@asolsonaberga
Copy link
Collaborator

Ohh!! I see now what you mean.
So yes the K will give the index to the ltsas that match the current bout (bout index like k). If multiple ltsas fit in this encounter, then K would be bigger than 1. But even if you put this line like

if length(K) > 1
for i: 1:length(K)
K{i} = find(sTime(K{i}) <= sb(k) & eTime(K{i}) >= eb(k));
end
end

But still, I do not understand why we need to keep the multiple ltsas, because in theory the encounter should be correlated to one ltsa, and this problem should not happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants