<jupyter_start><jupyter_text>Synthesize a single neuronThis example shows how to synthesize a single cell with simple parameters.<jupyter_code>from pathlib import Path

import neurots


def run(output_dir, data_dir):
    """Run the example for generating a single cell."""
    # Initialize a neuron
    N = neurots.NeuronGrower(
        input_distributions=data_dir / "bio_distr.json",
        input_parameters=data_dir / "bio_params.json",
    )

    # Grow the neuron
    neuron = N.grow()

    # Export the synthesized cell
    neuron.write(output_dir / "generated_cell.asc")
    neuron.write(output_dir / "generated_cell.swc")
    neuron.write(output_dir / "generated_cell.h5")


if __name__ == "__main__":
    result_dir = Path("results/results_single_neuron")
    result_dir.mkdir(parents=True, exist_ok=True)

    run(result_dir, Path("data"))<jupyter_output>No diametrizer provided, so neurons will have default diameters.
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.001075268817204301, 'mean_word_length': 4.143646408839779, 'pattern_counts': {'":': 1, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '471694', 'license': 'MIT', 'n_tokens_mistral': 311, 'n_tokens_neox': 293, 'n_words': 72, 'path': 'code/NeuroTS/02-synthesize_single_neuron.ipynb', 'repo_name': 'arvidl/consciousness-explore', 'size': '930'}