From 4f88d93823552dd664f95f45ebcd4d69926b7ff5 Mon Sep 17 00:00:00 2001 From: Chris Hernandez Date: Mon, 30 Sep 2024 11:04:54 -0400 Subject: [PATCH] includes requested changes --- broker/consumer/lvk/vm_startup.sh | 2 +- broker/setup_broker/lvk/setup_broker.sh | 16 ++++++---------- .../lvk/templates/bq_lvk_alerts_schema.json | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/broker/consumer/lvk/vm_startup.sh b/broker/consumer/lvk/vm_startup.sh index 423073cd..3dfcb037 100644 --- a/broker/consumer/lvk/vm_startup.sh +++ b/broker/consumer/lvk/vm_startup.sh @@ -23,7 +23,7 @@ fi #--- GCP resources used in this script broker_bucket="${PROJECT_ID}-${survey}-broker_files" -PS_TOPIC_DEFAULT="${survey}-alerts_raw" +PS_TOPIC_DEFAULT="${survey}-alerts" # use test resources, if requested if [ "$testid" != "False" ]; then broker_bucket="${broker_bucket}-${testid}" diff --git a/broker/setup_broker/lvk/setup_broker.sh b/broker/setup_broker/lvk/setup_broker.sh index 71a18515..437d41ca 100755 --- a/broker/setup_broker/lvk/setup_broker.sh +++ b/broker/setup_broker/lvk/setup_broker.sh @@ -55,9 +55,8 @@ if [ "${teardown}" != "True" ]; then # create bigquery dataset and table bq --location="${region}" mk --dataset "${bq_dataset}" - cd templates || exit - bq mk --table "${PROJECT_ID}:${bq_dataset}.${alerts_table}" "bq_${survey}_${alerts_table}_schema.json" - cd .. || exit + cd templates && bq mk --table "${PROJECT_ID}:${bq_dataset}.${alerts_table}" "bq_${survey}_${alerts_table}_schema.json" || exit 5 + cd .. || exit 5 # create broker bucket and upload files echo "Creating broker_bucket and uploading files..." @@ -94,13 +93,10 @@ echo "Configuring VMs..." #--- Deploy Cloud Functions echo echo "Configuring Cloud Functions..." -cd .. && cd .. || exit -cd cloud_functions && cd lvk || exit +cd .. && cd .. && cd cloud_functions && cd lvk || exit 5 #--- BigQuery storage cloud function -cd store_BigQuery || exit -./deploy.sh "$testid" "$teardown" "$survey" +cd store_BigQuery && ./deploy.sh "$testid" "$teardown" "$survey" || exit 5 -#--- return to setup_broker directory -cd .. && cd .. || exit -cd .. && cd setup_broker || exit +#--- return to setup_broker/lvk directory +cd .. && cd .. && cd .. && cd setup_broker && cd lvk || exit 5 diff --git a/broker/setup_broker/lvk/templates/bq_lvk_alerts_schema.json b/broker/setup_broker/lvk/templates/bq_lvk_alerts_schema.json index d2ad99c0..7c3fe186 100644 --- a/broker/setup_broker/lvk/templates/bq_lvk_alerts_schema.json +++ b/broker/setup_broker/lvk/templates/bq_lvk_alerts_schema.json @@ -89,13 +89,13 @@ "type": "TIMESTAMP" }, { - "description": "estimation of the frequency of the signal's main component", + "description": "estimation of the frequency of the signal's main component [Hz]", "mode": "NULLABLE", "name": "central_frequency", "type": "INTEGER" }, { - "description": "Probability, under the assumption that the source is not noise, that at least one of the compact objects was a neutron star, that the system ejected a non-zero amount of neutron star matter, and that at least one of the compact objects has mass in the range 3-5 solar masses, respectively", + "description": "Probabilities, under the assumption that the source is not noise, regarding the physical characteristics of the event's progenitor and possible remnants.", "fields": [ { "description": "Probability that at least one of the compact objects was a neutron star",