Skip to content

Commit 2e07acd

Browse files
committed
pyproject.toml (fix): downgrade numpy req to >=1.10
1 parent 298d0fd commit 2e07acd

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

examples/spinner.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
5+
import matplotlib.pyplot as plt
6+
import numpy as np
7+
import practable
8+
9+
messages = []
10+
11+
#modify with actual group code and experiment name
12+
with Experiment('g-open-xxxxx','Spinner 51', exact=True) as expt:
13+
14+
# Command a step of 2 radians & collect the data
15+
expt.command('{"set":"mode","to":"stop"}')
16+
expt.command('{"set":"mode","to":"position"}')
17+
expt.command('{"set":"parameters","kp":1,"ki":0,"kd":0}')
18+
19+
time.sleep(0.5)
20+
21+
expt.command('{"set":"position","to":2}')
22+
23+
expt.ignore(0.5)
24+
messages = expt.collect(1.5)
25+
26+
# Process the data
27+
ts = expt.extract_series(messages, "t")
28+
ds = expt.extract_series(messages, "d")
29+
cs = expt.extract_series(messages, "c")
30+
31+
t = np.array(ts)
32+
t = t - t[0]
33+
34+
# Plot the data
35+
plt.figure()
36+
plt.plot(t/1e3,ds,'-b',label="position")
37+
plt.plot(t/1e3,cs,':r',label="set point")
38+
plt.xlabel("time(s)")
39+
plt.ylabel("position(rad)")
40+
plt.legend()

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "practable"
7-
version = "0.0.10"
7+
version = "0.0.11"
88
authors = [
99
{ name="Timothy Drysdale", email="timothy.d.drysdale@gmail.com" },
1010
]
1111
description = "Connect to remote laboratory experiments hosted on a github.com/practable service"
1212
readme = "README.md"
1313
dependencies = [
14-
"numpy>=2.0",
14+
"numpy>=1.10",
1515
"platformdirs>=4.2",
1616
"requests>=2.32",
1717
"websockets>=12.0",
1818
]
19-
requires-python = ">=3.10"
19+
requires-python = ">=3.8"
2020
classifiers = [
2121
"Programming Language :: Python :: 3",
2222
"License :: OSI Approved :: GNU Affero General Public License v3",

0 commit comments

Comments
 (0)