From c2ca609d98b477e4cd089e805983778c77ea9ad8 Mon Sep 17 00:00:00 2001 From: Dan Levitas Date: Wed, 24 Jul 2024 19:45:39 +0000 Subject: [PATCH] [ENH] telemetry send validator output to pet2bids server --- handler/bids.sh | 3 +++ handler/ezBIDS_core/ezBIDS_core.py | 2 +- ui/src/store/index.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/handler/bids.sh b/handler/bids.sh index 247f50ab..dd44de6d 100755 --- a/handler/bids.sh +++ b/handler/bids.sh @@ -28,7 +28,10 @@ tree "$rootDir" > $root/tree.log echo "running bids validator" bids-validator "$rootDir" > $root/validator.log || true +bids-validator --json "$rootDir" > $root/validator.json || true echo "Copying finalized.json file to ezBIDS_template.json" cp -r $root/finalized.json $root/ezBIDS_template.json +# Telemetry (to hard-coded pet2bids server) +curl -H 'Content-Type: application/json' -d @$root/validator.json -X POST http://52.87.154.236/telemetry/ \ No newline at end of file diff --git a/handler/ezBIDS_core/ezBIDS_core.py b/handler/ezBIDS_core/ezBIDS_core.py index ebe5c961..cbd5c4be 100755 --- a/handler/ezBIDS_core/ezBIDS_core.py +++ b/handler/ezBIDS_core/ezBIDS_core.py @@ -825,7 +825,7 @@ def correct_pe(pe_direction, ornt, correction): proper_pe_direction = [key for key, value in proper_ax_idcs.items() if value == axcode_index][0] + polarity - # Weird issue where the polarity sign (-) comes before the axis letter (e.g. -j instead of j-). + # Weird issue where the polarity sign (-) comes before the axis letter (e.g. -j instead of j-). # Only witnessed in Philips data. if len(proper_pe_direction) == 2 and proper_pe_direction[0] == '-': proper_pe_direction = proper_pe_direction[1] + proper_pe_direction[0] diff --git a/ui/src/store/index.ts b/ui/src/store/index.ts index 0705570f..d8efe742 100755 --- a/ui/src/store/index.ts +++ b/ui/src/store/index.ts @@ -571,6 +571,7 @@ const store = createStore({ // delete sidecar.SeriesDescription; // } + item.sidecar = sidecar; item['sidecar_json'] = JSON.stringify(sidecar, null, 4); } });