From 9971658109347a8c1ba951236f2f5d97cdacbed2 Mon Sep 17 00:00:00 2001 From: sophie22 Date: Fri, 8 Mar 2024 01:43:22 +0000 Subject: [PATCH 1/8] add task-specific result table structures --- app/main/templates/_acr_geom.html | 9 +++++++++ app/main/templates/_acr_snr.html | 9 +++++++++ app/main/templates/series_view.html | 16 +++++++++++----- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 app/main/templates/_acr_geom.html create mode 100644 app/main/templates/_acr_snr.html diff --git a/app/main/templates/_acr_geom.html b/app/main/templates/_acr_geom.html new file mode 100644 index 0000000..3cfea2a --- /dev/null +++ b/app/main/templates/_acr_geom.html @@ -0,0 +1,9 @@ + + {{ measurement }} + +{% for nested_key, nested_value in value.items() %} + + {{ nested_key }} + {{ nested_value }} + +{% endfor %} \ No newline at end of file diff --git a/app/main/templates/_acr_snr.html b/app/main/templates/_acr_snr.html new file mode 100644 index 0000000..7658776 --- /dev/null +++ b/app/main/templates/_acr_snr.html @@ -0,0 +1,9 @@ + + {{ measurement }} + +{% for key in value %} + + {{ key }} + {{ value.get(key) }} + +{% endfor %} \ No newline at end of file diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index 3218be6..bb1fdee 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -84,17 +84,23 @@

- + {% for measurement, value in data.measurement.items() %} - - - - + {% if task == 'acr_geometric_accuracy' %} + {% include '_acr_geom.html' %} + {% elif task == 'acr_snr' %} + {% include '_acr_snr.html' %} + {% else %} + + + + + {% endif %} {% endfor %}
MeasurementMeasurement Value
{{ measurement }}{{ value }}
{{ measurement }}{{ value }}
From 639d7d4fd0c74119d4d03676922b1bc4a3325f60 Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Thu, 21 Nov 2024 10:17:39 +0000 Subject: [PATCH 2/8] Table formatting for acr slice position --- app/main/templates/_acr_slice_position.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/main/templates/_acr_slice_position.html diff --git a/app/main/templates/_acr_slice_position.html b/app/main/templates/_acr_slice_position.html new file mode 100644 index 0000000..3cfea2a --- /dev/null +++ b/app/main/templates/_acr_slice_position.html @@ -0,0 +1,9 @@ + + {{ measurement }} + +{% for nested_key, nested_value in value.items() %} + + {{ nested_key }} + {{ nested_value }} + +{% endfor %} \ No newline at end of file From fdc5a92d8ead385d0a7ce60d6bfa9aa9f60b8e63 Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Thu, 21 Nov 2024 10:18:54 +0000 Subject: [PATCH 3/8] update series view template for acr slice position --- app/main/templates/series_view.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index bb1fdee..2f56077 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -95,6 +95,8 @@

{% include '_acr_geom.html' %} {% elif task == 'acr_snr' %} {% include '_acr_snr.html' %} + {% elif task =='acr_slice_position' %} + {% include '_acr_slice_position.html' %} {% else %} {{ measurement }} From cb0835644c419a590607b0e1fe006f2becb050e7 Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Tue, 26 Nov 2024 15:32:59 +0000 Subject: [PATCH 4/8] Create MagNET slice position template --- app/main/templates/_MagNET_slice_position.html | 0 app/main/templates/series_view.html | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 app/main/templates/_MagNET_slice_position.html diff --git a/app/main/templates/_MagNET_slice_position.html b/app/main/templates/_MagNET_slice_position.html new file mode 100644 index 0000000..e69de29 diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index 2f56077..ca9b121 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -97,6 +97,8 @@

{% include '_acr_snr.html' %} {% elif task =='acr_slice_position' %} {% include '_acr_slice_position.html' %} + {% elif task == 'slice_position' %} + {% include '_MagNET_slice_position.html' %} {% else %} {{ measurement }} From 4ce1056cc96ac2bb4678b8675c03fcbba161f9ca Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Fri, 29 Nov 2024 14:58:52 +0000 Subject: [PATCH 5/8] Add MagNET slice width formatting --- app/main/templates/_magnet_slice_width.html | 24 +++++++++++++++++++++ app/main/templates/series_view.html | 6 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 app/main/templates/_magnet_slice_width.html diff --git a/app/main/templates/_magnet_slice_width.html b/app/main/templates/_magnet_slice_width.html new file mode 100644 index 0000000..41cf6ae --- /dev/null +++ b/app/main/templates/_magnet_slice_width.html @@ -0,0 +1,24 @@ +{% if value is mapping %} + + {{ measurement|capitalize }} + + {% for nested_key, nested_value in value.items() %} + + {{ nested_key|capitalize }} + {{ nested_value }} + + {% endfor %} +{% elif value is iterable %} + {% if value|length > 1 %} + + {{ measurement|capitalize }} + {{ value[0] }}, {{ value[1] }}, {{ value[2] }} + + {% endif %} +{% else %} + + {{ measurement|capitalize }} + {{ value }} + +{% endif %} + diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index ca9b121..2841e11 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -95,10 +95,10 @@

{% include '_acr_geom.html' %} {% elif task == 'acr_snr' %} {% include '_acr_snr.html' %} - {% elif task =='acr_slice_position' %} + {% elif task == 'acr_slice_position' %} {% include '_acr_slice_position.html' %} - {% elif task == 'slice_position' %} - {% include '_MagNET_slice_position.html' %} + {% elif task == 'slice_width' %} + {% include '_magnet_slice_width.html' %} {% else %} {{ measurement }} From ceb05ae06c027197965fa69acd6549f682503592 Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Fri, 29 Nov 2024 15:03:13 +0000 Subject: [PATCH 6/8] Delete MagNET slice position template - not needed --- app/main/templates/_MagNET_slice_position.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/main/templates/_MagNET_slice_position.html diff --git a/app/main/templates/_MagNET_slice_position.html b/app/main/templates/_MagNET_slice_position.html deleted file mode 100644 index e69de29..0000000 From 6be708d6e9fb4ba447b0d8536121ba5ad0c71b4c Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Thu, 12 Dec 2024 13:49:50 +0000 Subject: [PATCH 7/8] MagNET SNR display formatting --- app/main/templates/_magnet_snr.html | 20 ++++++++++++++++++++ app/main/templates/series_view.html | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 app/main/templates/_magnet_snr.html diff --git a/app/main/templates/_magnet_snr.html b/app/main/templates/_magnet_snr.html new file mode 100644 index 0000000..91779a3 --- /dev/null +++ b/app/main/templates/_magnet_snr.html @@ -0,0 +1,20 @@ +{% if value is mapping %} + + {{ measurement.split(' ')[0] | upper }} {{ measurement.split(' ', 1)[1] }} + + {% for nested_key, nested_value in value.items() %} + {% if nested_value is mapping %} + {% for nested_nested_key, nested_nested_value in nested_value.items() %} + + {{ nested_nested_key|capitalize }} ({{ nested_key }}) + {{ nested_nested_value }} + + {% endfor %} + {% else %} + + {{ nested_key|capitalize }} + {{ nested_value }} + + {% endif %} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index 2841e11..d9f2b32 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -99,6 +99,8 @@

{% include '_acr_slice_position.html' %} {% elif task == 'slice_width' %} {% include '_magnet_slice_width.html' %} + {% elif task == 'snr' %} + {% include '_magnet_snr.html' %} {% else %} {{ measurement }} From febb78a928dd97ca74f95ded88622b65923e8360 Mon Sep 17 00:00:00 2001 From: mollybuckley Date: Fri, 27 Dec 2024 10:07:36 +0000 Subject: [PATCH 8/8] Capitalisation --- app/main/templates/_acr_geom.html | 2 +- app/main/templates/_acr_slice_position.html | 4 ++-- app/main/templates/_acr_snr.html | 4 ++-- app/main/templates/series_view.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/main/templates/_acr_geom.html b/app/main/templates/_acr_geom.html index 3cfea2a..8f2c45a 100644 --- a/app/main/templates/_acr_geom.html +++ b/app/main/templates/_acr_geom.html @@ -1,5 +1,5 @@ - {{ measurement }} + {{ measurement|capitalize }} {% for nested_key, nested_value in value.items() %} diff --git a/app/main/templates/_acr_slice_position.html b/app/main/templates/_acr_slice_position.html index 3cfea2a..06ecada 100644 --- a/app/main/templates/_acr_slice_position.html +++ b/app/main/templates/_acr_slice_position.html @@ -1,9 +1,9 @@ - {{ measurement }} + {{ measurement }} {% for nested_key, nested_value in value.items() %} - {{ nested_key }} + {{ nested_key|capitalize }} {{ nested_value }} {% endfor %} \ No newline at end of file diff --git a/app/main/templates/_acr_snr.html b/app/main/templates/_acr_snr.html index 7658776..ae3dde1 100644 --- a/app/main/templates/_acr_snr.html +++ b/app/main/templates/_acr_snr.html @@ -1,9 +1,9 @@ - {{ measurement }} + {{ measurement|capitalize }} {% for key in value %} - {{ key }} + {{ key|capitalize }} {{ value.get(key) }} {% endfor %} \ No newline at end of file diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index d9f2b32..16c61ef 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -103,7 +103,7 @@

{% include '_magnet_snr.html' %} {% else %} - {{ measurement }} + {{ measurement|capitalize }} {{ value }} {% endif %}