diff --git a/index.html b/index.html index 35062ab..5c99012 100644 --- a/index.html +++ b/index.html @@ -1154,7 +1154,7 @@

7     |     Paper figures

Figure 2.B1+ efficiency for one participant (sub-05) across all seven RF shimming conditions. The top left panel shows the tfl_b1map magnitude image with an overlay of the mask that was used to perform RF shimming. Text inserts show the mean (in nT/V) and CoV (in %) of B1+ efficiency along the spinal cord between C3 and T2.

-
+
-
-
-
---------------------------------------------------------------------------
-ValueError                                Traceback (most recent call last)
-Cell In[20], line 71
-     68 t2_datasets[subject][shim_mode]={}
-     69 b1_datasets[subject][shim_mode]={}
----> 71 t2_data=go.scatter.Line(
-     72     x=x_grid,
-     73     y=t2_data_plotly[subject][shim_mode][0],
-     74     name=shim_mode,
-     75     legendgroup=shim_mode,
-     76     line=dict(color='rgb'+str(pal[index]), width=3),
-     77     showlegend=False
-     78     )
-     80 b1_data=go.scatter.Line(
-     81     x=x_grid,
-     82     y=b1_data_plotly[subject][shim_mode],
-   (...)
-     86     showlegend=legend_bool
-     87     )        
-     90 t2_datasets[subject][shim_mode]=t2_data
-
-File /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/plotly/graph_objs/scatter/_line.py:398, in Line.__init__(self, arg, backoff, backoffsrc, color, dash, shape, simplify, smoothing, width, **kwargs)
-    394     self["width"] = _v
-    396 # Process unknown kwargs
-    397 # ----------------------
---> 398 self._process_kwargs(**dict(arg, **kwargs))
-    400 # Reset skip_invalid
-    401 # ------------------
-    402 self._skip_invalid = False
-
-File /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/plotly/basedatatypes.py:4392, in BasePlotlyType._process_kwargs(self, **kwargs)
-   4390     self[k] = v
-   4391 elif not self._skip_invalid:
--> 4392     raise err
-
-ValueError: Invalid property specified for object of type plotly.graph_objs.scatter.Line: 'x'
-
-Did you mean "dash"?
-
-    Valid properties:
-        backoff
-            Sets the line back off from the end point of the nth
-            line segment (in px). This option is useful e.g. to
-            avoid overlap with arrowhead markers. With "auto" the
-            lines would trim before markers if `marker.angleref` is
-            set to "previous".
-        backoffsrc
-            Sets the source reference on Chart Studio Cloud for
-            `backoff`.
-        color
-            Sets the line color.
-        dash
-            Sets the dash style of lines. Set to a dash type string
-            ("solid", "dot", "dash", "longdash", "dashdot", or
-            "longdashdot") or a dash length list in px (eg
-            "5px,10px,2px,2px").
-        shape
-            Determines the line shape. With "spline" the lines are
-            drawn using spline interpolation. The other available
-            values correspond to step-wise line shapes.
-        simplify
-            Simplifies lines by removing nearly-collinear points.
-            When transitioning lines, it may be desirable to
-            disable this so that the number of points along the
-            resulting SVG path is unaffected.
-        smoothing
-            Has an effect only if `shape` is set to "spline" Sets
-            the amount of smoothing. 0 corresponds to no smoothing
-            (equivalent to a "linear" shape).
-        width
-            Sets the line width (in px).
-        
-Did you mean "dash"?
-
-Bad property path:
-x
-^
-
-
+
+
+
+ + +
+
+ +

Figure 3.B1+ efficiency (A) and CSF/Cord signal ratio from the GRE scan (B) across subjects and across different RF shimming conditions. Data werewas measured in the spinal cord from C3 to T2 vertebral levels. To match the x-ticks across subjects, the C2-C3 and the T2-T3 intervertebral discs of each subject were aligned with that of the PAM50 template [De Leener et al., 2018], and the curves were linearly scaled.

diff --git a/reports/index.log b/reports/index.log deleted file mode 100644 index 44622b4..0000000 --- a/reports/index.log +++ /dev/null @@ -1,384 +0,0 @@ -Traceback (most recent call last): - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution - executenb( - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 1204, in execute - return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute() - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/util.py", line 84, in wrapped - return just_run(coro(*args, **kwargs)) - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/util.py", line 62, in just_run - return loop.run_until_complete(coro) - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 663, in async_execute - await self.async_execute_cell( - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 965, in async_execute_cell - await self._check_raise_for_error(cell, cell_index, exec_reply) - File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/nbclient/client.py", line 862, in _check_raise_for_error - raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) -nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: ------------------- -# PYTHON CODE -# Module imports - -# Base python -import os -from os import path -from pathlib import Path - -# Graphical - -import plotly.graph_objs as go -from IPython.display import display, HTML -from plotly import __version__ -from plotly.offline import init_notebook_mode, iplot, plot -config={ - 'showLink': False, - 'displayModeBar': False, - 'toImageButtonOptions': { - 'format': 'png', # one of png, svg, jpeg, webp - 'filename': 'custom_image', - 'height': 2500, - 'width': 500, - 'scale': 2 # Multiply title/legend/axis/canvas sizes by this factor - } - } - -init_notebook_mode(connected=True) - -from plotly.subplots import make_subplots -import plotly.graph_objects as go - -import seaborn as sns - -# Set the color palette -pal=sns.color_palette() - -# Imports -import warnings -warnings.filterwarnings("ignore") - -## Setup for plots -fig = make_subplots(rows=5, cols=2, vertical_spacing = 0.025, - subplot_titles=( - 'sub-01', - 'sub-01', - 'sub-02', - 'sub-02', - 'sub-03', - 'sub-03', - 'sub-04', - 'sub-04', - 'sub-05', - 'sub-05',)) - -t2_datasets={} -b1_datasets={} - -t2_data = [] -b1_data = [] - -legend_bool = True -for subject in subjects: - index = 0 - t2_datasets[subject]={} - b1_datasets[subject]={} - - for shim_mode in shim_modes: - t2_datasets[subject][shim_mode]={} - b1_datasets[subject][shim_mode]={} - - t2_data=go.scatter.Line( - x=x_grid, - y=t2_data_plotly[subject][shim_mode][0], - name=shim_mode, - legendgroup=shim_mode, - line=dict(color='rgb'+str(pal[index]), width=3), - showlegend=False - ) - - b1_data=go.scatter.Line( - x=x_grid, - y=b1_data_plotly[subject][shim_mode], - name=shim_mode, - legendgroup=shim_mode, - line=dict(color='rgb'+str(pal[index]), width=3), - showlegend=legend_bool - ) - - - t2_datasets[subject][shim_mode]=t2_data - b1_datasets[subject][shim_mode]=b1_data - - index += 1 - legend_bool=False - - -index = 1 -# For z-ordering -for subject in subjects: - for shim_mode in shim_modes: - fig.add_trace( - t2_datasets[subject][shim_mode], - row=index, col=1 - ) - fig.add_trace( - b1_datasets[subject][shim_mode], - row=index, col=2 - ) - index+=1 - - -index = 1 -for subject in subjects: - if index == 5: - x_title = 'Vertebral Levels' - showticklabels=True - else: - x_title = None - showticklabels=False - - fig.update_xaxes( - type="linear", - autorange=True, - title=x_title, - showgrid=True, - gridcolor='rgb(169,169,169)', - tickvals=label_positions, - ticktext=vertebral_levels, - showticklabels=showticklabels, - title_font_family="Times New Roman", - title_font_size = 20, - linecolor='black', - linewidth=2, - tickfont=dict( - family='Times New Roman', - size=16, - ), - row=index, col=1 - ) - if index == 1: - fig.update_yaxes( - type="linear", - title={ - 'text':'CSF/Cord T2*w signal ratio', - 'standoff':0 - }, - range=[1.05, 1.4], - showgrid=True, - gridcolor='rgb(169,169,169)', - title_font_family="Times New Roman", - title_font_size = 20, - linecolor='black', - linewidth=2, - tickfont=dict( - family='Times New Roman', - size=16, - ), - row=index, col=1 - ) - else: - fig.update_yaxes( - type="linear", - title={ - 'text':'CSF/Cord T2*w signal ratio', - 'standoff':0 - }, - showgrid=True, - gridcolor='rgb(169,169,169)', - title_font_family="Times New Roman", - title_font_size = 20, - linecolor='black', - linewidth=2, - tickfont=dict( - family='Times New Roman', - size=16, - ), - row=index, col=1 - ) - - fig.update_xaxes( - type="linear", - autorange=True, - title=x_title, - showgrid=True, - gridcolor='rgb(169,169,169)', - tickvals=label_positions, - ticktext=vertebral_levels, - showticklabels=showticklabels, - title_font_family="Times New Roman", - title_font_size = 20, - linecolor='black', - linewidth=2, - tickfont=dict( - family='Times New Roman', - size=16, - ), - row=index, col=2 - ) - fig.update_yaxes( - type="linear", - title={ - 'text':'B1+ efficiency [nT/V]', - 'standoff':0 - }, - showgrid=True, - gridcolor='rgb(169,169,169)', - title_font_family="Times New Roman", - title_font_size = 20, - linecolor='black', - linewidth=2, - tickfont=dict( - family='Times New Roman', - size=16, - ), - row=index, col=2 - ) - - index+=1 - -fig.update_layout(height=1800, width=900) -fig.update_layout(legend=dict( - yanchor="top", - y=0.999, - xanchor="left", - x=0.01, - font=dict( - family='Times New Roman', - size=12 - ), - bordercolor="Black", - borderwidth=1.5 - ), - legend_tracegroupgap=0, - paper_bgcolor='rgb(255, 255, 255)', - plot_bgcolor='rgb(255, 255, 255)', - -) - -fig.update_annotations(font_size=22) - -#iplot(fig, filename = 'figure4a', config = config) -plot(fig, filename = 'figure1.html', config = config) -display(HTML('figure1.html')) ------------------- - ---------------------------------------------------------------------------- -ValueError Traceback (most recent call last) -Cell In[20], line 71 - 68 t2_datasets[subject][shim_mode]={} - 69 b1_datasets[subject][shim_mode]={} ----> 71 t2_data=go.scatter.Line( - 72  x=x_grid, - 73  y=t2_data_plotly[subject][shim_mode][0], - 74  name=shim_mode, - 75  legendgroup=shim_mode, - 76  line=dict(color='rgb'+str(pal[index]), width=3), - 77  showlegend=False - 78  ) - 80 b1_data=go.scatter.Line( - 81 x=x_grid, - 82 y=b1_data_plotly[subject][shim_mode], - (...) - 86 showlegend=legend_bool - 87 ) - 90 t2_datasets[subject][shim_mode]=t2_data - -File /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/plotly/graph_objs/scatter/_line.py:398, in Line.__init__(self, arg, backoff, backoffsrc, color, dash, shape, simplify, smoothing, width, **kwargs) - 394 self["width"] = _v - 396 # Process unknown kwargs - 397 # ---------------------- ---> 398 self._process_kwargs(**dict(arg, **kwargs)) - 400 # Reset skip_invalid - 401 # ------------------ - 402 self._skip_invalid = False - -File /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/plotly/basedatatypes.py:4392, in BasePlotlyType._process_kwargs(self, **kwargs) - 4390 self[k] = v - 4391 elif not self._skip_invalid: --> 4392 raise err - -ValueError: Invalid property specified for object of type plotly.graph_objs.scatter.Line: 'x' - -Did you mean "dash"? - - Valid properties: - backoff - Sets the line back off from the end point of the nth - line segment (in px). This option is useful e.g. to - avoid overlap with arrowhead markers. With "auto" the - lines would trim before markers if `marker.angleref` is - set to "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud for - `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - simplify - Simplifies lines by removing nearly-collinear points. - When transitioning lines, it may be desirable to - disable this so that the number of points along the - resulting SVG path is unaffected. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - -Did you mean "dash"? - -Bad property path: -x -^ -ValueError: Invalid property specified for object of type plotly.graph_objs.scatter.Line: 'x' - -Did you mean "dash"? - - Valid properties: - backoff - Sets the line back off from the end point of the nth - line segment (in px). This option is useful e.g. to - avoid overlap with arrowhead markers. With "auto" the - lines would trim before markers if `marker.angleref` is - set to "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud for - `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash type string - ("solid", "dot", "dash", "longdash", "dashdot", or - "longdashdot") or a dash length list in px (eg - "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the lines are - drawn using spline interpolation. The other available - values correspond to step-wise line shapes. - simplify - Simplifies lines by removing nearly-collinear points. - When transitioning lines, it may be desirable to - disable this so that the number of points along the - resulting SVG path is unaffected. - smoothing - Has an effect only if `shape` is set to "spline" Sets - the amount of smoothing. 0 corresponds to no smoothing - (equivalent to a "linear" shape). - width - Sets the line width (in px). - -Did you mean "dash"? - -Bad property path: -x -^ -