-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a312ad0
commit 566a3e3
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import tns | ||
import tmd | ||
import view | ||
|
||
# Select output_path to save results | ||
output_path = './Results/' | ||
# Select a name for the synthesized neuron | ||
output_name = 'TestNeuron' | ||
|
||
# Extract distributions from cells in input directory | ||
filename = './test_data/bio/' | ||
distr = tns.extract_input.distributions(filename, diameter_model=True) | ||
|
||
# Generate default parameters dictionary | ||
params = tns.extract_input.parameters(neurite_types=['basal', 'apical']) | ||
|
||
# Initialize a neuron | ||
N = tns.Grower(input_distributions=distr, input_parameters=params, name=output_name) | ||
|
||
# Grow your neuron | ||
N.grow() | ||
|
||
# Correct the diameters of your neuron | ||
N.diametrize() | ||
|
||
# Save your neuron to the selected output path | ||
N.save(output_path=output_path) | ||
|
||
# Load the generated neuron | ||
n = tmd.io.load_neuron(output_path + output_name + '.h5' | ||
|
||
# View your generated neuron | ||
view.view.neuron(n) |
Binary file not shown.
File renamed without changes.