oursin.particles
Particles
Functions
Clear all particles |
|
Create particles |
|
Set neuron colors |
|
Change the material used to render neurons |
|
Set the position of particles in ap/ml/dv coordinates relative to the origin |
|
Set particles sizes |
Classes
Particles should not be directly instantiated, use urchin.particles.create(n) and urchin.clear_particles() |
- class Particle[source]
Bases:
object
Particles should not be directly instantiated, use urchin.particles.create(n) and urchin.clear_particles()
- set_position(position)[source]
Set the position of a particle in ap/ml/dv coordinates relative to the origin (0,0,0)
Parameters
- positionlist of three floats
(ap, ml, dv) coordinates in um
Examples
>>>p1.set_position([5200,5700,330]) # set a particle to Bregma, in CCF space
- create(num_particles)[source]
Create particles
Note: particles must be created before setting other values
Parameters
num_particles : int
Examples
>>> neurons = urchin.particles.create(3)
- clear()[source]
Clear all particles
Note that there is no delete method for individual particles, they must all be cleared at once.
- set_positions(particles_list, positions_list)[source]
Set the position of particles in ap/ml/dv coordinates relative to the origin
Parameters
particles_list : list of Particle positions_list : list of list of three floats
list of positions of neurons (ap, ml, dv) in um
Examples
>>> urchin.particles.set_positions([p1,p2,p3], [[1000,1000,1000],...,...])
- set_sizes(particles_list, sizes_list)[source]
Set particles sizes
Parameters
particles_list : list of Particle sizes_list : list of float
Examples
>>> urchin.particles.set_sizes([p1,n2,n3], [0.01,0.02,0.03])