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
20 changes: 1 addition & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -294,25 +294,7 @@ dict = ["scitex-dict>=0.1.2"]

# DSP Module - Digital Signal Processing
# Use: pip install scitex[dsp]
dsp = [
"scipy",
"sounddevice",
"matplotlib",
"joblib",
"tensorpac",
"ruamel.yaml",
"h5py",
"readchar",
"xarray",
"seaborn",
# # Heavy dependencies handled by _AVAILABLE flags
# "mne",
# "torch",
# "ripple_detection",
# "torchsummary",
# "julius",
# "torchaudio",
]
dsp = ["scitex-dsp>=0.1.0"]

# DevTools Module - scitex.dev code analysis and development tools
# Use: pip install scitex[devtools]
Expand Down
147 changes: 0 additions & 147 deletions src/scitex/dsp/README.md

This file was deleted.

93 changes: 10 additions & 83 deletions src/scitex/dsp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,86 +1,13 @@
#!/usr/bin/env python3
"""Scitex dsp module."""
"""SciTeX dsp — thin compatibility shim for scitex-dsp."""

import warnings
import sys as _sys

# Import example, params, norm, reference, filt, and add_noise modules as submodules
from . import add_noise, example, filt, norm, params, reference

# Core imports that should always work
from ._crop import crop
from ._demo_sig import demo_sig
from ._detect_ripples import (
_calc_relative_peak_position,
_drop_ripples_at_edges,
_find_events,
_preprocess,
_sort_columns,
detect_ripples,
)
from ._ensure_3d import ensure_3d
from ._hilbert import hilbert
from ._modulation_index import _reshape, modulation_index
from ._pac import pac
from ._psd import band_powers, psd
from ._resample import resample
from ._time import time
from ._transform import to_segments, to_sktime_df
from ._wavelet import wavelet

# Try to import audio-related functions that require PortAudio
try:
from ._listen import list_and_select_device

_audio_available = True
except (ImportError, OSError):
warnings.warn(
"Audio functionality unavailable: PortAudio library not found. "
"Install PortAudio to use audio features (e.g., sudo apt-get install portaudio19-dev)",
ImportWarning,
)
list_and_select_device = None
_audio_available = False

# Try to import MNE-related functions
try:
from ._mne import get_eeg_pos

_mne_available = True
except ImportError:
warnings.warn(
"MNE functionality unavailable. Install MNE-Python to use EEG position features.",
ImportWarning,
)
get_eeg_pos = None
_mne_available = False

__all__ = [
"_calc_relative_peak_position",
"_drop_ripples_at_edges",
"_find_events",
"_preprocess",
"_reshape",
"_sort_columns",
"add_noise",
"band_powers",
"crop",
"demo_sig",
"detect_ripples",
"ensure_3d",
"example",
"filt",
"get_eeg_pos",
"hilbert",
"list_and_select_device",
"modulation_index",
"norm",
"pac",
"params",
"psd",
"reference",
"resample",
"time",
"to_segments",
"to_sktime_df",
"wavelet",
]
import scitex_dsp as _real
except ImportError as _e:
raise ImportError(
"scitex.dsp requires the 'scitex-dsp' package. "
"Install with: pip install scitex[dsp] (or: pip install scitex-dsp)"
) from _e

_sys.modules[__name__] = _real
125 changes: 0 additions & 125 deletions src/scitex/dsp/_crop.py

This file was deleted.

Loading
Loading