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
2 changes: 1 addition & 1 deletion doc/changes/devel/12656.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fix bug where :func:`mne.export.export_raw` does not correct for recording start time (`raw.first_time`) when exporting Raw instances to EDF or EEGLAB formats, by `Qian Chu`_.
Fix bug where :func:`mne.export.export_raw` does not correct for recording start time (:attr:`raw.first_time <mne.io.Raw.first_time>`) when exporting Raw instances to EDF or EEGLAB formats, by `Qian Chu`_.
8 changes: 5 additions & 3 deletions mne/export/_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ def export_raw(
"""Export Raw to external formats.

%(export_fmt_support_raw)s

%(export_warning)s

.. warning::
When exporting ``Raw`` with annotations, ``raw.info["meas_date"]`` must be the
same as ``raw.annotations.orig_time``. This guarantees that the annotations are
in the same reference frame as the samples.
When `Raw.first_time` is not zero (e.g., after cropping), the onsets are
automatically corrected so that onsets are always relative to the first sample.
in the same reference frame as the samples. When
:attr:`Raw.first_time <mne.io.Raw.first_time>` is not zero (e.g., after
cropping), the onsets are automatically corrected so that onsets are always
relative to the first sample.

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion mne/forward/tests/test_make_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def test_make_forward_solution_openmeeg(n_layers):
eeg_atol=100,
meg_corr_tol=0.98,
eeg_corr_tol=0.98,
meg_rdm_tol=0.1,
meg_rdm_tol=0.11,
eeg_rdm_tol=0.2,
)

Expand Down
2 changes: 1 addition & 1 deletion mne/preprocessing/tests/test_fine_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_fine_cal_systems(system, tmp_path):
err_limit = 6000
n_ref = 28
corrs = (0.19, 0.41, 0.49)
sfs = [0.5, 0.7, 0.9, 1.5]
sfs = [0.5, 0.7, 0.9, 1.55]
corr_tol = 0.55
elif system == "fil":
raw = read_raw_fil(fil_fname, verbose="error")
Expand Down
13 changes: 8 additions & 5 deletions mne/utils/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1494,19 +1494,22 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):

docdict["export_fmt_support_epochs"] = """\
Supported formats:
- EEGLAB (``.set``, uses :mod:`eeglabio`)

- EEGLAB (``.set``, uses :mod:`eeglabio`)
"""

docdict["export_fmt_support_evoked"] = """\
Supported formats:
- MFF (``.mff``, uses :func:`mne.export.export_evokeds_mff`)

- MFF (``.mff``, uses :func:`mne.export.export_evokeds_mff`)
"""

docdict["export_fmt_support_raw"] = """\
Supported formats:
- BrainVision (``.vhdr``, ``.vmrk``, ``.eeg``, uses `pybv <https://github.com/bids-standard/pybv>`_)
- EEGLAB (``.set``, uses :mod:`eeglabio`)
- EDF (``.edf``, uses `edfio <https://github.com/the-siesta-group/edfio>`_)

- BrainVision (``.vhdr``, ``.vmrk``, ``.eeg``, uses `pybv <https://github.com/bids-standard/pybv>`_)
- EEGLAB (``.set``, uses :mod:`eeglabio`)
- EDF (``.edf``, uses `edfio <https://github.com/the-siesta-group/edfio>`_)
""" # noqa: E501

docdict["export_warning"] = """\
Expand Down
2 changes: 1 addition & 1 deletion tools/github_actions_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -z "$CONDA_ENV" ]; then
elif [[ "${MNE_CI_KIND}" == "pip" ]]; then
# Only used for 3.13 at the moment, just get test deps plus a few extras
# that we know are available
INSTALL_ARGS="nibabel scikit-learn numpydoc PySide6 mne-qt-browser pandas h5io mffpy defusedxml"
INSTALL_ARGS="nibabel scikit-learn numpydoc PySide6 mne-qt-browser pandas h5io mffpy defusedxml numba"
INSTALL_KIND="test"
else
test "${MNE_CI_KIND}" == "pip-pre"
Expand Down
2 changes: 1 addition & 1 deletion tools/github_actions_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ else # conda-like
echo "MNE_LOGGING_LEVEL=warning" | tee -a $GITHUB_ENV
echo "MNE_QT_BACKEND=PySide6" | tee -a $GITHUB_ENV
# TODO: Also need "|unreliable on GitHub Actions conda" on macOS, but omit for now to make sure the failure actually shows up
echo "MNE_TEST_ALLOW_SKIP=.*(Requires (spm|brainstorm) dataset|CUDA not|PySide6 causes segfaults).*" | tee -a $GITHUB_ENV
echo "MNE_TEST_ALLOW_SKIP=.*(Requires (spm|brainstorm) dataset|CUDA not|PySide6 causes segfaults|Accelerate|Flakey verbose behavior).*" | tee -a $GITHUB_ENV
fi
fi
set +x
Loading