mne-python
mne-python copied to clipboard
DOC: Clarify read_raw_nirx expects directory path, not file path
Summary
This PR improves the documentation for read_raw_nirx to prevent the common "OSError: Need a directory for fname but found a file..." error that users encounter when passing a single file path instead of a directory path.
Addresses #13353
Changes
mne/io/nirx/nirx.py
- Added a note in the
read_raw_nirxdocstring explaining the directory requirement - Clarified that passing a file path will result in an error
- Added suggestion to use
read_raw_snirffor.snirffiles
tutorials/io/30_reading_fnirs_data.py
- Added an important note in the fNIRS tutorial with:
- Correct vs incorrect usage examples
- Troubleshooting guidance for the OSError
- Alternative for SNIRF format files
Testing
Documentation-only change. No new tests required.This improves the documentation for read_raw_nirx to prevent the common 'OSError: Need a directory for fname but found a file' error that users encounter when passing a single file path instead of a directory path.
Changes:
- Added a note in the read_raw_nirx docstring explaining the directory requirement and suggesting read_raw_snirf for .snirf files
- Added an important note in the fNIRS tutorial with correct/incorrect examples and troubleshooting guidance
Fixes #13353