Visualization
Along with Plots.jl and StatsPlots.jl for normal plotting of collapsed_data in scatter plot form, MicroTracker comes with handy tools to view the full multi-dimensional nature of microbot trajectories.
For full interactivity, use the included Pluto notebook (see the Pluto docs page). This allows input arguments to the trajectory_analyzer to be rapidly changed with sliders and drop-down menus.
MicroTracker.trajectory_analyzer — Functiontrajectory_analyzer(linked_data, collapsed_data, particle_unique::AbstractString, [framenumber; [size_variable="Major_um"], [annotationkwargs...])Display a comphrehensive dashboard of a single microbot, including instantaneous velocity, a chosen size_variable, and the FFT of the size_variable.
Arguments
linked_data:AbstractDataFrame, time-series linked data, as returned byload_linked_dataorbatch_particle_data_to_linked_data.collapsed_data:AbstractDataFrame, collapsed data with a row per microbot, as returned bycollapse_data.particle_unique:AbstractString. The unique identifier of the microbot to be analyzed.framenumber: (Optional)IntThe frame number to be displayed. If not provided, the last frame is used.size_variable: (Optional)AbstractString, The column name of the size variable to be displayed. Defaults to"Major_um".annotationkwargs: (Optional) Keyword arguments passed toplotannotatedframe_single().
MicroTracker.animate_trajectory_analyzer — Functionanimate_trajectory_analyzer(linked_data, collapsed_data, particle_unique, savepath, [framerange]; animation_speed_multiplier=1, size_variable="Major_um", annotationkwargs...)Export an animation of the trajectory analyzer and save it to savepath.
Arguments
linked_data:AbstractDataFrame, time-series linked data, as returned byload_linked_dataorbatch_particle_data_to_linked_data.collapsed_data:AbstractDataFrame, collapsed data with a row per microbot, as returned bycollapse_data.particle_unique:AbstractString. The unique identifier of the microbot to be analyzed.savepath:AbstractString. The path to save the animation to.framerange: (Optional)UnitRange{Int64}. The range of frames to be displayed. If not provided, the entire trajectory is animated.animation_speed_multiplier: (Optional)Int. The speed of the animation. Defaults to 1.size_variable: (Optional)AbstractString, The column name of the size variable to be displayed. Defaults to"Major_um".annotationkwargs: (Optional) Keyword arguments passed toplotannotatedframe_single().
Example
julia> trajectory_analyzer(linked_data, collapsed_data, "5_13p5_61p35-2", "my_animation.mp4")
[ Info: Creating animation: Frame = 5
...
[ Info: Saved animation to ~/my_animation.mp4