Skip to main content

Documentation for ScryLab v0.2.1

Changelogs

Import Data from Python & MATLAB

ScryLab exposes a REST API at http://localhost:5678 that accepts signals from any language or tool. For Python and MATLAB users, there are official clients that handle the details automatically.

Python client

Install with pip and you’re ready to go:

Terminal window
pip install scrylab
import scrylab as scry
import numpy as np
t = np.linspace(0, 1, 1_000)
# Import only – no plotting
scry.send(np.sin(2 * np.pi * 5 * t), name="Sine 5Hz", x=t, y_unit="V", x_unit="s")
# Import and plot directly
scry.plot(np.sin(2 * np.pi * 10 * t), name="Sine 10Hz", x=t, y_unit="V", x_unit="s")
# Multiple signals at once
scry.send_many(
y=[np.sin(2 * np.pi * 5 * t), np.cos(2 * np.pi * 5 * t)],
names=["Sine", "Cosine"],
y_unit="V",
x_unit="s",
)

Full documentation and all parameters: github.com/scrylab/scrylab-python

MATLAB client

Install from the MATLAB Add-On Explorer (search “ScryLab Plotter”), then call the functions in the scry namespace:

t = linspace(0, 1, 1000);
% Import only – no plotting
scry.send(sin(2*pi*5*t), name="Sine 5Hz", x=t, y_unit="V", x_unit="s")
% Import and plot directly
scry.plot(sin(2*pi*10*t), name="Sine 10Hz", x=t, y_unit="V", x_unit="s")
% Multiple signals at once
scry.send_many({sin(2*pi*5*t), cos(2*pi*5*t)}, names={"Sine", "Cosine"}, y_unit="V", x_unit="s")

Full documentation and all parameters: github.com/scrylab/scrylab-matlab

Direct REST API (Julia, curl, …)

If you prefer to use the API directly – from Julia or any other environment – the REST API reference has all endpoints, parameters, and curl examples.

Terminal window
# Quick check
curl http://localhost:5678/api/status
# Send a signal
curl -X POST http://localhost:5678/api/signals/send \
-H "Content-Type: application/json" \
-d '{"name":"Test","y":[1,2,3],"target_source_id":"<source_id>"}'