Skip to content

Commit

Permalink
refactor: Changed gui import of _read_dipole_text function so that it…
Browse files Browse the repository at this point in the history
… imported from the dipole module and is not added to the package's init file.
  • Loading branch information
gtdang committed May 15, 2024
1 parent 2d45d77 commit 8b7908d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hnn_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .dipole import simulate_dipole, read_dipole, average_dipoles, Dipole,_read_dipole_txt
from .dipole import simulate_dipole, read_dipole, average_dipoles, Dipole
from .params import Params, read_params, convert_to_hdf5
from .network import Network, pick_connection
from .network_models import jones_2009_model, law_2021_model, calcium_model
Expand Down
4 changes: 3 additions & 1 deletion hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from hnn_core.network import pick_connection
from hnn_core.params import (_extract_drive_specs_from_hnn_params, _read_json,
_read_legacy_params)
from hnn_core.dipole import _read_dipole_txt

import base64
import zipfile
import numpy as np
Expand Down Expand Up @@ -1227,7 +1229,7 @@ def on_upload_data_change(change, data, viz_manager, log_out):
ext_content = codecs.decode(ext_content, encoding="utf-8")
with log_out:
data['simulation_data'][data_fname] = {'net': None, 'dpls': [
hnn_core._read_dipole_txt(io.StringIO(ext_content), file_extension)
_read_dipole_txt(io.StringIO(ext_content), file_extension)
]}
logger.info(f'External data {data_fname} loaded.')
_template_name = "[Blank] single figure"
Expand Down

0 comments on commit 8b7908d

Please sign in to comment.