Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Jan 2, 2024
1 parent 57b9c2a commit 46d2965
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# ![logo][] scanspec

# scanspec

[![CI](https://github.com/dls-controls/scanspec/actions/workflows/code.yml/badge.svg)](https://github.com/dls-controls/scanspec/actions/workflows/code.yml)
[![Coverage](https://codecov.io/gh/dls-controls/scanspec/branch/master/graph/badge.svg)](https://codecov.io/gh/dls-controls/scanspec)
[![PyPI](https://img.shields.io/pypi/v/scanspec.svg)](https://pypi.org/project/scanspec)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Specify step and flyscan Paths using combinations of:
<img src="https://raw.githubusercontent.com/dls-controls/scanspec/master/docs/images/scanspec-logo.svg" style="margin-right: 40px; background: none" width="150px" height="150px" align="left">

Specify step and flyscan Paths using combinations of:
- Specs like Line or Spiral
- Optionally Snaking
- Zip, Product and Concat to compose
Expand All @@ -19,13 +21,13 @@ can be produced and expanded Paths created to consume chunk by chunk.
[cycler]: https://matplotlib.org/cycler/

Source | <https://github.com/dls-controls/scanspec>
--- | ---
:---: | :---:
PyPI | `pip install scanspec`
Documentation | <https://dls-controls.github.io/scanspec>
Releases | <https://github.com/dls-controls/scanspec/releases>

An example ScanSpec of a 2D snaked grid flyscan inside a circle spending 0.4s at
each point looks like:
each point:

```python
from scanspec.specs import Line, fly
Expand All @@ -35,9 +37,11 @@ grid = Line(y, 2.1, 3.8, 12) * ~Line(x, 0.5, 1.5, 10)
spec = fly(grid, 0.4) & Circle(x, y, 1.0, 2.8, radius=0.5)
```

Which when plotted looks like:

![plot][]

You can then either iterate through the scan positions directly for convenience:
Scan points can be iterated through directly for convenience:

```python
for point in spec.midpoints():
Expand All @@ -47,8 +51,8 @@ for point in spec.midpoints():
# {'y': 3.1818181818181817, 'x': 0.7222222222222222, 'DURATION': 0.4}
```

or create a Path from the stack of Frames and consume chunks of a given length
from it for performance:
or a Path created from the stack of Frames and chunks of a given length
consumed from it for performance:

```python
from scanspec.core import Path
Expand All @@ -69,6 +73,5 @@ when included in index.md
-->

[plot]: https://raw.githubusercontent.com/dls-controls/scanspec/master/docs/images/plot_spec.png
[logo]: https://raw.githubusercontent.com/dls-controls/scanspec/master/docs/images/scanspec-logo.svg

See https://dls-controls.github.io/scanspec for more detailed documentation.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@

# Logo
html_logo = "images/scanspec-logo.svg"
html_favicon = "images/scanspec-logo.ico"
html_favicon = html_logo
Binary file removed docs/images/scanspec-logo.ico
Binary file not shown.

0 comments on commit 46d2965

Please sign in to comment.