def _compare_epochs_infos(info1, info2, ind):
 info1._check_consistency()
 info2._check_consistency()
 if (info1['nchan'] != info2['nchan']):
  raise ValueError(("epochs[%d]['info']['nchan'] must match" % ind))
 if (info1['bads'] != info2['bads']):
  raise ValueError(("epochs[%d]['info']['bads'] must match" % ind))
 if (info1['sfreq'] != info2['sfreq']):
  raise ValueError(("epochs[%d]['info']['sfreq'] must match" % ind))
 if (set(info1['ch_names']) != set(info2['ch_names'])):
  raise ValueError(("epochs[%d]['info']['ch_names'] must match" % ind))
 if (len(info2['projs']) != len(info1['projs'])):
  raise ValueError('SSP projectors in epochs files must be the same')
 if any(((not _proj_equal(p1, p2)) for (p1, p2) in zip(info2['projs'], info1['projs']))):
  raise ValueError('SSP projectors in epochs files must be the same')
 if (((info1['dev_head_t'] is None) != (info2['dev_head_t'] is None)) or ((info1['dev_head_t'] is not None) and (not np.allclose(info1['dev_head_t']['trans'], info2['dev_head_t']['trans'], rtol=1e-06)))):
  raise ValueError(("epochs[%d]['info']['dev_head_t'] must match. The epochs probably come from different runs, and are therefore associated with different head positions. Manually change info['dev_head_t'] to avoid this message but beware that this means the MEG sensors will not be properly spatially aligned. See mne.preprocessing.maxwell_filter to realign the runs to a common head position." % ind))

def _compare_epochs_infos ( info1 , info2 , ind ) : info1 . _check_consistency ( ) info2 . _check_consistency ( ) if ( info1 [ 'nchan' ] != info2 [ 'nchan' ] ) : raise ValueError ( ( "epochs[%d]['info']['nchan'] must match" % ind ) ) if ( info1 [ 'bads' ] != info2 [ 'bads' ] ) : raise ValueError ( ( "epochs[%d]['info']['bads'] must match" % ind ) ) if ( info1 [ 'sfreq' ] != info2 [ 'sfreq' ] ) : raise ValueError ( ( "epochs[%d]['info']['sfreq'] must match" % ind ) ) if ( set ( info1 [ 'ch_names' ] ) != set ( info2 [ 'ch_names' ] ) ) : raise ValueError ( ( "epochs[%d]['info']['ch_names'] must match" % ind ) ) if ( len ( info2 [ 'projs' ] ) != len ( info1 [ 'projs' ] ) ) : raise ValueError ( 'SSP projectors in epochs files must be the same' ) if any ( ( ( not _proj_equal ( p1 , p2 ) ) for ( p1 , p2 ) in zip ( info2 [ 'projs' ] , info1 [ 'projs' ] ) ) ) : raise ValueError ( 'SSP projectors in epochs files must be the same' ) if ( ( ( info1 [ 'dev_head_t' ] is None ) != ( info2 [ 'dev_head_t' ] is None ) ) or ( ( info1 [ 'dev_head_t' ] is not None ) and ( not np . allclose ( info1 [ 'dev_head_t' ] [ 'trans' ] , info2 [ 'dev_head_t' ] [ 'trans' ] , rtol = 1e-06 ) ) ) ) : raise ValueError ( ( "epochs[%d]['info']['dev_head_t'] must match. The epochs probably come from different runs, and are therefore associated with different head positions. Manually change info['dev_head_t'] to avoid this message but beware that this means the MEG sensors will not be properly spatially aligned. See mne.preprocessing.maxwell_filter to realign the runs to a common head position." % ind ) )
compare infos .