From 563dbfa32d5c6cf3206e8f2abce92954f0ee5f35 Mon Sep 17 00:00:00 2001 From: Max Novelli Date: Mon, 8 Jul 2024 11:38:00 +0200 Subject: [PATCH 1/2] added base and coda configuration examples --- resources/base.configuration.json.example | 98 ++++++++++++++++++++ resources/coda.configuration.json.example | 106 ++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 resources/base.configuration.json.example create mode 100644 resources/coda.configuration.json.example diff --git a/resources/base.configuration.json.example b/resources/base.configuration.json.example new file mode 100644 index 0000000..756a8c9 --- /dev/null +++ b/resources/base.configuration.json.example @@ -0,0 +1,98 @@ +{ + "instrument" : "coda", + "selector" : "", + "schema" : { + "pid" : { + "field_type" : "high_level", + "machine_name" : "pid", + "source" : "NXS:/entry/experiment_identifier", + "type" : "string" + }, + "proposal_id" : { + "field_type" : "high_level", + "machine_name" : "proposalId", + "source" : "NXS:/entry/experiment_identifier", + "type" : "string" + }, + "principal_investigator" : { + "field_type" : "high_level", + "machine_name" : "principalInvestigator", + "source" : ["SC:proposals/:pi_firstname","SC:proposals/:pi_lastname"], + "type" : "string" + }, + "owner" : { + "field_type" : "high_level", + "machine_name" : "owner", + "source" : ["SC:proposals/:pi_firstname","SC:proposals/:pi_lastname"], + "type" : "string" + }, + "owner_email" : { + "field_type" : "high_level", + "machine_name" : "ownerEmail", + "source" : "SC:proposals/:pi_email", + "type" : "string" + }, + "dataset_name" : { + "field_type" : "high_level", + "machine_name" : "datasetName", + "source" : "NXS:/entry/title", + "type" : "string" + }, + "instrument" : { + "machine_name" : "instrument_name", + "source" : "NXS:/entry/instrument/name", + "type" : "string", + "variable" : true + }, + "instrument_id" : { + "field_type" : "high_level", + "machine_name" : "instrumentId", + "source" : "SC:instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D:id", + "type" : "string" + }, + "location" : { + "field_type" : "high_level", + "machine_name" : "location", + "source" : "ESS:CODA:", + "type" : "string" + }, + "start_time" : { + "field_type" : "scientific_metadata", + "machine_name" : "start_time", + "human_name" : "Start Time", + "source" : "NXS:/entry/start_time", + "transformation" : "timestamp_to_iso8601", + "type" : "date" + }, + "end_time" : { + "field_type" : "scientific_metadata", + "machine_name" : "end_time", + "human_name" : "End Time", + "source" : "NXS:/entry/end_time", + "transformation" : "timestamp_to_iso8601", + "type" : "date" + }, + "run_number" : { + "field_type" : "scientific_metadata", + "machine_name" : "run_number", + "human_name" : "Run Number", + "source" : "NXS:/entry/entry_identifier", + "type" : "integer" + }, + "job_id" : { + "field_type" : "scientific_metadata", + "machine_name" : "job_id", + "human_name" : "Job Id", + "source" : "NXS:/entry/entry_identifier_uuid", + "type" : "integer" + }, + "acquisition_team_members" : { + "field_type" : "scientific_metadata", + "machine_name" : "acquisition_team_members", + "human_name" : "Acquisition Team Members", + "source" : "NXS:/entry/user_*/name", + "separator" : " , ", + "type" : "string" + } +} +} diff --git a/resources/coda.configuration.json.example b/resources/coda.configuration.json.example new file mode 100644 index 0000000..6fd4002 --- /dev/null +++ b/resources/coda.configuration.json.example @@ -0,0 +1,106 @@ +{ + "instrument": "coda", + "selector": "file:starts_with:/ess/data/coda", + "schema": { + "pid": { + "field_type": "high_level", + "machine_name": "pid", + "source": "NXS:/entry/experiment_identifier", + "type": "string" + }, + "proposal_id": { + "field_type": "high_level", + "machine_name": "proposalId", + "source": "NXS:/entry/experiment_identifier", + "type": "string", + "variable": true + }, + "principal_investigator": { + "field_type": "high_level", + "machine_name": "principalInvestigator", + "source": [ + "SC:proposals/:pi_firstname", + "SC:proposals/:pi_lastname" + ], + "separator" : " ", + "type": "string" + }, + "owner": { + "field_type": "high_level", + "machine_name": "owner", + "source": [ + "SC:proposals/:pi_firstname", + "SC:proposals/:pi_lastname" + ], + "type": "string" + }, + "owner_email": { + "field_type": "high_level", + "machine_name": "ownerEmail", + "source": "SC:proposals/:pi_email", + "type": "string" + }, + "dataset_name": { + "field_type": "high_level", + "machine_name": "datasetName", + "source": "NXS:/entry/title", + "type": "string" + }, + "instrument": { + "machine_name": "instrument_name", + "source": "NXS:/entry/instrument/name", + "type": "string", + "variable": true + }, + "instrument_id": { + "field_type": "high_level", + "machine_name": "instrumentId", + "source": "SC:instruments?filter=%7B%22where%22%20%3A%20%7B%20%22name%22%20%3A%20%22coda%22%20%7D%20%7D:id", + "type": "string" + }, + "location": { + "field_type": "high_level", + "machine_name": "location", + "source": "ESS:CODA:", + "type": "string" + }, + "start_time": { + "field_type": "scientific_metadata", + "machine_name": "start_time", + "human_name": "Start Time", + "source": "NXS:/entry/start_time", + "transformation": "timestamp_to_iso8601", + "type": "date" + }, + "end_time": { + "field_type": "scientific_metadata", + "machine_name": "end_time", + "human_name": "End Time", + "source": "NXS:/entry/end_time", + "transformation": "timestamp_to_iso8601", + "type": "date" + }, + "run_number": { + "field_type": "scientific_metadata", + "machine_name": "run_number", + "human_name": "Run Number", + "source": "NXS:/entry/entry_identifier", + "type": "integer" + }, + "job_id": { + "field_type": "scientific_metadata", + "machine_name": "job_id", + "human_name": "Job Id", + "source": "NXS:/entry/entry_identifier_uuid", + "type": "integer" + }, + "acquisition_team_members": { + "field_type": "scientific_metadata", + "machine_name": "acquisition_team_members", + "human_name": "Acquisition Team Members", + "source": "NXS:/entry/user_*/name", + "separator": " , ", + "type": "string" + } + } +} From de30a144845dabafe98b9494e842f9c79f91382f Mon Sep 17 00:00:00 2001 From: Max Novelli Date: Mon, 8 Jul 2024 15:07:17 +0200 Subject: [PATCH 2/2] added field named type and fixed some typo --- resources/coda.configuration.json.example | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/coda.configuration.json.example b/resources/coda.configuration.json.example index 6fd4002..e5f5e8d 100644 --- a/resources/coda.configuration.json.example +++ b/resources/coda.configuration.json.example @@ -5,7 +5,13 @@ "pid": { "field_type": "high_level", "machine_name": "pid", - "source": "NXS:/entry/experiment_identifier", + "source": "NXS:/entry/entry_identifier_uuid", + "type": "string" + }, + "type" : { + "field_type": "high_level", + "machine_name": "type", + "value": "raw", "type": "string" }, "proposal_id": {