Skip to content

Commit

Permalink
Remove superfluous filter (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzbeh authored Dec 21, 2023
1 parent ddb16c0 commit fdf97c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
9 changes: 1 addition & 8 deletions agcounts/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@ def _resample(
logger.error("Interpolating needs MNE. Please install MNE.")
raise ImportError("mne")
else:
raw = mne_filter.filter_data(
raw,
sfreq=frequency,
l_freq=None,
h_freq=15,
verbose=30,
)
downsample_data = mne_filter.resample(raw, down=frequency / 30)
downsample_data = mne_filter.resample(raw, down=frequency / 30)
else:
upsample_factor, downsample_factor = _factors(frequency)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "agcounts"
version = "0.2.1"
version = "0.2.2"
description = "This project contains code to generate activity counts from accelerometer data."
authors = ["Actigraph LLC <[email protected]>"]
maintainers = ["Ali Neishabouri <[email protected]>"]
Expand All @@ -17,7 +17,7 @@ mne = ">=1.4.0"

[tool.poetry.dev-dependencies]
black = "^23.9.1"
mypy = "^1.5.1"
mypy = ">=1.5.1"
flake8 = "^6.1.0"
pydocstyle = "^6.3.0"
pytest = "^7.4.2"
Expand Down
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def cp_counts(request):
counts = pd.read_csv(
cp_data_path / f"raw_{epoch}_{freq}_CentrePointCounts.csv", skiprows=0
)
counts = counts[["X (axis 2)", "Y (axis 1)", "Z (axis3)"]].to_numpy()
return counts
counts_axes = counts[["X (axis 2)", "Y (axis 1)", "Z (axis3)"]].to_numpy()
return counts_axes


@pytest.fixture
Expand All @@ -75,8 +75,8 @@ def al_counts(request):
counts = pd.read_csv(
al_data_path / f"raw_{epoch}_{freq}_counts{epoch}sec.csv", skiprows=10
)
counts = counts[["Axis2", "Axis1", "Axis3"]].to_numpy()
return counts
counts_axes = counts[["Axis2", "Axis1", "Axis3"]].to_numpy()
return counts_axes


@pytest.fixture
Expand Down

0 comments on commit fdf97c6

Please sign in to comment.