-
Notifications
You must be signed in to change notification settings - Fork 7
Draft: Concatenate #38
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #38 +/- ##
===========================================
+ Coverage 55.97% 56.21% +0.23%
===========================================
Files 18 20 +2
Lines 1079 1119 +40
===========================================
+ Hits 604 629 +25
- Misses 475 490 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
When testing the
and I understood these 2 datapoints are missing because because how math works, we need at least 2 previous datapoints to compute an acceleration (ergo acceleration is not available for 2 datapoints). I solved this by just copying the closest velocity and acceleration measurement as shown here: This fulfilled my needs because I only really need the positions ( I have taken the changes in this PR to my fork of trajectorytools and tested it on my data. I made some extra changes:
After implementing these changes and running trajectorytools again, I get a trajectory with the expected number of individuals but still 2 frames missing. Note this is better than what I had before, because before I had 2 missing frames per chunk and now I just have 2 missing, regardless of how many chunks were loaded. For my application I will need either
I am now looking into why there are still 2 frames missing Thank you! PS For completeness, I organize my data using my fork of https://github.com/loopbio/imgstore here https://github.com/shaliulab/imgstore . I have a folder with several .avi files of 5 minutes@12FPS named 000000.avi, 0000001.avi, ... I then run idtrackerai on each sequentially and I end up with new folders called session_000000, session_000001, ... This way what I call |
I guess there are still 2 frames missing because the computation of v and a happens after the concatenation done in |
I have made a MWE to test this PR here with the dataset here (first 3 chunks) https://www.dropbox.com/sh/ww4b3cy3q8o21l4/AADXO-ICsOFAdZThSpan_C91a?dl=0 and this snippet
|
Hi! Thank you for looking at this. I am away for a few days, so I cannot look at it carefully. I created this draft merging your changes from your fork, so we can work there: https://github.com/fjhheras/trajectorytools/pull/43/files I do not see the tests passing. What is the output of pytest tests/ ? Could you change on: to on: so the test run automatically? I could change it as well, but you would need to rebase your branch |
I am not very familiar with the CI workflows, but if I understood you correctly, this is what I had to do now? shaliulab@13064cb Let me know otherwise The output of the tests is the following I think the issues are arising from the fact that I had to change the shape of the trajectories (as mentioned in my second bullet point here #38 (comment)) from individualsxframesx2 to framesxindividualsx2 because this latter shape is what I expected from my previous experience in trajectorytools. But the functions in your tests have hardcoded the shape individualsxframesx2 as the expectation. If individualsxframesx2 is indeed correct, I just need to undo this change of mine. |
You need to keep the line pull_requests, bu without the colon. I think that would do If this does not trigger the automatic tests and linter, you can run them offline:
(Please, skip the part about the CHANGELOG. I will update it and add you as contributor when we are about to merge concatenate) |
You are completely right. The shape must be framesxindividualsx2 and your change fixes it. I did it right the first time and then changed it back to the wrong shape because the artificial trajectories we used for another test were wrong! I would be grateful if you could add an If you do not have time, or you do not feel confident modifying the tests, we can always merge to concatenate branch and I can do the changes there. But I think it should be more or less straightforward (just correcting the shape mismatch!) |
I have fixed the without the flag it seems to work without errors but it does not change anything (I think it's just reporting non seriuous stuff)
|
Yes, I think your flake8 is a bit old. I suggest installing it using conda or pip in your environment (instead of the ubuntu package). For reference, this is my version: 3.9.2 (mccabe: 0.6.1, pycodestyle: 2.7.0, pyflakes: 2.3.1) CPython 3.7.10 on |
No description provided.