|
2 | 2 | # Matti Hamalainen <msh@nmr.mgh.harvard.edu> |
3 | 3 | # Martin Luessi <mluessi@nmr.mgh.harvard.edu> |
4 | 4 | # Denis Engemann <denis.engemann@gmail.com> |
| 5 | +# Teon Brooks <teon.brooks@gmail.com> |
5 | 6 | # |
6 | 7 | # License: BSD (3-clause) |
7 | 8 |
|
@@ -621,3 +622,53 @@ def _check_raw_compatibility(raw): |
621 | 622 | 'could result in precision mismatch. Setting ' |
622 | 623 | 'raw.orig_format="unknown"') |
623 | 624 | raw[0].orig_format = 'unknown' |
| 625 | + |
| 626 | + |
| 627 | +def read_raw_fif(fnames, allow_maxshield=False, preload=False, |
| 628 | + proj=False, compensation=None, add_eeg_ref=True, |
| 629 | + verbose=None): |
| 630 | + """Reader function for Raw FIF data |
| 631 | +
|
| 632 | + Parameters |
| 633 | + ---------- |
| 634 | + fnames : list, or string |
| 635 | + A list of the raw files to treat as a Raw instance, or a single |
| 636 | + raw file. For files that have automatically been split, only the |
| 637 | + name of the first file has to be specified. Filenames should end |
| 638 | + with raw.fif, raw.fif.gz, raw_sss.fif, raw_sss.fif.gz, |
| 639 | + raw_tsss.fif or raw_tsss.fif.gz. |
| 640 | + allow_maxshield : bool, (default False) |
| 641 | + allow_maxshield if True, allow loading of data that has been |
| 642 | + processed with Maxshield. Maxshield-processed data should generally |
| 643 | + not be loaded directly, but should be processed using SSS first. |
| 644 | + preload : bool or str (default False) |
| 645 | + Preload data into memory for data manipulation and faster indexing. |
| 646 | + If True, the data will be preloaded into memory (fast, requires |
| 647 | + large amount of memory). If preload is a string, preload is the |
| 648 | + file name of a memory-mapped file which is used to store the data |
| 649 | + on the hard drive (slower, requires less memory). |
| 650 | + proj : bool |
| 651 | + Apply the signal space projection (SSP) operators present in |
| 652 | + the file to the data. Note: Once the projectors have been |
| 653 | + applied, they can no longer be removed. It is usually not |
| 654 | + recommended to apply the projectors at this point as they are |
| 655 | + applied automatically later on (e.g. when computing inverse |
| 656 | + solutions). |
| 657 | + compensation : None | int |
| 658 | + If None the compensation in the data is not modified. |
| 659 | + If set to n, e.g. 3, apply gradient compensation of grade n as |
| 660 | + for CTF systems. |
| 661 | + add_eeg_ref : bool |
| 662 | + If True, add average EEG reference projector (if it's not already |
| 663 | + present). |
| 664 | + verbose : bool, str, int, or None |
| 665 | + If not None, override default verbose level (see mne.verbose). |
| 666 | +
|
| 667 | + Returns |
| 668 | + ------- |
| 669 | + raw : Instance of RawFIFF |
| 670 | + A Raw object containing FIF data. |
| 671 | + """ |
| 672 | + return RawFIFF(fnames=fnames, allow_maxshield=allow_maxshield, |
| 673 | + preload=preload, proj=proj, compensation=compensation, |
| 674 | + add_eeg_ref=add_eeg_ref, verbose=verbose) |
0 commit comments