def test_get_chpi():
    with warnings.catch_warnings(record=True):  # deprecation
        trans0, rot0, _, quat0 = get_chpi_positions(hp_fname, return_quat=True)
    assert_allclose(rot0[0], quat_to_rot(quat0[0]))
    trans0, rot0 = trans0[:-1], rot0[:-1]
    raw = Raw(hp_fif_fname)
    with warnings.catch_warnings(record=True):  # deprecation
        out = get_chpi_positions(raw)
    trans1, rot1, t1 = out
    trans1, rot1 = trans1[2:], rot1[2:]
    # these will not be exact because they don't use equiv. time points
    assert_allclose(trans0, trans1, atol=1e-5, rtol=1e-1)
    assert_allclose(rot0, rot1, atol=1e-6, rtol=1e-1)
    # run through input checking
    raw_no_chpi = Raw(test_fif_fname)
    with warnings.catch_warnings(record=True):  # deprecation
        assert_raises(TypeError, get_chpi_positions, 1)
        assert_raises(ValueError, get_chpi_positions, hp_fname, [1])
        assert_raises(RuntimeError, get_chpi_positions, raw_no_chpi)
        assert_raises(ValueError, get_chpi_positions, raw, t_step='foo')
        assert_raises(IOError, get_chpi_positions, 'foo')
Returns two lists in a tuple where the first list is any sheep who timed
dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_chpi.py/test_get_chpi--crossover with--dataset/ETHPy150Open ucrcsedept/galah/galah/shepherd/flockmanager.py/FlockManager.cleanup