Demo 03 perturbation
In [ ]:
Copied!
"""Demo 03: Perturbation — spike recovery and reaction-removal drift."""
"""Demo 03: Perturbation — spike recovery and reaction-removal drift."""
In [ ]:
Copied!
from __future__ import annotations
from __future__ import annotations
In [ ]:
Copied!
import sys
from pathlib import Path
import sys
from pathlib import Path
In [ ]:
Copied!
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / "src"))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / "src"))
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
In [ ]:
Copied!
import matplotlib
matplotlib.use("Agg")
import matplotlib
matplotlib.use("Agg")
In [ ]:
Copied!
from _core import demo_03_spike_recovery, demo_03_drift
from alienbio.viz import save_or_show
from _core import demo_03_spike_recovery, demo_03_drift
from alienbio.viz import save_or_show
In [ ]:
Copied!
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "03_perturbation"
OUTPUT = Path(__file__).resolve().parent.parent / "output" / "03_perturbation"
In [ ]:
Copied!
def main() -> None:
fig_spike = demo_03_spike_recovery()
save_or_show(fig_spike, OUTPUT / "spike_recovery.png")
fig_drift = demo_03_drift()
save_or_show(fig_drift, OUTPUT / "drift.png")
print("demo_03_perturbation: OK")
def main() -> None:
fig_spike = demo_03_spike_recovery()
save_or_show(fig_spike, OUTPUT / "spike_recovery.png")
fig_drift = demo_03_drift()
save_or_show(fig_drift, OUTPUT / "drift.png")
print("demo_03_perturbation: OK")
In [ ]:
Copied!
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()