Closed willtack closed 3 years ago
@willtack I think the problem is you've specified the file's paths relative to the BIDS root; I suggest instead doing the following:
def AttachToSession():
data = ['deltam', 'm0scan']
data = '\n'.join(data)
data = 'volume_type\n' + data # the data is now a string
asl_context1 = {
'name': '{subject}_{session}_run-01_aslcontext.tsv',
'data': data,
'type': 'text/tab-separated-values'
}
asl_context2 = {
'name': '{subject}_{session}_run-02_aslcontext.tsv',
'data': data,
'type': 'text/tab-separated-values'
}
asl_context3 = {
'name': '{subject}_{session}_run-03_aslcontext.tsv',
'data': data,
'type': 'text/tab-separated-values'
}
return [asl_context1, asl_context2, asl_context3]
I know this won't directly solve your problem of having ASL split across multiple runs. Unfortunately the AttachToSession
function will attach whatever it is given to whatever sessions are found using the subject
and session
flags.
Since the input data is the same, though, it should not have any bearing on your analyses (at worst, you'll have a tsv that points to no files; not the worst problem to have).
To be clear, you could always create multiple heuristics too (for each session type) in the case that the session data is different each time
@willtack can we close this issue?
Describe the issue I'm attempting to curate a session with multiple different ASL acquisitions. To accomplish this, I'm having the heuristic generate separate aslcontext files for each acquisition. (In this case the context file is the same, but I have other projects with very different kinds of acquisitions)._ When attempting to return all three asl_context files at the end of AttachToSession(), I receive the below error. When I comment out the latter two, it works.
Let me know.
Thanks! Will
Were you running
fw-heudiconv
locally or from Flywheel's GUI?If you ran it locally, please describe your setup:
OS: MacOS Catalina
Version 0.3.3
Please paste your heuristic below:
Please paste any relevant output below
Add any additional context or information below