Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"C:/nrn/lib/python"
],
"python.analysis.autoImportCompletions": true,
"editor.fontFamily": "Fira Code",
"editor.fontSize": 16,
"editor.fontLigatures": true,
"svg.preview.background": "dark-transparent",
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [0.3.0] - 2025-08-08

### Added
- **Intramuscular EMG Framework**: Enhanced intramuscular EMG simulation capabilities with improved framework
- Optional CUDA/CuPy support for accelerated computations in intramuscular EMG
- New type definitions for EMG simulation components:
- `CORTICAL_INPUT__MATRIX` type for cortical input data
- `INTRAMUSCULAR_MUAP_SHAPE__TENSOR` for intramuscular electrode arrays

### Changed
- **Major Refactor**: Improved intramuscular EMG simulation framework with better type annotations and imports
- Enhanced `IntramuscularEMG` class with better parameter handling
- Optimized bioelectric field calculations for needle electrodes
- Updated surface EMG components for consistency with intramuscular framework
- Enhanced muscle model integration with electrode positioning
- Improved motor unit simulation with better parameter handling
- Enhanced recruitment thresholds plotting utilities
- Updated project dependencies and compatibility with latest package versions
- Enhanced Sphinx documentation configuration with better type aliases and extensions
- Renamed `MUAP_SHAPE__TENSOR` to `SURFACE_MUAP_SHAPE__TENSOR` for better clarity

### Fixed
- Ensured Mermaid diagrams have consistent white background in documentation
- Improved readability and visual consistency in documentation
- Enhanced development experience with updated VSCode settings

## [0.2.0] - 2025-07-26

### Added
Expand Down
6 changes: 5 additions & 1 deletion docs/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ html[data-theme="dark"] .bd-content img:not(.only-dark):not(.dark-light) {

.sphx-glr-footer.sphx-glr-footer-example.docutils.container {
display: none;
}
}

.mermaid {
background-color: #ffffff;
}
25 changes: 24 additions & 1 deletion docs/source/api/simulator_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ Muscle Model

Muscle

Force Model
^^^^^^^^^^^

.. autosummary::
:toctree: ../generated/
:template: autosummary/class.rst
:recursive:

ForceModel

EMG Generation
^^^^^^^^^^^^^^

Expand All @@ -41,4 +51,17 @@ EMG Generation
:template: autosummary/class.rst
:recursive:

SurfaceEMG
SurfaceEMG
IntramuscularEMG

Electrodes
^^^^^^^^^^^^^^


.. autosummary::
:toctree: ../generated/
:template: autosummary/class.rst
:recursive:

SurfaceElectrodeArray
IntramuscularElectrodeArray
7 changes: 5 additions & 2 deletions docs/source/api/types_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ This module contains type definitions for structured data and type safety.
:recursive:

INPUT_CURRENT__MATRIX
CORTICAL_INPUT__MATRIX
SPIKE_TRAIN__MATRIX
MUAP_SHAPE__TENSOR
SURFACE_EMG__TENSOR
SURFACE_MUAP_SHAPE__TENSOR
INTRAMUSCULAR_MUAP_SHAPE__TENSOR
SURFACE_EMG__TENSOR
INTRAMUSCULAR_EMG__TENSOR
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
"sphinx_gallery.gen_gallery",
"sphinx.ext.doctest",
"myst_parser",
"sphinxcontrib.mermaid",
]

mermaid_version = "11.9.0"

napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_references = False
napoleon_numpy_docstring = True
Expand Down Expand Up @@ -70,6 +73,7 @@
"list[float] | None": ":class:`list`\\[:class:`float`] | :class:`None`",
"list[str] | None": ":class:`list`\\[:class:`str`] | :class:`None`",
"tuple[int, int]": ":class:`tuple`\\[:class:`int`, :class:`int`]",
"tuple[float, float]": ":class:`tuple`\\[:class:`float`, :class:`float`]",
"list[int]": ":class:`list`\\[:class:`int`]",
"list[float]": ":class:`list`\\[:class:`float`]",
"list[str]": ":class:`list`\\[:class:`str`]",
Expand All @@ -78,6 +82,10 @@
"SPIKE_TRAIN__MATRIX": ":data:`~myogen.utils.types.SPIKE_TRAIN__MATRIX`",
"MUAP_SHAPE__TENSOR": ":data:`~myogen.utils.types.MUAP_SHAPE__TENSOR`",
"SURFACE_EMG__TENSOR": ":data:`~myogen.utils.types.SURFACE_EMG__TENSOR`",
"INTRAMUSCULAR_EMG__TENSOR": ":data:`~myogen.utils.types.INTRAMUSCULAR_EMG__TENSOR`",
"CORTICAL_INPUT__MATRIX": ":data:`~myogen.utils.types.CORTICAL_INPUT__MATRIX`",
"SURFACE_MUAP_SHAPE__TENSOR": ":data:`~myogen.utils.types.SURFACE_MUAP_SHAPE__TENSOR`",
"INTRAMUSCULAR_MUAP_SHAPE__TENSOR": ":data:`~myogen.utils.types.INTRAMUSCULAR_MUAP_SHAPE__TENSOR`",
"INPUT_CURRENT__MATRIX | None": ":class:`~myogen.utils.types.INPUT_CURRENT__MATRIX` | :class:`None`",
# Beartype and Annotated type patterns - map to clean aliases
"Annotated[ndarray[tuple[int, ...], dtype[bool]], beartype.vale.Is[lambda x: x.ndim == 3]]": ":data:`~myogen.utils.types.SPIKE_TRAIN__MATRIX`",
Expand Down
Loading