cvnlab / GLMsingle

A toolbox for accurate single-trial estimates in fMRI time-series data
BSD 3-Clause "New" or "Revised" License
101 stars 45 forks source link

"prepare model outputs" section of glm_estimatemodel.py does not exist for hrfmodel = 'fir' #88

Closed jacob-prince closed 1 year ago

jacob-prince commented 1 year ago

I am working on porting the following matlab commits to the python implementation: https://github.com/cvnlab/GLMsingle/compare/7aa0bd2fcaf8191dbc56eac40f778701de673acf...e37bbc9f26362094e3a574f8d6c2156f5fa92077

A core aspect of this new functionality involves running the FIR method for HRF selection. I have noticed that there is a section of code missing in glm_estimatemodel.py that prepares model estimates for output in the FIR case. the (roughly) corresponding code on the matlab side is lines 509-529 of GLMestimatemodel.m:

image

within glm_estimatemodel.py, the corresponding operations exist for the "assume" and "optimize" cases between lines 705 and 740, but the "fir" case is not handled here:

image

the omission of this section raises subsequent errors when continuing with the FIR estimation procedure.

I am raising this issue primarily for record keeping purposes, and to make @iancharest aware just in case there are other aspects of this section of the script that warrant further scrutiny. I will handle implementing the missing code as I continue porting kendrick's updates to the matlab side.