Releases: NsquaredLab/MyoGen
Releases · NsquaredLab/MyoGen
MyoGen 0.9.0
This release fixes a long-standing reproducibility bug in the RNG architecture, introduces a proper accessor API for seeding, makes elephant a genuine optional dependency, and bundles the unified fiber-simulation pipeline with its validation test suite. Existing user code that imports myogen.RANDOM_GENERATOR or myogen.SEED continues to work but now emits a DeprecationWarning.
Highlights
- RNG reproducibility fix —
set_random_seed()now propagates to every module and every seed-derived generator. New public accessors:myogen.get_random_generator(),myogen.get_random_seed(),myogen.derive_subseed(*labels). elephantis now an optional extra — core install is elephant-free. Install with the extra if you need firing-rate statistics, NaN-safe ISI, or the viziphant raster plot example:pip install myogen[elephant].- NaN guards in firing-rate statistics —
calculate_firing_rate_statisticsno longer returnsNaNforFR_stdwith a single active unit or for per-neuronCV_ISIwith exactly two spikes. - Unified fiber-simulation pipeline — new
simulate_fiber_hybrid(time-domain Rosenfalck source + frequency-domain volume conductor), an intramuscular Green's-function kernel, several Bessel / IFFT / electrode-coordinate correctness fixes, and a 26-case validation test suite against Hyser PhysioNet and the Avrillon/Caillet/Farina MU dictionary. - Figures, docs, tests — distribution plots replace bar graphs in three examples; new per-muscle VL/VM/FDI supplementary figure generator; NEURON 8.2.7 referenced consistently (including the correct Windows installer filename);
tests/directory bootstrapped with 40 passing tests; newtestsCI workflow runs pytest on every PR.
Migration notes
- Deprecated symbols.
myogen.RANDOM_GENERATORandmyogen.SEEDnow resolve via a module-level__getattr__that emits aDeprecationWarning. Replacewithfrom myogen import RANDOM_GENERATOR, SEED x = RANDOM_GENERATOR.normal()
The accessor reads the module-global at call time, so subsequentfrom myogen import get_random_generator, get_random_seed x = get_random_generator().normal()
set_random_seed()calls are honoured (the direct import captured a stale reference). - RNG output changes.
derive_subseed(*labels)replaces the previousSEED + (class_id+1)*(global_id+1)formula used at three sites inmyogen/simulator/neuron/cells.pyand theKMeansrandom_stateinmyogen/simulator/core/emg/intramuscular/motor_unit_sim.py. The old formula collided on swapped factors — e.g.(0, 5)and(1, 2)both resolved to+6. Consequence: for a given global seed, random draws differ from 0.8.5 and earlier. If you need byte-level reproduction of pre-0.9.0 outputs, pin that version. elephant/viziphantoptional. If you were relying on them being installed as core dependencies, switch topip install myogen[elephant].
Full details
- Full CHANGELOG: https://github.com/NsquaredLab/MyoGen/blob/v0.9.0/CHANGELOG.md#090---2026-04-19
- Commits since 0.8.5: v0.8.5...v0.9.0
v0.8.5
Full Changelog: v0.8.4...v0.8.5
v0.8.4
Full Changelog: v0.8.2...v0.8.4
v0.8.3 (Preprint Version)
Full Changelog: v0.8.2...v0.8.3
v0.8.2
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Full Changelog: v0.7.0...v0.8.1
v0.7.0
Full Changelog: v0.6.11...v0.7.0
v0.6.12
Full Changelog: v0.6.11...v0.6.12
v0.3.0
What's Changed
- Add iEMG simulation + docs updates by @RaulSimpetru in #2
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- cortical inputs by @rnwatanabe in #1
New Contributors
- @rnwatanabe made their first contribution in #1
Full Changelog: v0.1.1...v0.2.0