Skip to content
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

Allow rapidtide's --fixdelay argument to accept an imaging file #171

Open
tsalo opened this issue Oct 22, 2024 · 2 comments
Open

Allow rapidtide's --fixdelay argument to accept an imaging file #171

tsalo opened this issue Oct 22, 2024 · 2 comments

Comments

@tsalo
Copy link
Contributor

tsalo commented Oct 22, 2024

Is your feature request related to a problem? Please describe.
This might already be implemented in one of the other CLIs in rapidtide (and if so sorry about the spam), but would it make sense to accept a file in the same space/resolution as the input file for --fixdelay?

There are two use-cases I can foresee:

  1. If you have an external estimate of the delay times (e.g., an arterial transit time [ATT] map from an ASL scan) and want to run rapidtide with it. This is related to Leverage ASL derivatives? nipreps/fmripost-rapidtide#18.
  2. If you have run rapidtide on multiple runs, then combined them to reduce noise in the individual delay maps, as we have discussed in Split regressor estimation and denoising steps nipreps/fmripost-rapidtide#17. In that scenario, it seems like the other outputs estimated from the run-wise rapidtide runs (especially the sLFO regressor) should be recalculated using the new delay map.

Describe the solution you'd like
I was thinking you could modify --fixdelay to accept either a float (current behavior) or a file, where the file would have to have the same dimensions as the input image.

It might also be nice to just use the external delay map as an initial estimate that rapidtide could refine across passes.

Describe alternatives you've considered
I think the current plan in fMRIPost-rapidtide is to just run retroglm using the denoised delay map with the original run-wise rapidtide outputs, which seems reasonable but might be suboptimal?

Additional context
None

@bbfrederick
Copy link
Owner

I like this idea, especially the idea of a "hint" map. These are two features really, and we'd have to figure out the best way to have them interact. Perhaps two flags --initialdelay, which could be a float or a map, and --nodelayfit, to not fit the delay in the voxel, just use the current delay value (either constant or voxelwise)? I think that would be most flexible. Not sure about the option names I gave though.

@tsalo
Copy link
Contributor Author

tsalo commented Oct 29, 2024

I think that's a great idea. The --initialdelay option is what I was envisioning, but --nodelayfit makes a lot of sense too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants