snudda.place.rotation

class snudda.place.rotation.SnuddaRotate(config_file=None)[source]

Rotation object.

Constructor

Parameters

config_file – Path to network config file

get_rotations(volume_name, neuron_type, neuron_positions, rng)[source]

Gets rotations for neuron_type in volumne name at neuron_positions

static load_rotation_field(rotation_field_file, volume_name)[source]

Loads rotation field for volumne_name from rotation_field_file

parse_config_file(config_file)[source]

Parse config_file, sets self.rotation_lookup

static random_z_rotate(rng)[source]

Helper method, rotate around z-axis (of SWC coordinates)

static rotation_matrix_from_vectors(vec1, vec2)[source]

Creates a rotation matrix to rotate vec1 into vec2.