From 38c24b0f3c0800d48c3bbad283eb416a96963ed9 Mon Sep 17 00:00:00 2001 From: AdityaBITMESRA Date: Mon, 19 Aug 2024 00:41:53 +0530 Subject: [PATCH] refactore docstrings --- pyneuroml/swc/ExportNML.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/pyneuroml/swc/ExportNML.py b/pyneuroml/swc/ExportNML.py index b60b6ae5..b3ef60a4 100644 --- a/pyneuroml/swc/ExportNML.py +++ b/pyneuroml/swc/ExportNML.py @@ -1,9 +1,8 @@ import logging import tempfile -from typing import Dict, List, Optional, Set +from typing import List import neuroml.writers as writers -from LoadSWC import SWCGraph, SWCNode, load_swc from neuroml import ( Cell, Member, @@ -15,6 +14,8 @@ ) from neuroml.nml.nml import Point3DWithDiam, SegmentParent +from .LoadSWC import SWCGraph, SWCNode + logging.basicConfig( level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s", @@ -521,26 +522,6 @@ def create_segment_groups(self) -> None: logger.info("Segment groups created successfully") - def print_soma_segments(self) -> None: - """ - Print information about the soma segments for debugging purposes. - """ - logger.info("Printing soma segments:") - for segment in self.cell.morphology.segments: - if self.segment_types.get(segment.id) == SWCNode.SOMA: - print(f"Soma Segment ID: {segment.id}") - print(f" Name: {segment.name}") - if segment.proximal: - print( - f" Proximal: x={segment.proximal.x}, y={segment.proximal.y}, z={segment.proximal.z}, diameter={segment.proximal.diameter}" - ) - print( - f" Distal: x={segment.distal.x}, y={segment.distal.y}, z={segment.distal.z}, diameter={segment.distal.diameter}" - ) - if segment.parent: - print(f" Parent Segment ID: {segment.parent.segments}") - print() - def export_to_nml_file(self, filename: str) -> None: """ Export the NeuroML representation to a file.