ofgulban / bvbabel

A lightweight Python library for reading & writing BrainVoyager file formats.
MIT License
19 stars 11 forks source link

Add GLM read write support #32

Open 27-apizzuti opened 1 year ago

27-apizzuti commented 1 year ago

Hi Faruk, it would be great to have a read/write .glm function. Thank you in advance, Alessandra

ofgulban commented 1 year ago

Initial implementation is done, "read_GLM" function is working. See an example script (read_glm_export_nifti.py) at wip folder.

However, there are 2 remaining issues:

  1. There are 9 unknown bytes associated with the predictors. I can not find documentation on what these bytes are stand for. Therefore, I am currently reading and skipping them. See https://github.com/ofgulban/bvbabel/blob/6fc13b8ec2b903b8c167ff42af99a648fb9d7147/bvbabel/glm.py#L211-L212
  2. The docstring descriptions needs to be double checked. See https://github.com/ofgulban/bvbabel/blob/6fc13b8ec2b903b8c167ff42af99a648fb9d7147/bvbabel/glm.py#L18-L67 @nausikaa8 , would you have time to help me with the second item?
nausikaa8 commented 1 year ago

Sure, @ofgulban, I'll get back within a few days.

nausikaa8 commented 1 year ago

Hi @ofgulban, I've emailed you with some initial comments.