PennLINC / aslprep

Preprocessing of arterial spin labeling (ASL) data
https://aslprep.readthedocs.io
Other
41 stars 15 forks source link

wrong equation in utils/cbf.py #431

Closed xu-boyan closed 3 months ago

xu-boyan commented 3 months ago

Summary

t1tissue is missing in line 750 and 751:

        np.exp(-np.maximum(pld_by_voxel - att_arr, 0))
        - np.exp(-np.maximum(tau_for_pld + pld_by_voxel - att_arr, 0))

Additional details

What were you trying to do?

What did you expect to happen?

What actually happened?

Reproducing the bug

tsalo commented 3 months ago

@xu-boyan thank you for reporting this. I've opened #432 with the fix and will merge it once CI passes.

tsalo commented 3 months ago

For posterity, I looked through the commit history to figure out if there was a reason for this (e.g., if I was accounting for it elsewhere and this was just a code readability problem). This was introduced in #268, and I couldn't find any reason why I missed it before, beyond just coder error.

xu-boyan commented 3 months ago

Thank you for your prompt response in fixing the bug. I really appreciate your quick work!