Skip to content

Commit 7fccab1

Browse files
author
Jisk Attema
committed
More docs
1 parent 29f1901 commit 7fccab1

8 files changed

Lines changed: 35 additions & 9 deletions

File tree

.prospector.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ pep257:
2424
D213, # Multi-line docstring summary should start at the second line
2525
D404, # First word of the docstring should not be This
2626
]
27+
28+
pylint:
29+
disable:
30+
- invalid-name
31+
32+
ignore-paths: [
33+
docs/
34+
]

docs/basic.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ more C-like API:
1717

1818
.. literalinclude:: ../examples/sum_no_iterator.py
1919

20+
More examples
21+
~~~~~~~~~~~~~
22+
23+
For more examples, see the *examples* and *tests* directories in the repo.
24+
Examples cover writing to the ringbuffer, reading and writing header data, and dealing with EndOfData.
25+
EndOfData is used by *dada_dbevent* to send independent datasets through a ringbuffer, instead of a single continuous stream.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Add any Sphinx extension module names here, as strings. They can be
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
30-
extensions = [ 'sphinx.ext.autodoc' ]
30+
extensions = ['sphinx.ext.autodoc']
3131

3232
# Add any paths that contain templates here, relative to this directory.
3333
templates_path = ['_templates']

docs/genindex.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Index
2+
=====
3+
4+
`genindex`

docs/index.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,4 @@ Welcome to psrdada-python's documentation
1313

1414
basic
1515
apidoc
16-
17-
18-
Indices and tables
19-
==================
20-
21-
* :ref:`genindex`
22-
* :ref:`search`
16+
genindex

psrdada/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
This package provides a minimal interface to the PSRDada library.
66
Exported are the Reader and Writer classes to connect with
77
psrdada ring buffers.
8+
9+
Ringbuffers are used to process large data streams, in our case data generated
10+
by radio telescopes.
11+
A writer and (mulitple) readers can connect to the buffer and read, process,
12+
and write data with a minimum of data copies.
13+
This library exposes the ringbuffer as a Cython memory view, which you can then
14+
interact with via fi. numpy.
15+
16+
Use cases are:
17+
* rapid prototyping
18+
* a glue layer to run CUDA kernels
19+
* interactive use of the telescope
820
"""
921

1022
from psrdada.reader import Reader

psrdada/reader.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ cdef class Reader(Ringbuffer):
106106
def getNextPage(self):
107107
"""
108108
Return a memoryview on the next available ringbuffer page.
109+
Use *data = np.asarray(page)* to convert it to something more useable.
109110
110111
The read is blocking; it will wait for a page to become available.
111112
112113
.. note:: The view is readonly, and a direct mapping of the ringbuffer page.
113-
So, no memory copies, and no garbage collector.
114+
So, no memory copies, and no garbage collector.
114115
115116
:returns: a PyMemoryView
116117
"""

psrdada/writer.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ cdef class Writer(Ringbuffer):
123123
Return a memoryview on the next available ringbuffer page.
124124
125125
The call is blocking; it will wait for a page to become available.
126+
Use *data = np.asarray(page)* to convert it to something more useable.
126127
127128
.. note:: The view is a direct mapping of the ringbuffer page.
128129
So, no memory copies, and no garbage collector.

0 commit comments

Comments
 (0)