Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,*.pdf,*.svg
# extint - function/variable name
ignore-words-list = extint
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v1
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Features
- 2 TTL output channels (3.3V)
- 2 amplitude modulation channels
- Microcontroller can be used standalone (c.f. `Standalone use` section in the docs)
- Stimulus pulse delivery with ms or μs accurary
- Stimulus pulse delivery with ms or μs accuracy
- Random selection of a sequence from a sequence library
- Piping of sequence file to the directory of the latest scan on the MRI computer
- Error message forwarding to computer
Expand Down
4 changes: 2 additions & 2 deletions cosplay/dump_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def hexlify(buf):
return ubinascii.hexlify(buf, ' ')
else:
def hexlify(buf):
# CPython's hexlify doesn't have the notion of a seperator character
# CPython's hexlify doesn't have the notion of a separator character
# so we just do this the old fashioned way
return bytes(' '.join(['{:02x}'.format(b) for b in buf]), 'ascii')
except AttributeError:
def hexlify(buf):
# CPython's hexlify doesn't have the notion of a seperator character
# CPython's hexlify doesn't have the notion of a separator character
# so we just do this the old fashioned way
return bytes(' '.join(['{:02x}'.format(b) for b in buf]), 'ascii')

Expand Down
4 changes: 2 additions & 2 deletions cosplay/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def listdir_nohidden(path):
List all entries in `path` excluding hidden ones.

This function implements the same functionality as `os.listdir`
but ignores hidden entires.
but ignores hidden entries.

Parameters
----------
Expand Down Expand Up @@ -264,7 +264,7 @@ def connect(port_name=None):

This function tries to connect to `port_name`. If `port_name`
is None, tries to connect to the first serial port with a
maching VID:PID for the MicroPython Pyboard.
matching VID:PID for the MicroPython Pyboard.

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion documentation/COSplay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Features
- 2 transistor channels (up to ~3.3V)
- 2 TTL output channels with variable amplitude
- Microcontroller can be used standalone (c.f. :ref:`pyboard`)
- Stimulus pulse delivery with :math:`ms` or :math:`\mu s` accurary
- Stimulus pulse delivery with :math:`ms` or :math:`\mu s` accuracy
- Random selection of a sequence from a sequence library
- Piping of sequence file to the directory of the latest scan on the MRI computer
- Error message forwarding to computer
Expand Down
6 changes: 3 additions & 3 deletions documentation/pyboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Red:
Warning! Do not unplug or reset the board in this state as files might be corrupted.

Red/Green flashing:
An error occured while executing the scripts on the board.
An error occurred while executing the scripts on the board.

Standalone use
==============
Expand All @@ -117,7 +117,7 @@ for every reboot of the pyboard.
Sequence Errors
===============

Before deliverying a sequence, the board checks its consistency.
Before delivering a sequence, the board checks its consistency.
If the period is smaller than the pulse width or the values in the out_channel column are not integers between 1 and 6, a SequenceError is raised.

In case the board misses a scheduled onset time or end time of a pulse,
Expand All @@ -144,7 +144,7 @@ config.py
Library path
------------

If one copies sequences to the board manually, the path to the directory containing the sequences can be spcified in ``library_path``.
If one copies sequences to the board manually, the path to the directory containing the sequences can be specified in ``library_path``.

Accuracy
--------
Expand Down
2 changes: 1 addition & 1 deletion pyboard/lib/tsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def dumps(matrix):
matrix : 2d array
input matrix

Retruns
Returns
-------
out : string
tsv formatted string
Expand Down
4 changes: 2 additions & 2 deletions pyboard/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def callback_trigger2():

def main():

#keep the following lines close to the begining of main because laser is switched on until pin_out.value(1)
#keep the following lines close to the beginning of main because laser is switched on until pin_out.value(1)
pin_out1 = pyb.Pin('Y1',pyb.Pin.OUT_PP,pull=pyb.Pin.PULL_UP)
pin_out1.value(not cfg.on_value_out_channel1)
pin_out2 = pyb.Pin('Y3',pyb.Pin.OUT_PP,pull=pyb.Pin.PULL_UP)
Expand Down Expand Up @@ -175,7 +175,7 @@ def main():
eh = ErrorHandler(use_wo_server,pkt,storage_path)

if cfg.accuracy == 'us':
ticks = utime.ticks_us #Function for utime.measurment
ticks = utime.ticks_us #Function for utime.measurement
sleep = utime.sleep_us #Corresponding sleep function for ticks
conversion_factor = 1000000 #converts seconds to the unit specified in cfg.accuracy
elif cfg.accuracy == 'ms':
Expand Down
2 changes: 1 addition & 1 deletion scripts/remove_permissions_for_pyboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo rm -f /etc/udev/rules.d/$a-pyboard.rules
echo "/etc/udev/rules.d/$a-pyboard.rules was removed."
else
echo $'\n\n'
echo "md5sum miss match! File was probably altered manually. Make sure there are no rules not related to the pyboard in /etc/udev/rules.d/$a-pyboard.rules and delet it manually."
echo "md5sum miss match! File was probably altered manually. Make sure there are no rules not related to the pyboard in /etc/udev/rules.d/$a-pyboard.rules and delete it manually."
echo $'\n\n'
echo "Lines added by the grant_permissions look as follows:"
echo "# f055:9800, 9801, 9802 MicroPython pyboard
Expand Down