From d8296ff40de9b96da13cfd1bfa9bb930a17b29c7 Mon Sep 17 00:00:00 2001 From: Furen Xiao Date: Sun, 27 Sep 2026 18:45:09 +0800 Subject: [PATCH] fix(t1c): exclude TOF MRA and subtraction series Add tof, sub, and subtraction tokens to the Lee T1c exclusion regex. This prevents time-of-flight MRA and post/pre subtraction sequences from matching T1-based names. --- scripts/03_scan_lee_t1c.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/03_scan_lee_t1c.py b/scripts/03_scan_lee_t1c.py index c1fc6cf..f55af40 100644 --- a/scripts/03_scan_lee_t1c.py +++ b/scripts/03_scan_lee_t1c.py @@ -21,7 +21,14 @@ BASE = path("lee") T1_NAME_RE = re.compile(r"t1|tfl|spgr|mp2rage|tse3d|vfl|mpage", re.I) # fiesta/ciss/ssfp: balanced-SSFP (fluid-bright, T2-dominant) — their short TE # fools the seq/TE fallback below, so they are excluded by name, not T1c -EXCL_RE = re.compile(r"\bt2\b|dwi|dti|mra|mrv|angi|swi|bold|\bpp2d|\bpp3d|perf|t2\*|t2star|fiesta|ciss|ssfp", re.I) +# tof: time-of-flight MRA (angiographic; "spgr" in the name matches T1_NAME_RE) +# sub/subtraction: post/pre subtraction images (KVP carries POST CONTRAST); +# "sub" = the token prefix followed by any non-letter (sub_s16, sub:3d, +# _SUB, sub. — but not "subject"/"subtraction", handled separately) +EXCL_RE = re.compile(r"\bt2\b|dwi|dti|mra|mrv|angi|swi|bold|\bpp2d|\bpp3d|perf|t2\*|t2star" + r"|fiesta|ciss|ssfp" + r"|(?