Python Forum
3D animation of neural spiking data
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D animation of neural spiking data
#1
Hello Python-Forum,

This is my first post Dance

I have a very specific question - apologies if it fits into a different forum.

I have some data in a matrix M(i,j) (20000 x 300 matrix). Its a time-series matrix (20000 time steps, for 300 different traces).

I also have a coordinates matrix C(i,j) (300 x 3 matrix) of triplets of (x,y,z) coordinates.

How can I generate a movie where:
1. The movie evolves in time (the 20000 time steps)
2. The movie displays a sphere of fixed radius S(j) for each triplet (x,y,z) of coordinates. This position remains fixed in time.
3. Each sphere S(j), in time, has a heatmap that evolves in the movie according to column j of M.

For anyone who is wondering the matrix M pertains to neural spiking data, and the coordinate matrix C is the locations of each of the neurones.

Any help with this would be really appreciated. I am extremely new to python so be gentle!

Big Grin

lb5999
Reply
#2
I should clear up that I should have said:

2. The movie displays a sphere S(j) of fixed radius for each triplet (x,y,z) of coordinates. This position remains fixed in time.

Namely all of the spheres are the same size throughout the movie. The thing that evolves throughout the movie is the colour of the sphere, as given by the jth column of M.
Reply
#3
Hello,

see https://www.mathworks.com/help/matlab/ref/plot3.html
it shows how to get a 3d plot.

you will have to install matlab (if you haven't already done so)
Reply
#4
Hi Lars,

Thanks for your help.


I have used plot3 in matlab before. However its not quite what I am after - I want a 3d movie with certain graphic features. Also the objects I am using are generated in Python so it would be best if this was done in Python.

Do you think what I have outlined below is:
(a) achievable in plot3 in matlab?
(b) easiest to achieve in matlab (even after exporting data from python to matlab)?

Cheers,
Linford
Reply
#5
You can do this (I believe) with Jython (of which I am only a novice), perhaps in concert with matlab
see this: http://stackoverflow.com/questions/17288...hon-python

I thought about blender and Maya, but was not sure of python connection
here's a bit on that: http://codereview.stackexchange.com/ques...ing-script

And a blog on Python movies: http://www.cs.uregina.ca/Links/class-inf...honMovies/

Hope something here is helpful
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020