diff --git a/data_processing.ipynb b/data_processing.ipynb index d57e179..127dae3 100644 --- a/data_processing.ipynb +++ b/data_processing.ipynb @@ -257,7 +257,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87a06e2d", + "id": "97f53bfb", "metadata": {}, "outputs": [], "source": [ @@ -330,7 +330,7 @@ " # Siemens maps are in units of flip angle * 10 (in degrees)\n", " acquired_fa = acquired_fa / 10\n", "\n", - " # Account for the power loss between the amplifier and the socket. That number was given by Siemens.\n", + " # Account for the power loss between the coil and the socket. That number was given by Siemens.\n", " voltage_at_socket = ref_voltage * 10 ** -0.095\n", "\n", " # Compute B1 map in [T/V]\n", @@ -341,7 +341,7 @@ "\n", " # Save as NIfTI file\n", " nii_b1 = nib.Nifti1Image(b1_map, nii.affine, nii.header)\n", - " nib.save(nii_b1, f\"{subject}_acq-{shim_mode}_B1plusmap.nii.gz\")" + " nib.save(nii_b1, f\"{subject}_acq-{shim_mode}_TB1map.nii.gz\")" ] }, { @@ -356,7 +356,7 @@ "for subject in subjects:\n", " os.chdir(os.path.join(path_data, subject, \"fmap\"))\n", " for shim_mode in shim_modes:\n", - " !sct_extract_metric -i {subject}_acq-{shim_mode}_b1plusmap.nii.gz -f {subject}_acq-anat{shim_mode}_TB1TFL_seg.nii.gz -method wa -vert 1:9 -vertfile {subject}_acq-anat{shim_mode}_TB1TFL_seg_labeled.nii.gz -perslice 1 -o TB1TFL_{shim_mode}.csv" + " !sct_extract_metric -i {subject}_acq-{shim_mode}_TB1map.nii.gz -f {subject}_acq-anat{shim_mode}_TB1TFL_seg.nii.gz -method wa -vert 1:9 -vertfile {subject}_acq-anat{shim_mode}_TB1TFL_seg_labeled.nii.gz -perslice 1 -o TB1map_{shim_mode}.csv" ] }, { @@ -367,7 +367,6 @@ "outputs": [], "source": [ "# Make figure of B1+ values along the spinal cord across shim methods\n", - "# WIP\n", "\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", @@ -377,8 +376,7 @@ "os.chdir(os.path.join(path_data, subject, \"fmap\"))\n", "\n", "# Pattern to match all files starting with 'TB1TFL_' and ending with '.csv'\n", - "file_pattern = f\"TB1TFL_*.csv\"\n", - "\n", + "file_pattern = f\"TB1map_*.csv\"\n", "\n", "# Initialize a matplotlib figure\n", "plt.figure(figsize=(10, 6))\n",