Also, the sign check was moved to the end of lead_field_matrix from
lead_field_eeg_fem, because the source interpolation after at the end of
lead_field_matrix caused yet another sign flip.
The individual commit messages of this squashed set of commits can be found
below. Don't forget to see the attached diff as well before accepting the pull
request.
Updated function zef_lead_field_sign to calculate the signs of the lead
field in x-, y- and z-directions separately.
The function lead_field_eeg_fem multiplies the columns of L_eeg
corresponding to these directions to ensure correct L_eeg orientation.
Moved EEG lead field sign flip(s) to the end of lead_field_matrix from lead_field_eeg_fem
zef_lead_field_sign: ensure the test electrodes are in the direction the test source dipoles point to
Also, the sign check was moved to the end of
lead_field_matrix
fromlead_field_eeg_fem
, because the source interpolation after at the end oflead_field_matrix
caused yet another sign flip.The individual commit messages of this squashed set of commits can be found below. Don't forget to see the attached diff as well before accepting the pull request.
Updated function
zef_lead_field_sign
to calculate the signs of the lead field in x-, y- and z-directions separately.The function
lead_field_eeg_fem
multiplies the columns ofL_eeg
corresponding to these directions to ensure correctL_eeg
orientation.Moved EEG lead field sign flip(s) to the end of lead_field_matrix from lead_field_eeg_fem
zef_lead_field_sign: ensure the test electrodes are in the direction the test source dipoles point to
zef_lead_field_sign: improved documentation