Skip to content

Commit

Permalink
[ENH] telemetry send validator output to pet2bids server
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Levitas committed Jul 24, 2024
1 parent 519d7cd commit c2ca609
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions handler/bids.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion handler/ezBIDS_core/ezBIDS_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions ui/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ const store = createStore({
// delete sidecar.SeriesDescription;
// }

item.sidecar = sidecar;
item['sidecar_json'] = JSON.stringify(sidecar, null, 4);
}
});
Expand Down

0 comments on commit c2ca609

Please sign in to comment.