Skip to content

Commit

Permalink
refactore docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaPandeyCN committed Aug 18, 2024
1 parent ab280ac commit 38c24b0
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions pyneuroml/swc/ExportNML.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 38c24b0

Please sign in to comment.