Skip to content
Merged
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ requires-python = ">= 3.11"
[tool.ruff]
src = ["python"]
include = ["python/**/*.py"]
exclude = ["python/react-series-data-viewer"]
line-length = 120
preview = true

Expand Down
6 changes: 3 additions & 3 deletions python/react-series-data-viewer/chunking.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import json
import math
import os
from collections import OrderedDict
import numpy as np
from scipy import signal
import sys
from collections import OrderedDict

import numpy as np
from protocol_buffers import chunk_pb2 as chunk_pb
from scipy import signal


def pad_values(values, chunk_size):
Expand Down
7 changes: 5 additions & 2 deletions python/react-series-data-viewer/edf_to_chunks.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env python

import argparse
import sys

import mne.io
import mne.io.edf.edf as mne_edf
from chunking import write_chunk_directory
import sys


def load_channels(exclude):
Expand Down Expand Up @@ -67,7 +70,7 @@ def load_channels(exclude):
if len(stim_channel_idxs) == 1:
continue

print('Creating chunk for channel {} for {}'.format(i, path))
print(f'Creating chunk for channel {i} for {path}')

# excluding channels in the loader reduce the time required to read the file
# and avoid memory issues
Expand Down
9 changes: 6 additions & 3 deletions python/react-series-data-viewer/eeglab_to_chunks.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env python

import argparse
import sys

import chunking
import mne.io
import mne.io.eeglab.eeglab as mne_eeglab
import chunking
import sys


def load_channels(path):
Expand Down Expand Up @@ -42,7 +45,7 @@ def load_channels(path):
if args.channel_count and args.channel_count < 0:
sys.exit("Channel count must be a positive integer")

print('Creating chunks for {}'.format(path))
print(f'Creating chunks for {path}')
chunking.write_chunk_directory(
path=path,
from_channel_index=args.channel_index,
Expand Down
3 changes: 3 additions & 0 deletions python/react-series-data-viewer/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.ruff]
extend = "../../pyproject.toml"
exclude = ["protocol_buffers"]
Loading