Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ft_appendsens: use chantype when present for checking consistency #2228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StolkArjen
Copy link
Contributor

@StolkArjen StolkArjen commented Apr 19, 2023

ft_appendsens checks the consistency of the sensor sets prior to merging, one of the criteria being their 'type'. It uses ft_senstype for this purpose (around line 65). However, this does not always work reliably when the sensor set has labels that trip ft_senstype up in believing the sensor type is, for instance, ext1020 instead of eeg, such as may happen with the idiosyncratic labels typically used for iEEG electrodes/channels. I noticed it does this even when a chantype field is already present, ignoring the information contained by that field. I think a proper fix for this would involve some major consideration of what information ft_senstype (and ft_datatype_sens, for that matter) should prioritize for different modalities (also as a function of ft version, as seems to be another variable). In the meantime, the present PR makes ft_appendsens exploit information from the chantype field during the consistency check, diverting to ft_senstype when necessary.

@StolkArjen StolkArjen closed this Apr 19, 2023
@StolkArjen StolkArjen deleted the fixappendsens branch April 19, 2023 02:26
@StolkArjen StolkArjen restored the fixappendsens branch April 19, 2023 12:40
@StolkArjen
Copy link
Contributor Author

Accidentally closed this

@StolkArjen StolkArjen reopened this Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant