Closed DorianBattivelli closed 1 year ago
Hi @DorianBattivelli -
Yes the path plotter grabs the data from the project_folder/csv/outlier_corrected_movement_location
directory.
Yes - you can remove missing data (0,0) frames using interpolation - choose "Body-part: Some method" for this case. You can either (i) interpolate at import, or (ii) interpolate after import using menu below and selecting the `outlier_corrected_movement_location" directory.
FYI: There are some notebooks etc to create path plots and other stuff outside of GUI now, should you prefer: https://simba-uw-tf-dev.readthedocs.io/en/latest/nb/create_path_plot.html
@sronilsson thank you for the help, unfortunately it did not solve the problem, I obtained exactly the same plot
Odd! Do you still see (0,0) in the data after running the interpolation and in the data you are plotting?
Yes I do
Let me check if I can recreate, did you use the interpolation method in the screengrab avove?
Yes
Ive tested a few projects now, and I can't recreate the missing interpolation... :/ Any chance you can share your project? Just the (i) project_folder/logs/measures/pose_configs/bp_names/project_bp_names.csv
file, (ii) the project_config.ini, and (iii) and the file you are trying to interpolate?
Intresting... the interpolation seems to run fine on my end on your data. Which version of SimBA do you have pip show simba-uw-tf-dev
?
1.59.3
If you upgrade pip install simba-uw-tf-dev --upgrade
to version 1.59.7
is how does it run on your end?
Do I need to re run the outlier correction after the interpolation or can I directly jump to path plots?
You should be able to go straight to path plots.
If you run outlier correction again your interpolated data might be overwritten again with the original data
:/ Still the same error
I mean it seems that the interpolation applied, but the plot still displays artefacts
Which path plot function are you using? Do you have a screen grab of the button / menu you are using?
Ah I think I can see what is going on, there are some negative values in there for some reason, because smoothing has been run without interpolation I suspect. Let me insert a fix for that, but will be an hour or so before I am back at my computer.
Wo let's hope it will fix the problem! Thank you
Il giorno gio 18 mag 2023 alle ore 23:41 Simon Nilsson < @.***> ha scritto:
Ah I think I can see what is going on, there are some negative values in there for some reason, because smoothing has been run without interpolation I suspect. Let me insert a fix for that, but will be an hour or so before I am back at my computer.
— Reply to this email directly, view it on GitHub https://github.com/sgoldenlab/simba/issues/261#issuecomment-1553689122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6JZZFWMH4BDIMF5Z5H223XG2JQPANCNFSM6AAAAAAYGSO7OU . You are receiving this because you were mentioned.Message ID: @.***>
@DorianBattivelli - when you get a chance, try upgrading to version 1.58.9
and let me know how the path plot looks after interpolation!
I only have access to 1.58.8, is that ok?
Ah sorry, my typo - https://pypi.org/project/Simba-UW-tf-dev/1.59.8/ - 1.59.8
unfortunatly, it is still happening..
Yet, it seems that the artefact lines are fewer than before, but maybe there is a solution to clean them better?
If you import the video again, and do interpolation + smoothing, how does it look like then?
Still the same.
For precision, I created a project from scratch, applied interpolation and smoothing, outlier correction, and generate path plot:
So any of the body-part coordinate values in the file point to (0,0) or coordinates below 0?
Yes, to 0, but I did not see negative values.
L column in the "center" body part, that I choose for plotting
Ah so it doesn't seem to have interpolated correctly, just to confirm, this screen grab above, comes from a file you have run interpolation on?
yes
Gosh I don't know at the moment, I can't recreate it - I don't see any 0,0 in HybCD1-B2-D6-Urine.csv after running interpolation.. can you zip up and share the video file for this data as well?
The video is 7gb.. maybe on drive?
Oh, maybe just tell me the resolution of the video?
Resolution is 2020x2034, 5fps, 1 hour long
I don't know how arena looks like, but appears I do see some "artifacts" similar to you... I've got an idea though. Can you send me the project_csv/input_csv
version of the file also? And tell me what the pixels per millimeter is for this video?
Pixel / mm: 1,54947
Last question, have you got a picture of arena?
Is that enough a screenshot or should I propeerly extract a frame from the video?
That's good enough
For precision, mice can only access the diagonal including upper left and lower right quadrants
Is this more what you expect?
Absolutely! What was wrong?
haha yeah.... not 100% sure, have to back-trace my steps, weird interaction of events with negative values produced by smoothing and the outlier corrector freaking out.
I will push an update, but won't be immidiate, want to make sure I'm not missing anything.
@DorianBattivelli - if you update to version 1.59.9
, and run outlier correction again, how does it look?
I run one video, and I reproduced the last graph you sent without the artefact lines :D
I'll check other videos tomorrow, but I think you solved the probleem! Thank you so much, I keep you updated
👍🏻 👍🏻 👍🏻 nice, let me know how it goes !
fyi if you want to speed things up significantly, manually copy your files from the project_folder/csv/outlier_corrected_movement_location
folder to the project_folder/csv/machine_results
folder and use this menu, it allows you to create path plots using all of your computers cores or last frm only.
I tested anoher video and it looks good too :) Thank you again!
Hello,
As shown bellow, I'm having an issue when I generate a path-plot (from H5 multi animal project):
Is there a way to remove the 0, 0 frames with SimBA? In case I'd like to try to troubleshot this on my own, which CSV data file should I use in the Log folder? Outlier location one?
FYI: I did not apply interpolation, but I applied outlier correction (movement = 1, and movement = 2) I applied smoother correction (Savitzky Golay = 400)
Thank you !