You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to access the time (frame) at which a given track starts?
I was writing a function to produce customized animations (with Plots.jl) of the tracks, and realized that I could not find a direct way to access the time at which a given track begins.
(Following the notation in the bird tracking example) When I evaluate traces = trace(result, minlife=minlife), I get the coordinates that make up each track but the information on the frame at which the first point of each track occurs is lost.
The workaround I'm using right now to find the initial time of a track goes as follows:
for trace in traces
t0 = findfirst(map(x -> trace[1] ∈ x, result.coordinates))
end
that is, I compare the first point of the track with the list of all coordinates and see the frame where it first occurs.
But it's quite hackish. And of course it will not work well in the general case (different tracks might go through the exact same coordinates at different times).
Since the already implemented methods to output videos are able to display tracks at the right time, I'm sure there is a better way to do this. I just can't find it.
Thanks for help (and thanks for the package!)
The text was updated successfully, but these errors were encountered:
Hello! There is probably no nice way to do this at the moment, other than to do the time stepping using the low-level interface. The videos can display tracks with correct starting point since they are created frame by frame during the time stepping. The main loop is rather simple, so it should be easy to extend
Thank you for pointing out where the output is produced.
Yes I would say that having the birth time inside Blob would be a nice addition: while I see the convenience of producing the output during timestepping, in general it will be useful to be able to do analysis and plotting independently.
Also, direct access to blob birth might also be needed for some other kind of analysis.
An alternative or complementary solution could also be to somehow provide the birth time along with the traces when trace is called; maybe traces could even deserve a type of their own, with birth time (or even the whole lifespan, as it would be just the UnitRange birth:death) and coordinates?
Is there a way to access the time (frame) at which a given track starts?
I was writing a function to produce customized animations (with Plots.jl) of the tracks, and realized that I could not find a direct way to access the time at which a given track begins.
(Following the notation in the bird tracking example) When I evaluate
traces = trace(result, minlife=minlife)
, I get the coordinates that make up each track but the information on the frame at which the first point of each track occurs is lost.The workaround I'm using right now to find the initial time of a track goes as follows:
that is, I compare the first point of the track with the list of all coordinates and see the frame where it first occurs.
But it's quite hackish. And of course it will not work well in the general case (different tracks might go through the exact same coordinates at different times).
Since the already implemented methods to output videos are able to display tracks at the right time, I'm sure there is a better way to do this. I just can't find it.
Thanks for help (and thanks for the package!)
The text was updated successfully, but these errors were encountered: