MCPcopy
hub / github.com/mne-tools/mne-python / test_triux

Function test_triux

mne/preprocessing/tests/test_maxwell.py:1504–1555  ·  view source on GitHub ↗

Test TRIUX system support.

()

Source from the content-addressed store, hash-verified

1502@pytest.mark.slowtest
1503@testing.requires_testing_data
1504def test_triux():
1505 """Test TRIUX system support."""
1506 raw = read_crop(tri_fname, (0, 0.999))
1507 _assert_mag_coil_type(raw.info, FIFF.FIFFV_COIL_VV_MAG_T1)
1508 assert_allclose(raw.info["chs"][2]["cal"], 1.33e-10, rtol=1e-6)
1509 # standard
1510 with use_coil_def(elekta_def_fname):
1511 sss_py = maxwell_filter(raw, coord_frame="meg", regularize=None)
1512 _assert_mag_coil_type(sss_py.info, FIFF.FIFFV_COIL_VV_MAG_T3)
1513 assert_meg_snr(sss_py, read_crop(tri_sss_fname), 37, 700)
1514 # cross-talk
1515 sss_py = maxwell_filter(
1516 raw, coord_frame="meg", regularize=None, cross_talk=tri_ctc_fname
1517 )
1518 assert_meg_snr(sss_py, read_crop(tri_sss_ctc_fname), 31, 250)
1519 # fine cal
1520 sss_py = maxwell_filter(
1521 raw, coord_frame="meg", regularize=None, calibration=tri_cal_fname
1522 )
1523 assert_meg_snr(sss_py, read_crop(tri_sss_cal_fname), 5, 100)
1524 # ctc+cal
1525 sss_py = maxwell_filter(
1526 raw,
1527 coord_frame="meg",
1528 regularize=None,
1529 calibration=tri_cal_fname,
1530 cross_talk=tri_ctc_fname,
1531 )
1532 assert_meg_snr(sss_py, read_crop(tri_sss_ctc_cal_fname), 5, 100)
1533 # regularization
1534 sss_py = maxwell_filter(raw, coord_frame="meg", regularize="in")
1535 sss_mf = read_crop(tri_sss_reg_fname)
1536 assert_meg_snr(sss_py, sss_mf, 0.6, 9)
1537 _check_reg_match(sss_py, sss_mf, 1)
1538 # all three
1539 sss_py = maxwell_filter(
1540 raw,
1541 coord_frame="meg",
1542 regularize="in",
1543 calibration=tri_cal_fname,
1544 cross_talk=tri_ctc_fname,
1545 )
1546 sss_mf = read_crop(tri_sss_ctc_cal_reg_in_fname)
1547 assert_meg_snr(sss_py, sss_mf, 0.6, 9)
1548 _check_reg_match(sss_py, sss_mf, 1)
1549 # tSSS
1550 raw = read_crop(tri_fname).fix_mag_coil_types()
1551 with use_coil_def(elekta_def_fname):
1552 sss_py = maxwell_filter(
1553 raw, coord_frame="meg", regularize=None, st_duration=4.0, verbose=True
1554 )
1555 assert_meg_snr(sss_py, read_crop(tri_sss_st4_fname), 700.0, 1600)
1556
1557
1558@testing.requires_testing_data

Callers

nothing calls this directly

Calls 7

use_coil_defFunction · 0.90
assert_meg_snrFunction · 0.90
read_cropFunction · 0.85
_assert_mag_coil_typeFunction · 0.85
maxwell_filterFunction · 0.85
_check_reg_matchFunction · 0.85
fix_mag_coil_typesMethod · 0.80

Tested by

no test coverage detected