Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff fixes #51

Merged
merged 5 commits into from
Jan 7, 2025
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: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ matplotlib
pytest
scipy
pandera
pywavelets
1 change: 0 additions & 1 deletion src/iblphotometry/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from iblphotometry.processing import make_sliding_window
from iblphotometry.pipelines import run_pipeline
from brainbox.io.one import SessionLoader

logger = logging.getLogger()

Expand Down
8 changes: 6 additions & 2 deletions src/iblphotometry/synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import numpy as np
import pandas as pd
import scipy.signal

# import scipy.signal
import pywt


def synthetic101(fs=30, rl=1000, event_rate=0.2):
Expand All @@ -17,7 +19,9 @@ def synthetic101(fs=30, rl=1000, event_rate=0.2):
ns = fs * rl
tscale = np.arange(ns) / fs
photobleach = np.exp(-(tscale + 1) / 200)
ric = scipy.signal.ricker(int(fs * 4), 8)
# ric = scipy.signal.ricker(int(fs * 4), 8) # previous code
wavelet = pywt.ContinuousWavelet(name='mexh')
ric = wavelet.wavefun(length=int(fs * 4))[0] / 2.5 # approximately

event_times = np.cumsum(-np.log(np.random.rand(int(rl * event_rate))) / event_rate)
event_times = event_times[: np.searchsorted(event_times, rl - 10)]
Expand Down
4 changes: 2 additions & 2 deletions src/iblphotometry_tests/test_processing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import iblphotometry.io as fio
import iblphotometry.processing as processing
import pandas as pd
# import pandas as pd

from iblphotometry_tests.base_tests import PhotometryDataTestCase

Expand All @@ -15,7 +15,7 @@ def test_processing(self):
self.paths['photometry_signal_pqt'],
self.paths['photometryROI_locations_pqt'],
)
trials = pd.read_parquet(self.paths['trials_table_pqt'])
# trials = pd.read_parquet(self.paths['trials_table_pqt'])
raw_df = raw_dfs['GCaMP']['DMS']

# bleach corrections
Expand Down
Loading