-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FIFF_DIG_STRING kind data analysis #13079
Comments
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴 |
Is this the same issue as ? If so I can look into it using the file shared there |
... I tried using that file but it didn't contain any DIG_STRING entries, so still need someone to share a problematic file! |
Sorry, I didn't realize that the data with kind 234 wasn't saved after the file was split. Thank you very much for helping me solve this issue. Do you still need me to provide the file? @larsoner |
Yeah I need a file that has type 234 in it. If you also have a file with the splitting issue (the next file error) that you could share, that would be great, too. |
Describe the new feature or enhancement
Recently, I acquired some data collected using the third-generation MEG device from Megin. When trying to retrieve patient scalp points via MNE, I found that the process was not as smooth as before. Through debugging, I discovered that the third-generation MEG device seems to store the patient scalp point data in a directory with the kind FIFF_DIG_STRING, and the data type is FIFFT_DIG_STRING_STRUCT. However, while MNE has defined this data type, it does not provide a method to parse it. I hope the community can add a way to parse this data type. Thank you!
Describe your proposed implementation
we can implement in mne/_fiff/tag.py, like this:
_call_dict = {
FIFF.FIFFT_STRING: _read_string,
FIFF.FIFFT_COMPLEX_FLOAT: _read_complex_float,
FIFF.FIFFT_COMPLEX_DOUBLE: _read_complex_double,
FIFF.FIFFT_ID_STRUCT: _read_id_struct,
FIFF.FIFFT_DIG_POINT_STRUCT: _read_dig_point_struct,
FIFF.FIFFT_COORD_TRANS_STRUCT: _read_coord_trans_struct,
FIFF.FIFFT_CH_INFO_STRUCT: _read_ch_info_struct,
FIFF.FIFFT_OLD_PACK: _read_old_pack,
FIFF.FIFFT_DIR_ENTRY_STRUCT: _read_dir_entry_struct,
FIFF.FIFFT_JULIAN: _read_julian,
FIFF.FIFFT_DI.G_STRING_STRUCT: _read_dig_string,
}
def _read_dig_string(fid, tag, shape, rlims):
......
in mne/_fiff/.digitization.py
for k in range(isotrak["nent"]):
kind = isotrak["directory"][k].kind
pos = isotrak["directory"][k].pos
if kind == FIFF.FIFF_DIG_POINT:
tag = read_tag(fid, pos)
dig.append(tag.data)
# elif kind == FIFF.FIFF_DIG_STRING:
# tag = read_tag(fid, pos)
# dig.append(tag.data)
elif kind == FIFF.FIFF_MNE_COORD_FRAME:
tag = read_tag(fid, pos)
coord_frame = _coord_frame_named.get(int(tag.data.item()))
elif kind == FIFF.FIFF_MNE_CH_NAME_LIST:
Describe possible alternatives
The above is just my current idea, and I don't know exactly how to implement it.
Additional context
No response
The text was updated successfully, but these errors were encountered: