-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Description
When we run the population module to calculate CBF on a dataset that has CBF only for session 2 only. Then it crashes. The issue is that number of sessions is 2, but the list of sessions has only ASL_2, so while the maximum number of sessions is 2, the effective number of sessions is 1. The maximum number of sessions and the effective number of sessions thus differ and this is a challenge for the current code.
Tasks
-
Replace the
x.dataset.nSessionswithlength(x.SESSIONS)asx.SESSIONSin population module locally reflect only sessions to be processed, and not necessarily all sessions available from 1 to N.
HENK:x.dataset.nSessionsshould do exactly the same, but it determines it at the point of starting the processing. During the processing, the number of sessions shouldn't change. The problem probably occurs because you concatenate and delete ASL_1? So the concatenation should happen but ASL_1 shouldn't be deleted?
But I agree, this shouldn't crash.
JAN: x.SESSIONs is locally changed IN the population module. The problem is only in the population module. It has nothing to do with concatenation as we didn't do any concatenation or deletion. Simply ASL_1 wasn't calculating CBF because I don't have FABBER. So NOT processing, but local problem in Population where x.SESSIONS is updated to process only those sessions that exist. -
The list x.SESSIONS only reflects CBF. But if we also want to get
M0in population module for ASL_1, then this will be ignored if CBF is on ASL_2 and M0 on ASL_1 and ASL_2.
HENK: when you reach the ROI processing, this shouldn't be an issue. For theCreatePopulationTemplatepart, this will go wrong anyway with sessions, so we shouldn't change this. I made a specific remark there that this should be changed AFTER we use the new BIDS structure.
Anyway, this should be datatype-specific. Your solution may say that all subjects have missing data for ASL (because there isn't an ASL_1) and it will skip ASL. So this needs testing.
JAN: It IS an issue. Because it doesn't locate CBF for ASL_1 so it skips all ASL_1 sessions. But M0 exists for ASL_1 and we don't want it skipped. But this SESSION selecting function only took the first datatype.
HENK: OK THIS IS MY TAKE ON THIS:
xASL_adm_GetPopulationSessions: should give the amount of sessions (nSessions) and the specific names (x.SESSIONS) on each desired location in the population module.
Problem 1: in xASL_adm_CreatePopulationTemplates: xASL_adm_GetPopulationSessions is ran only once before, so it assumes that all datatypes have the same x.SESSIONS &
nSessions. So solution: xASL_adm_GetPopulationSessions should run separately for each datatype inside xASL_adm_CreatePopulationTemplates.
Problem 2: in xASL_stat_GetRoiStatistics & xASL_stat_PrintStats: xASL_adm_GetPopulationSessions is ran for each separate datatype, but inside xASL_adm_GetPopulationSessions it always uses CBF. Instead, it should use the input datatype (and default to CBF).
Note that we later have to do the same for visits…
And note that this may be easier with BIDS, because the nomenclature for visits & sessions will be standardised by then.
Release notes
Fix population module - creation of templates when session 1 is missing but a second session does exist