OxfordASLSplitM0 ================ **Purpose.** Split a 4D ASL series into **ASL-only** and **M0** when ``ASLContext`` contains ``"m0scan"`` frames. If no ``m0scan`` exists, pass through the original ASL and use a **separate** M0 from ``data_descrip``. Inputs ------ - Either from ``params``: - ``in_asl`` (explicit ASL path), or - From ``data_descrip["Images"][]["asl"][0]``. - ASL context, provided by (priority): 1. ``data_descrip["ASLContext"]`` 2. ``params["asl_context"]`` 3. JSON file at ``perf/aslcontext.json`` (keys ``ASLContext``/``AslContext``) Outputs ------- - Writes into **derivatives mirror** (by default): - ``perf/asl_only.nii.gz`` - ``perf/m0.nii.gz`` - Returns: ``{"asl_path": , "m0_path": }``. Configuration ------------- =================== =================== ========================================== Key Type / Default Meaning =================== =================== ========================================== ``in_asl`` str / *auto* Input ASL path (abs or BIDS-like) ``asl_context`` list[str] / *None* Context list if not in metadata ``asl_context_json`` str / ``perf/aslcontext.json`` Fallback JSON ``out_asl`` str / ``perf/asl_only.nii.gz`` Output ASL ``out_m0`` str / ``perf/m0.nii.gz`` Output M0 =================== =================== ========================================== YAML example ------------ .. code-block:: yaml modules: - name: OxfordASLSplitM0