fALFF from XCP-D

Hello,

When you use ‘power_spec_density_sqrt’ did you just rename ‘power_spectrum_sqrt’?

and when you index falff[ii] did you rename i_voxel to ii?

I also had to add:
falff = np.zeros(n_voxels)
falff[i_voxel] = 0
assert falff.size == n_voxels, f"{falff.shape} != {n_voxels}"

Does the above seem correct?

Thanks for your help,
Julie

When you use ‘power_spec_density_sqrt’ did you just rename ‘power_spectrum_sqrt’?
Not sure if I understand this.

falff = np.zeros(n_voxels)
falff[i_voxel] = 0
assert falff.size == n_voxels, f"{falff.shape} != {n_voxels}"

Before the for loop I initialized my matrix with zeros: falff = np.zeros(data_matrix.shape[0]) and inside the for loop I did not add any line besides the 2 posted earlier. Data matrix is what I am passing as an argument to my compute_falff function along with low pass, high pass and TR, so it would depend on how you have defined your data.

Ah, looks like I was using a different restingstate.py as reference from https://github.com/PennLINC/xcp_d/blob/main/xcp_d/utils/restingstate.py instead of the github link tsalo posted above, so it was just a difference in variable naming that was confusing me.