OxfordASLRun ============ **Purpose.** Build and execute an ``oxford_asl`` command from ``data_descrip`` + ``params``. Handles ASL type (PCASL/PASL), TIs/PLDs, bolus, slice timing, structural usage, and calibration. What it builds -------------- - **Contrast ordering:** ``--iaf tc`` if ``LabelControl=True`` else ``--iaf ct``; default ``--ibf rpt`` (or as given). - **Timing:** computes ``--tis`` (PLD+bolus) and ``--bolus`` from ``data_descrip`` for PCASL/PASL. - **Acquisition:** adds ``--slicedt`` if ``SliceDuration`` is present. - **Structural:** ``-s`` to anatomical when ``useStructural=True``. - **Calibration:** if ``useCalibration=True``, supplies ``-c`` (M0), ``--tr`` and ``--alpha``. - **Output:** sets ``-o `` (defaults to derivatives mirror). - **Execution:** runs with a controlled environment (``FSLOUTPUTTYPE=NIFTI_GZ``, single-thread OMP, locale-safe). Inputs ------ - ``data_descrip`` with keys such as: ``ArterialSpinLabelingType``, ``PLDList``, ``LabelingDuration``, ``BolusCutOffDelayTime``, ``SliceDuration``, ``LabelControl``, ``Images`` (with ``asl`` and optional ``anat``/``M0``), etc. Outputs ------- - Returns ``{"oxford_asl_out": }``. Oxford ASL result files are placed in ```` by the tool. Configuration (``params``) -------------------------- ================= =================== ========================================== Key Type / Default Meaning ================= =================== ========================================== ``wp`` bool / ``False`` White-paper mode (``--wp``) ``mc`` bool / ``False`` Motion correction (``--mc``) ``ibf`` str / ``rpt`` Intra-bolus format (with ``--iaf``) ``bat`` float / *None* Priors (passed through as ``--bat``) ``t1`` float / *None* Tissue T1 (``--t1``) ``t1b`` float / *None* Blood T1 (``--t1b``) ``sliceband`` int / *None* Slice banding (``--sliceband``) ``inferart`` bool / ``False`` ``--inferart`` ``debug`` bool / ``False`` ``--debug`` ``useStructural`` bool / ``False`` Add anatomical with ``-s`` ``useCalibration`` bool / ``False`` Add M0 calibration (``-c``, ``--tr``, ``--alpha``) ``override_inputs`` dict / {} Explicit ``asl_path`` / ``m0_path`` ``outdir`` str / derivatives Output directory ``env`` dict / {} Extra environment vars during run ================= =================== ========================================== YAML example ------------ .. code-block:: yaml modules: - name: OxfordASLRun params: wp: true mc: true useStructural: true useCalibration: true outdir: ./derivatives/oxasl_out