Kinetics Toolkit 0.14 has been released! #230
felixchenier
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a pretty big release, particularly for the Player which can now be completely scripted and stylized, and which can export images and videos. Also, the TimeSeries has been polished and is now easier than ever to use conjointly with your current code. Here is the complete release notes:
New features
Scripting API for the Player
The Player can now be entirely scripted:
Player.get_contents()
andPlayer.set_contents()
Player.get_interconnections()
andPlayer.set_interconnections()
Player.play()
andPlayer.pause()
current_index
,current_time
,target
,zoom
,elevation
,azimuth
, etc.Styling the Player
Every element can now be stylized using properties such as
background_color
,default_point_color
,point_size
,frame_size
,frame_width
,grid_size
,grid_subdivision_size
, etc.Exporting the Player's content to images and videos
You can now export the Player's content to image files such as PNG, JPEG, PDF, SVG or TIFF using
Player.to_image()
, or to MP4 videos usingPlayer.to_video()
. This, combined to styling, should help you giving nice presentations!Standard views in the Player
By defining which axes (x, y, z, -x, -y, -z) correspond to the up and anterior direction using the
up
andanterior
properties, you can now switch to standard orthogonal views usingPlayer.set_view()
. For example:p.set_view("front")
,p.set_view("top")
,p.set_view("right")
, etc. These views are also available interactively using number keys 1 to 6.Interconnection wildcards in the Player
Create interconnections for one body, and apply it to multiple bodies at once, using wildcard (*) in point names. This should facilitate visualizing acquisitions with more than one person (e.g., use
*C7
and*T1
instead ofBody1:C7
,Body1:T1
,Body2:C7
,Body2:T1
) or to create a sequence of movements (e.g., useC7*
andT1*
instead ofC7_frame0
,T1_frame0
,C7_frame1
,T1_frame1
).Convert anything to a TimeSeries
It is now easier than never to create a TimeSeries. For instance, a list of data:
can be transformed into a TimeSeries using:
It works for any other array-like such as nested lists, NumPy arrays, Pandas Series, Pandas DataFrames. It can also be used to create copies of TimeSeries.
New TimeSeries.add_data method
The new
TimeSeries.add_data
method now complements its siblingsTimeSeries.rename_data
andTimeSeries.remove_data
. Using this method ensures that the added data is compatible with the data already present in the TimeSeries (e.g., it has the same dimension across the time dimension) and that you specify wether or not existing data of the same name must be overwritten.New overwrite option to TimeSeries.add_data_info
A new parameter
overwrite
has been added toTimeSeries.add_data_info
so that you can specify wether or not already existing data info of the same name must be overwritten.Improvements
Improved TimeSeries assignations
It is now possible to assign any array-like value to a TimeSeries' time or data property; it will be converted automatically to a proper NumPy array.
Improved parameter checking
Parameter checking has been generally improved, so that if you make a mistake, you will be more likely to get a helpful error message.
Warning on non-interactive mode
You will now get a warning if you attempt to use an interactive Matplotlib object (e.g., the Player, or a GUI-based method) without having configured Matplotlib to be interactive.
Beta Was this translation helpful? Give feedback.
All reactions