openep / openep-core

Core OpenEP code - Matlab implementation
Apache License 2.0
9 stars 6 forks source link

Error in importcarto_mem (line 508) - kEcg(i) = find(strstartcmpi(channelECG_cli{i}, names)); #69

Closed Jsalas424 closed 2 years ago

Jsalas424 commented 2 years ago

Hello,

I've run into an error while importing a LV CARTO map.

Error:

userdata = importcarto_mem()
Accessing: D:\...\Study 1 01_01_2030 18-01-20.xml
Warning: IMPORTCARTO_MEM: The columns containing data in the .txt files change names. In 1-LV_TC_SR_P441_ECG_Export.txt 
> In importcarto_mem (line 501) 
Unable to perform assignment because the left and right sides have a different number of elements.

Error in importcarto_mem (line 508)
                            kEcg(i) = find(strstartcmpi(channelECG_cli{i}, names));

I can provide the raw files if that would help.

p-j-smith commented 2 years ago

Hello, it would be super useful if you could share the files you're having an issue with (either here or via email if you don't want to share it publicly). Thanks!

Jsalas424 commented 2 years ago

Hi @p-j-smith, I'd be happy to send them over email! Whats the best contact?

p-j-smith commented 2 years ago

Okay great! Would you mind sending it to me (paul.smith@kcl.ac.uk) and maybe cc'ing Steven (steven.e.williams@kcl.ac.uk), and I'll try to take a look sometime next week?

p-j-smith commented 2 years ago

As mentioned in an email, the issue here was that one of the mapping points has missing egm data (four of the channels were missing for that point). Currently there is no way to read channels for some points only, or to ignore certain points. So the only option at the minute is to ignore the problematic channels when importing the data.

Still, the error message was not clear as the assignment on line 508 of importcarto_mem is invalid if the channel is missing. I'll submit a pr to fix this shortly.

drsewilliams commented 2 years ago

As @p-j-smith mentions above, the work around for this for now is to not ask to import a channel e.g. M7 if that channel only exists on a subset of the points.