Name | splinecloud-scipy JSON |
Version |
1.2.6
JSON |
| download |
home_page | |
Summary | A SplineCloud client based on SciPy. |
upload_time | 2024-01-18 22:26:47 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2024 Vadym Pasko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
splinecloud
spline
bspline
interpolation
regression
curve fitting
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# splinecloud-scipy
A Python client for [SplineCloud API](https://splinecloud.com/api/docs/)
The client library is based on [SciPy](https://scipy.org/) and allows to load data and curves from [SplineCloud](https://splinecloud.com/) into your code. Once loaded spline curves can be easily evaluated.
## Example of loading spline curve
<img src="/docs/img/curve_api_link.png?raw=true" width=80% alt="SplineCloud curve">
```python
from splinecloud_scipy import load_spline
curve_id = 'spl_K5t56P5bormJ' # take curve ID from the 'API link' dropdown at SplineCloud
spline = load_spline(curve_id)
```
## Evaluating spline curve for a range of x values
```python
import numpy as np
import matplotlib.pyplot as plt
X = np.linspace(0, 20, 100)
Y = [spline.eval(x) for x in X]
plt.plot(X,Y)
plt.show()
```
![Spline curve](/docs/img/curve.png?raw=true)
## Example of loading data in your code
```python
from splinecloud_scipy import load_subset
subset_id = 'sbt_nDO4XmmYqeGI' # subset id can be taken from the SplineCloud
columns, table = load_subset(subset_id)
```
```
>>> columns
['Throttle (%)',
'Load Currency (A)',
'Pull (g)',
'Power (W)',
'Efficiency (g/W)']
```
```
>>> table
array([[5.0000e-01, 6.7600e+00, 3.8500e+02, 1.0871e+02, 3.5420e+00],
[6.0000e-01, 1.0200e+01, 4.9500e+02, 1.6249e+02, 3.0460e+00],
[7.0000e-01, 1.3580e+01, 6.0600e+02, 2.1768e+02, 2.7840e+00],
[8.0000e-01, 1.7390e+01, 6.8700e+02, 2.7140e+02, 2.5510e+00],
[9.0000e-01, 2.1030e+01, 7.4700e+02, 3.2813e+02, 2.2770e+00],
[1.0000e+00, 2.5060e+01, 8.0700e+02, 3.8555e+02, 2.0930e+00]])
```
These examples are available as notebooks in the project's 'examples' folder.
## Important
This library supports BSpline geometry but does not support weighted BSplines (NURBS). If you adjust the weights of the curve control points use another client, that supports NURBS (a link will be provided here soon).
Raw data
{
"_id": null,
"home_page": "",
"name": "splinecloud-scipy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "splinecloud,spline,BSpline,interpolation,regression,curve fitting",
"author": "",
"author_email": "Vadym Pasko <vadym@splinecloud.com>",
"download_url": "https://files.pythonhosted.org/packages/5b/eb/b52b123e585e8ab87caaf98e35791815d5e0cb49cc7ac3a1a5c25309564f/splinecloud-scipy-1.2.6.tar.gz",
"platform": null,
"description": "# splinecloud-scipy\n\nA Python client for [SplineCloud API](https://splinecloud.com/api/docs/)\n\nThe client library is based on [SciPy](https://scipy.org/) and allows to load data and curves from [SplineCloud](https://splinecloud.com/) into your code. Once loaded spline curves can be easily evaluated.\n\n## Example of loading spline curve\n\n<img src=\"/docs/img/curve_api_link.png?raw=true\" width=80% alt=\"SplineCloud curve\">\n\n```python\nfrom splinecloud_scipy import load_spline\ncurve_id = 'spl_K5t56P5bormJ' # take curve ID from the 'API link' dropdown at SplineCloud\nspline = load_spline(curve_id)\n```\n\n## Evaluating spline curve for a range of x values\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nX = np.linspace(0, 20, 100)\nY = [spline.eval(x) for x in X]\n\nplt.plot(X,Y)\nplt.show()\n```\n\n![Spline curve](/docs/img/curve.png?raw=true)\n\n## Example of loading data in your code\n\n```python\nfrom splinecloud_scipy import load_subset\nsubset_id = 'sbt_nDO4XmmYqeGI' # subset id can be taken from the SplineCloud\ncolumns, table = load_subset(subset_id)\n```\n\n```\n>>> columns\n\n['Throttle (%)',\n 'Load Currency (A)',\n 'Pull (g)',\n 'Power (W)',\n 'Efficiency (g/W)']\n```\n\n```\n>>> table\n\narray([[5.0000e-01, 6.7600e+00, 3.8500e+02, 1.0871e+02, 3.5420e+00],\n [6.0000e-01, 1.0200e+01, 4.9500e+02, 1.6249e+02, 3.0460e+00],\n [7.0000e-01, 1.3580e+01, 6.0600e+02, 2.1768e+02, 2.7840e+00],\n [8.0000e-01, 1.7390e+01, 6.8700e+02, 2.7140e+02, 2.5510e+00],\n [9.0000e-01, 2.1030e+01, 7.4700e+02, 3.2813e+02, 2.2770e+00],\n [1.0000e+00, 2.5060e+01, 8.0700e+02, 3.8555e+02, 2.0930e+00]])\n```\n\nThese examples are available as notebooks in the project's 'examples' folder.\n\n## Important\n\nThis library supports BSpline geometry but does not support weighted BSplines (NURBS). If you adjust the weights of the curve control points use another client, that supports NURBS (a link will be provided here soon).\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Vadym Pasko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A SplineCloud client based on SciPy.",
"version": "1.2.6",
"project_urls": {
"Homepage": "https://github.com/nomad-vagabond/splinecloud-scipy"
},
"split_keywords": [
"splinecloud",
"spline",
"bspline",
"interpolation",
"regression",
"curve fitting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0fea38d81dfc2c1dff229404d58d1063b75c51be55f94bfe9782592b7d840236",
"md5": "491045f562518d53c05580e0452ca852",
"sha256": "4855891c387a49ea61ba6a51b71684311d36bdbbb4ae96267324c20ad07616c7"
},
"downloads": -1,
"filename": "splinecloud_scipy-1.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "491045f562518d53c05580e0452ca852",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 7607,
"upload_time": "2024-01-18T22:26:45",
"upload_time_iso_8601": "2024-01-18T22:26:45.419979Z",
"url": "https://files.pythonhosted.org/packages/0f/ea/38d81dfc2c1dff229404d58d1063b75c51be55f94bfe9782592b7d840236/splinecloud_scipy-1.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5bebb52b123e585e8ab87caaf98e35791815d5e0cb49cc7ac3a1a5c25309564f",
"md5": "a7cae87ad1dbfebce2efdc6e42463311",
"sha256": "72a6cae7b5a41bb04a0b59581817bfc72905973f45e94bc865e532e246a3a93e"
},
"downloads": -1,
"filename": "splinecloud-scipy-1.2.6.tar.gz",
"has_sig": false,
"md5_digest": "a7cae87ad1dbfebce2efdc6e42463311",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9128,
"upload_time": "2024-01-18T22:26:47",
"upload_time_iso_8601": "2024-01-18T22:26:47.051465Z",
"url": "https://files.pythonhosted.org/packages/5b/eb/b52b123e585e8ab87caaf98e35791815d5e0cb49cc7ac3a1a5c25309564f/splinecloud-scipy-1.2.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-18 22:26:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nomad-vagabond",
"github_project": "splinecloud-scipy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "splinecloud-scipy"
}