Schema files
Below are the JSON schemas for every file type, plus the definitions schema file
that is used by several other schema files
Corresponding to a file type
dataloggers_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Datalogger",
"description": "Datalogger Instrument Components",
"type": "object",
"required": ["format_version", "datalogger_base"],
"properties": {
"format_version" : {"$ref" : "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"yaml_anchors" : {"$ref": "definitions.schema.json#/yaml_anchors"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"datalogger_base": {"$ref": "#/definitions/base" }
},
"additionalProperties" : false,
"definitions": {
"common_properties": {
"description": "list of common properties in {element}, modifications, base, definition, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"sample_rate": {"type": "number", "minimum": 0},
"correction": {"$ref": "#/definitions/correction"}
}
},
"datalogger" : {
"description" : "datalogger definition (base+configuration)",
"type": "object",
"required": ["base"],
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref": "#/definitions/modifications"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"notes": {"$ref": "definitions.schema.json#/note_list"},
"serial_number": {"type": "string"}
},
"additionalProperties": false
},
"modifications" : {
"description" : "datalogger modifications, same as definition except base not required and not modifications",
"type": "object",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"serial_number": {"type": "string"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"sample_rate": {"type": "number", "minimum": 0},
"correction": {"$ref": "#/definitions/correction"}
},
"additionalProperties" : false
},
"base" : {
"description": "Datalogger specification",
"required": ["sample_rate",
"equipment",
"stages"],
"properties": {
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"},
"sample_rate": {"type": "number", "minimum": 0},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"notes": {"$ref": "definitions.schema.json#/note_list"},
"correction": {"$ref": "#/definitions/correction"}
},
"additionalProperties": false
},
"configurations_map": {
"description": "Map of configuration names for a given datalogger",
"patternProperties": {"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition" }}
},
"configuration_definition" : {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"sample_rate": {"type": "number", "minimum": 0},
"correction": {"$ref": "#/definitions/correction"}
},
"additionalProperties": false
},
"correction": {
"type" : "number",
"description": "If boolean is True ignore all filter (stage) delays, set them to zero and make this total delay in last filter (stage)"
}
}
}
filter files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Filter definitions",
"description": "Independent file for filter description.",
"type": "object",
"required": [ "format_version"],
"properties": {
"format_version" : {"$ref" : "#/format_version"},
"revision" : {"$ref" : "definitions.schema.json#/revision"},
"yaml_anchors" : {"$ref" : "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"filter" : {"$ref" : "#/definitions/filter"}
},
"additionalProperties" : false,
"format_version" : {
"type": "string",
"anyOf": [
{"pattern": "^1\\.0$"},
{"$ref": "definitions.schema.json#/format_version"}
]
},
"definitions": {
"filter": {
"type" : "object",
"required" : ["type"],
"properties": {
"type": {
"enum": [
"PolesZeros",
"FIR",
"Coefficients",
"ResponseList",
"Polynomial",
"ADCONVERSION",
"ANALOG",
"DIGITAL"
]
},
"resource_id": {"$ref": "definitions.schema.json#resource_id"},
"custom_fields": {"$ref": "definitions.schema.json#custom_fields"}
},
"if": {
"properties": {"type": {"const": "PolesZeros"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/POLESZEROS"},
"else": {
"if": {
"properties": {"type": {"const": "FIR"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/FIR"},
"else": {
"if": {
"properties": {"type": {"const": "Coefficients"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/COEFFICIENTS"},
"else": {
"if": {
"properties": {"type": {"const": "ResponseList"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/RESPONSELIST"},
"else": {
"if": {
"properties": {"type": {"const": "Polynomial"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/POLYNOMIAL"},
"else": {
"if": {
"properties": {"type": {"const": "ADCONVERSION"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/ADCONVERSION"},
"else": {
"if": {
"properties": {"type": {"const": "ANALOG"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/ANALOG"},
"else": {
"if": {
"properties": {"type": {"const": "DIGITAL"}},
"required": ["type"]
},
"then": {"$ref": "#/definitions/DIGITAL"}
}
}
}
}
}
}
}
},
"POLESZEROS": {
"type" : "object",
"description" : "Poles-zeros response formulation",
"required" : ["type", "poles", "zeros"],
"properties": {
"type": {"enum": ["PolesZeros"] },
"poles": {"$ref": "#/definitions/pole_list"},
"zeros": {"$ref": "#/definitions/zero_list"},
"delay.seconds": {"type": "number"},
"transfer_function_type": {"$ref": "#/definitions/pz_units"},
"normalization_frequency": {"$ref": "#/definitions/norm_freq"},
"normalization_factor": {"$ref": "#/definitions/norm_fact"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"FIR": {
"type" : "object",
"description" : "FIR response formulation",
"required": ["type", "symmetry", "coefficients", "delay.samples"],
"properties" : {
"type": {"enum": ["FIR"] },
"symmetry": {"$ref": "#/definitions/symmetry"},
"coefficient_divisor": {"type": "number", "description": "number to divide coefficients by to get sum=1"},
"coefficients": {"$ref": "#/definitions/coefficient_list"},
"delay.samples": {"type": "number"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"COEFFICIENTS": {
"type" : "object",
"description" : "Coefficients response formulation (often used for IIRs)",
"required" : ["type", "numerator_coefficients", "denominator_coefficients"],
"properties" : {
"type": {"enum": ["Coefficients"]},
"numerator_coefficients": {"$ref": "#/definitions/coefficient_list"},
"denominator_coefficients": {"$ref": "#/definitions/coefficient_list"},
"delay.samples": {"type": "number"},
"transfer_function_type": {"$ref": "#/definitions/coefficients_transfer_function_type"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"RESPONSELIST": {
"type" : "object",
"description" : "Response list formulation",
"required" : [ "type", "elements"],
"properties" : {
"type": {"enum": ["ResponseList"]},
"elements": {"$ref": "#/definitions/response_element_list"},
"delay.seconds": {"type": "number"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"POLYNOMIAL": {
"type": "object",
"description": "NEVER TESTED",
"required": ["type", "coefficients", "frequency_lower_bound",
"frequency_upper_bound", "approximation_lower_bound",
"approximation_upper_bound", "maximum_error"],
"properties": {
"type": {"enum": ["Polynomial"]},
"coefficients": {"$ref": "#/definitions/polynomial_coefficients_list"},
"frequency_lower_bound": {"$ref": "#/definitions/frequency_bound"},
"frequency_upper_bound": {"$ref": "#/definitions/frequency_bound"},
"approximation_lower_bound": {"type": "number"},
"approximation_upper_bound": {"type": "number"},
"maximum_error": {"type": "number"},
"approximation_type": {"enum": ["MACLAURIN"]},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"ADCONVERSION": {
"type": "object",
"description": "A/D specifics",
"required": ["type", "v_minus", "v_plus",
"counts_minus", "counts_plus"],
"properties" : {
"type": {"enum": ["ADCONVERSION"]},
"delay.samples": {"type": "number"},
"v_minus": {"type": "number"},
"v_plus": {"type": "number"},
"counts_minus": {"type": ["number", "string"]},
"counts_plus": {"type": ["number", "string"]},
"counts_dtype": {"type": "string",
"enum": ["int16", "int24", "int32", "int64",
"uint16", "uint24", "uint32", "uint64"]
},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"ANALOG": {
"type": "object",
"description": "ANALOG filter (map into PoleZeros with no poles or zeros)",
"required": ["type"],
"properties" : {
"type": {"enum": ["ANALOG"]},
"delay.seconds": {"type": "number"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"DIGITAL": {
"type": "object",
"description": "DIGITAL filter (map into Coefficients with no coefficients)",
"required": ["type"],
"properties" : {
"type": {"enum": ["DIGITAL"]},
"delay.samples": {"type": "number"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"filter_wo_required_fields": {
"type" : "object",
"description" : "Generic filter for attribute modifications in channel_modifications",
"properties": {
"type": {"enum": ["PolesZeros", "FIR", "Coefficients", "ResponseList", "ADCONVERSION", "ANALOG", "DIGITAL"]},
"delay.samples": {"type": "number"},
"delay.seconds": {"type": "number"},
"transfer_function_type": {"$ref": "#/definitions/pz_units"},
"normalization_frequency": {"$ref": "#/definitions/norm_freq"},
"normalization_factor": {"$ref": "#/definitions/norm_fact"},
"poles": {"$ref": "#/definitions/pole_list"},
"zeros": {"$ref": "#/definitions/zero_list"},
"symmetry": {"$ref": "#/definitions/symmetry"},
"coefficient_divisor": {"type": "number"},
"coefficients": {"$ref": "#/definitions/coefficient_list"},
"numerator_coefficients": {"$ref": "#/definitions/coefficient_list"},
"denominator_coefficients":{"$ref": "#/definitions/coefficient_list"},
"elements": {"$ref": "#/definitions/response_element_list"},
"input_full_scale": {"$ref": "#/definitions/AD_full_scale"},
"output_full_scale": {"$ref": "#/definitions/AD_full_scale"},
"resource_id": {"type": "string"}
},
"additionalProperties": false
},
"pz_units": {
"type" : "string",
"enum" : ["LAPLACE (RADIANS/SECOND)", "LAPLACE (HERTZ)", "DIGITAL (Z-TRANSFORM)"],
"default" : "LAPLACE (RADIANS/SECOND)"
},
"norm_freq": {
"type": "number",
"description": "If undefined, will use gain:frequency",
"minimum" : 0.0
},
"norm_fact": {
"type": "number",
"description": "If undefined, will be calculated from normalization_frequency and poles and zeros",
"minimum" : 0.0
},
"pole_list": {
"description": "Instrument poles (rad/s)",
"type": "array",
"items": { "$ref" : "#/definitions/complex_number"}
},
"zero_list": {
"description": "Instrument zeros (rad/s)",
"type": "array",
"items": { "$ref" : "#/definitions/complex_number"}
},
"complex_number": {
"type": "string",
"description": "complex number as x + yj",
"pattern": "^[+-]?(([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)[ ]*[+-][ ]*([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)j)|[+-]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+|[0-9]+)j"
},
"symmetry": {
"type": "string",
"enum": ["NONE", "EVEN", "ODD"]
},
"coefficient_list": {
"type": "array",
"minItems": 0,
"items" : { "type" : "number" }
},
"coefficients_transfer_function_type": {
"type" : "string",
"enum" : [ "ANALOG (RADIANS/SECOND)", "ANALOG (HERTZ)", "DIGITAL"]
},
"polynomial_coefficients_list": {
"type" : "array",
"minItems": 2,
"items" : { "$ref" : "#/definitions/polynomial_coefficient"}
},
"polynomial_coefficient": {
"type" : "object",
"description" : "Polynomial filter coefficient",
"required": ["value"],
"properties": {
"value": {"type": "number"},
"plus_error": {"type": "number"},
"minus_error": {"type": "number"},
"measurement_method": {"type": "string"},
"number": {"type": "integer", "minimum": 0}
},
"additionalProperties": false
},
"frequency_bound": {
"type" : "object",
"description" : "Upper or lower frequency bound",
"required": ["value"],
"properties": {
"value": {"type": "number"},
"unit": {"type": "string", "enum": ["HERTZ"]},
"plus_error": {"type": "number"},
"minus_error": {"type": "number"},
"measurement_method": {"type": "string"}
},
"additionalProperties": false
},
"response_element_list": {
"type" : "array",
"items" : {
"type" : "array",
"description" : "[frequency (Hz), amplitude, phase (degrees)]",
"minItems": 3,
"maxItems": 3,
"items": {"type": "number"}
}
},
"AD_full_scale": {
"type": "number",
"description": "Used for ADCONVERSION, ..."
}
}
}
instrumentation_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Instrumentation",
"description": "OBS operator instruments and their components",
"type": "object",
"required": ["format_version", "revision", "instrumentation_base"],
"properties": {
"format_version" : {"$ref" : "definitions.schema.json#/format_version"},
"revision" : {"$ref" : "definitions.schema.json#/revision"},
"yaml_anchors" : {"$ref" : "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"instrumentation_base": {"$ref" : "#/definitions/base" }
},
"additionalProperties" : false,
"definitions": {
"base_properties": {
"description": "Common properties in {element}, modifications, base, definition, and configuration_definition. Unused because 'allOf' for makes ugly schema validation",
"properties": {
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"channels": {"$ref": "#/definitions/channels"}
}
},
"instrumentation" : {
"description" : "Configuration of a generic instrumentation description",
"type": "object",
"required": ["base"],
"properties": {
"base": {"type": ["string", "object"] },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref": "#/definitions/modifications"},
"channel_modifications": {"$ref": "#/definitions/channel_mods"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"serial_number": {"type": "string"},
"datalogger_configuration": {"type": "string"},
"pressure_sensor_configuration": {"type": "string"},
"seismic_sensor_configuration": {"type": "string"},
"datalogger_serial_number": {"type": "string"},
"seismic_sensor_serial_number": {"type": "string"},
"pressure_sensor_serial_number": {"type": "string"}
},
"if": {"properties": {"base": {"type": "string"}}},
"then": {"properties": {"base": {"type": "string"}}},
"else": {"properties": {"base": {"$ref": "#/definitions/base"}}},
"additionalProperties": false
},
"base" : {
"description" : "Generic instrumentation description",
"type": "object",
"required": ["equipment", "channels"],
"properties": {
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"channels": {"$ref": "#/definitions/channels"}
},
"additionalProperties" : false
},
"modifications": {
"type" : "object",
"description" : "Instrumentation modifier",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"channels": {"$ref": "#/definitions/channels_modif"}
},
"additionalProperties" : false
},
"configurations_map": {
"description": "Map of configuration names for a given stage",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition"}}
},
"configuration_definition": {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"channels": {"$ref": "#/definitions/channels_config"}
},
"additionalProperties": false
},
"channel_mods": {
"type": "object",
"description": "individual changes specified by das channel",
"patternProperties": {
"^[N, E, Z, 1, 2, 3, G, O, H, \\*]-[0-9, \\*]+$": { "$ref": "#/definitions/channel_modif"},
"^[N, E, Z, 1, 2, 3, G, O, H, \\*]": { "$ref": "#/definitions/channel_modif"},
"SEISMIC": { "$ref": "#/definitions/channel_modif"},
"PRESSURE": { "$ref": "#/definitions/channel_modif"}
},
"additionalProperties": false
},
"channel_modif": {
"type": "object",
"description": "DAS channel, modifications",
"properties" : {"$ref": "#/definitions/channel_modif_properties"},
"additionalProperties" : false
},
"channels": {
"type": "object",
"required": ["default"],
"properties": {
"default": { "$ref": "#/definitions/channel_default"}
},
"patternProperties": {
"^(?!default$).*": { "$ref": "#/definitions/channel"}
},
"additionalProperties": false
},
"channels_modif": {
"description": "exactly 'channels' without required (there has to be a better way to do this!)",
"type": "object",
"properties": {
"default": { "$ref": "#/definitions/channel_default"}
},
"patternProperties": {
"^(?!default$).*": { "$ref": "#/definitions/channel"}
},
"additionalProperties": false
},
"channels_config": {
"type": "object",
"definition": "modifying channels in configurations",
"properties": {
"default": { "$ref": "#/definitions/channel"}
},
"patternProperties": {
"^(?!default$).*": { "$ref": "#/definitions/channel"}
},
"additionalProperties": false
},
"channel_default": {
"type": "object",
"description": "Description of default DAS channel",
"required": ["datalogger", "sensor"],
"properties" : {"$ref": "#/definitions/channel_properties"},
"additionalProperties": false
},
"channel": {
"type": "object",
"description": "Description of one DAS channel (overwrites corresponding channel default for that channel)",
"properties" : {"$ref": "#/definitions/channel_properties"},
"additionalProperties": false
},
"channel_properties": {
"datalogger" : {"$ref": "datalogger_base.schema.json#/definitions/modifications"},
"sensor" : {"$ref": "sensor_base.schema.json#/definitions/modifications"},
"orientation": {"$ref": "#/definitions/orientation"},
"preamplifier": {"$ref": "preamplifier_base.schema.json#/definitions/modifications"},
"location_code": {"type": "string"},
"restricted_status": {"$ref": "definitions.schema.json#restricted_status"},
"source_id": {"$ref": "definitions.schema.json#source_id"},
"identifiers": {"$ref": "definitions.schema.json#identifiers"},
"external_references": {"$ref": "definitions.schema.json#external_references"},
"comments" : {"$ref": "definitions.schema.json#/comments"},
"extras": {"$ref": "definitions.schema.json#/extras"},
"start_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"end_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"extras": {"$ref": "definitions.schema.json#/extras"},
"replace_datalogger" : {"$ref": "datalogger_base.schema.json#/definitions/modifications"},
"replace_sensor" : {"$ref": "sensor_base.schema.json#/definitions/modifications"},
"replace_orientation": {"$ref": "#/definitions/orientation"},
"replace_preamplifier": {"$ref": "preamplifier_base.schema.json#/definitions/modifications"},
"replace_identifiers": {"$ref": "definitions.schema.json#identifiers"},
"replace_external_references": {"$ref": "definitions.schema.json#external_references"},
"replace_comments" : {"$ref": "definitions.schema.json#/comments"},
"replace_extras": {"$ref": "definitions.schema.json#/extras"}
},
"channel_modif_properties": {
"datalogger" : {"$ref": "datalogger_base.schema.json#/definitions/modifications"},
"sensor" : {"$ref": "sensor_base.schema.json#/definitions/modifications"},
"orientation": {"$ref": "#/definitions/orientation_modifications"},
"preamplifier": {"$ref": "preamplifier_base.schema.json#/definitions/modifications"},
"location_code": {"type": "string"},
"restricted_status": {"$ref": "definitions.schema.json#restricted_status"},
"source_id": {"$ref": "definitions.schema.json#source_id"},
"identifiers": {"$ref": "definitions.schema.json#identifiers"},
"external_references": {"$ref": "definitions.schema.json#external_references"},
"comments" : {"$ref": "definitions.schema.json#/comments"},
"extras": {"$ref": "definitions.schema.json#/extras"},
"start_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"end_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"extras": {"$ref": "definitions.schema.json#/extras"},
"replace_datalogger" : {"$ref": "datalogger_base.schema.json#/definitions/modifications"},
"replace_sensor" : {"$ref": "sensor_base.schema.json#/definitions/modifications"},
"replace_orientation": {"$ref": "#/definitions/orientation"},
"replace_preamplifier": {"$ref": "preamplifier_base.schema.json#/definitions/modifications"},
"replace_identifiers": {"$ref": "definitions.schema.json#identifiers"},
"replace_external_references": {"$ref": "definitions.schema.json#external_references"},
"replace_comments" : {"$ref": "definitions.schema.json#/comments"},
"replace_extras": {"$ref": "definitions.schema.json#/extras"}
},
"old_orientation" : {
"type" : "object",
"description": "GET RID OF THIS! (if all tests pass)",
"patternProperties": {
"^[123HGNEZ]$": { "$ref": "#/definitions/orientation_coordinates"}
},
"additionalProperties": false
},
"orientation": {
"type": "object",
"required": ["code"],
"properties": {
"code": {"type" :"string",
"enum": ["1", "2", "3", "H", "G", "O", "N", "X", "Y", "E", "Z"]},
"azimuth.deg": {"$ref" :"definitions.schema.json#azimuth.deg"},
"dip.deg": {"$ref" :"definitions.schema.json#dip.deg"}
},
"additionalProperties": false
},
"orientation_modifications": {
"type": "object",
"properties": {
"code": {"type" :"string",
"enum": ["1", "2", "3", "H", "G", "O", "N", "X", "Y", "E", "Z"]},
"azimuth.deg": {"$ref" :"definitions.schema.json#azimuth.deg"},
"dip.deg": {"$ref" :"definitions.schema.json#dip.deg"}
},
"additionalProperties": false
}
}
}
location_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Location Base",
"description": "location_base file",
"type": "object",
"required": ["format_version", "location_base"],
"properties": {
"format_version" : {"$ref": "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"location_base": {"$ref": "#/definitions/base"}
},
"additionalProperties" : false,
"definitions": {
"base_properties": {
"description": "list of common properties in {element}, modifications, base, definition, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"uncertainties.m" : {"$ref": "#/definitions/GeoJSON_m" },
"measurement_method" : {"$ref": "#/definitions/GeoJSON_string" },
"depth.m" : {"type": "number", "description" : "depth beneath the seafloor (m)"},
"geology" : {"type": "string", "default" : "unknown"},
"vault" : {"type": "string", "default" : "Sea floor"},
"notes": {"$ref": "definitions.schema.json#/note_list"}
}
},
"location": {
"description": "location definition (base + configuration)",
"type" : "object",
"required": [
"base",
"position"
],
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref" : "#/definitions/modifications" },
"notes": {"$ref": "definitions.schema.json#/note_list"},
"water_level.m": {"type": "number"},
"position": {"$ref": "#/definitions/GeoJSON" }
},
"additionalProperties" : false
},
"modifications" : {
"description" : "location modifications",
"type": "object",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"position": {"$ref": "#/definitions/GeoJSON" },
"configuration": {"type": ["string", "null"]},
"uncertainties.m" : {"$ref": "#/definitions/GeoJSON_m" },
"measurement_method" : {"$ref": "#/definitions/GeoJSON_string" },
"depth.m" : {"type": "number", "description" : "depth beneath the seafloor (m)"},
"geology" : {"type": "string", "default" : "unknown"},
"vault" : {"type": "string", "default" : "Sea floor"},
"water_level.m": {"type": "number"},
"notes": {"$ref": "definitions.schema.json#/note_list"}
},
"additionalProperties" : false
},
"base" : {
"description": "Location specification",
"type" : "object",
"required": ["uncertainties.m",
"depth.m"],
"properties": {
"depth.m" : {"type": "number", "description" : "depth beneath the seafloor (m)"},
"geology" : {"type": "string", "default" : "unknown"},
"vault" : {"type": "string", "default" : "Sea floor"},
"uncertainties.m" : {"$ref": "#/definitions/GeoJSON_m" },
"measurement_method" : {"$ref": "#/definitions/GeoJSON_string" },
"water_level.m": {"type": "number"},
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"},
"notes": {"$ref": "definitions.schema.json#/note_list"}
},
"additionalProperties" : false
},
"configurations_map": {
"description": "Map of configuration names",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition"}
}
},
"configuration_definition" : {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"uncertainties.m" : {"$ref": "#/definitions/GeoJSON_m" },
"measurement_method" : {"$ref": "#/definitions/GeoJSON_string" },
"depth.m" : {"type": "number", "description" : "depth beneath the seafloor (m)"},
"geology" : {"type": "string", "default" : "unknown"},
"vault" : {"type": "string", "default" : "Sea floor"},
"water_level.m": {"type": "number"},
"notes": {"$ref": "definitions.schema.json#/note_list"}
},
"additionalProperties": false
},
"GeoJSON": {
"type": "object",
"description": "Object position",
"required": ["lat.deg","lon.deg","elev.m"],
"properties": {
"lat.deg": {"$ref": "#/definitions/lat_lon_deg"},
"lon.deg": {"$ref": "#/definitions/lat_lon_deg"},
"elev.m": {"type" :"number"}
},
"additionalProperties" : false
},
"GeoJSON_m": {
"type": "object",
"description": "Position uncertainties in meters",
"required": ["lat","lon","elev"],
"properties": {
"lat": {"type": "number"},
"lon": {"type": "number"},
"elev": {"type" :"number"}
},
"additionalProperties" : false
},
"lat_lon_deg": {
"description": "Accepted latitude/longitude values",
"anyOf": [
{"type": "number", "minimum": -180, "maximum": 180},
{ "$ref": "#/definitions/lat_lon_string"}
]
},
"lat_lon_string": {
"description": "String representation of lat/lon: '{latd}.xxx', '{latd}_{latm}.xxx', '{latd}_{latm}_{lats}.xxx'",
"type": "string",
"pattern": "^-?[0-9]{1,3}(?:_[0-9]{1,2})*(?:\\.[0-9]+)?$"
},
"GeoJSON_string": {
"description": "Position measurement method(s)",
"oneOf": [
{ "type": "string"},
{
"type": "object",
"required": ["lat","lon","elev"],
"properties": {
"lat": {"type": "string"},
"lon": {"type": "string"},
"elev": {"type" :"string"}
},
"additionalProperties" : false
}
]
}
}
}
network files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Network Information",
"description": "allows separate network files to be validated",
"type": "object",
"required": ["format_version", "network"],
"properties": {
"format_version" : {"$ref": "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"network" : {"$ref": "#/definitions/network"}
},
"additionalProperties" : false,
"definitions": {
"network" : {
"description": "Network information in FDSN nomenclature",
"type": "object",
"required" : [
"code",
"start_date",
"end_date",
"description"
],
"properties" : {
"code" : {"type": "string", "description": "FDSN network code or 'XX'"},
"description": {"type": "string" , "description": "FDSN network name"},
"end_date": {"$ref": "definitions.schema.json#/any_date_or_null"},
"start_date": {"$ref": "definitions.schema.json#/any_date"},
"operators": {"$ref": "operator.schema.json#definitions/operators"},
"restricted_status": {"$ref": "definitions.schema.json#/restricted_status"},
"source_id": {"$ref": "definitions.schema.json#source_id"},
"identifiers": {"$ref": "definitions.schema.json#identifiers"},
"comments": {"$ref": "definitions.schema.json#/comments"}
},
"additionalProperties" : false
}
}
}
operator files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Operator",
"description": "StationXML Operator file",
"type": "object",
"required": ["format_version", "operator"],
"properties": {
"format_version": {"$ref": "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"operator": {"$ref": "#/definitions/operator"}
},
"additionalProperties" : false,
"definitions": {
"operators" : {
"description": "list of operator",
"type": "array",
"items": {"$ref": "#/definitions/operator"}
},
"operator" : {
"description": "StationXML Operator information",
"type": "object",
"required": ["agency"],
"properties": {
"agency": {"type": "string", "description": "Agency name"},
"contacts": {"$ref": "#/definitions/contacts"},
"website": {"$ref": "definitions.schema.json#/website"}
},
"additionalProperties" : false
},
"contacts": {
"description": "StationXML Operator:Contacts",
"type": "array",
"items": {"$ref": "person.schema.json#/definitions/person"}
}
}
}
person files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"description": "StationXML Person file",
"type": "object",
"required": ["format_version", "person"],
"properties": {
"format_version" : {"$ref": "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"person" : {"$ref": "#/definitions/person"}
},
"additionalProperties" : false,
"definitions": {
"person" : {
"type": "object",
"description": "StationXML Person object",
"required": ["names"],
"properties": {
"names": {"$ref": "#/definitions/names"},
"agencies": {"$ref": "#/definitions/agencies"},
"emails": {"$ref": "#/definitions/emails"},
"phones": {"$ref": "#/definitions/phones"}
},
"additionalProperties": false
},
"names" : {
"description": "StationXML Person:Names",
"type": "array",
"items" : {"type": "string"}
},
"agencies" : {
"description": "StationXML Person:Agency",
"type": "array",
"items" : {"type": "string"}
},
"emails" : {
"description": "StationXML Person:Email",
"type": "array",
"items" : {"type": "string", "format": "email"}
},
"phones" : {
"description": "StationXML Person:Phone",
"type": "array",
"items" : {"$ref": "definitions.schema.json#/phone"}
}
}
}
preamplifier_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Instrument Components",
"description": "OBS operator instrument components",
"type": "object",
"required": ["format_version", "preamplifier_base"],
"properties": {
"format_version": {"$ref": "definitions.schema.json#/format_version"},
"revision": {"$ref": "definitions.schema.json#/revision"},
"yaml_anchors": {"$ref": "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"preamplifier_base": {"$ref": "#/definitions/base" }
},
"additionalProperties" : false,
"definitions": {
"common_properties": {
"description": "list of common properties in {element}, modifications, base, definition, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications"}
}
},
"preamplifier" : {
"description" : "preamplifier definition (base+configuration)",
"type": "object",
"required": ["base"],
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref": "#/definitions/modifications"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"serial_number": {"type": "string"}
},
"additionalProperties" : false
},
"modifications" : {
"description" : "preamplifier modifications, same as definition except base not required",
"type": "object",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"serial_number": {"type": "string"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications"}
},
"additionalProperties" : false
},
"base" : {
"description": "Preamplifier specification",
"required": ["equipment",
"stages"],
"properties": {
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications"},
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"}
},
"additionalProperties": false
},
"configurations_map": {
"description": "Map of configuration names",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition"}
}
},
"configuration_definition" : {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications"}
},
"additionalProperties": false
}
}
}
sensor_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Sensor",
"description": "Sensor Instrument Components",
"type": "object",
"required": ["format_version", "sensor_base"],
"properties": {
"format_version": {"$ref" : "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"yaml_anchors": {"$ref": "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"sensor_base": {"$ref": "#/definitions/base" }
},
"additionalProperties" : false,
"definitions": {
"common_properties": {
"description": "list of common properties in {element}, modifications, base, definition, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"seed_codes": {"$ref": "#/definitions/seed_codes"}
}
},
"sensor" : {
"description" : "sensor definition (base+configuration)",
"type": "object",
"required": ["base"],
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref": "#/definitions/modifications"},
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"notes": {"$ref": "definitions.schema.json#/note_list"},
"serial_number": {"type": "string"}
}
},
"modifications" : {
"description" : "sensor modifications: same as definition except base not required",
"type": "object",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"serial_number": {"type": "string"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"seed_codes": {"$ref": "#/definitions/seed_codes"}
},
"additionalProperties" : false
},
"base": {
"description": "Sensor specification",
"required": ["equipment",
"seed_codes",
"stages"],
"properties": {
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"seed_codes": {"$ref": "#/definitions/seed_codes"},
"stages": {"$ref": "stages.schema.json#/definitions/stages" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"notes": {"$ref": "definitions.schema.json#/note_list"},
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"}
},
"additionalProperties": false
},
"configurations_map": {
"description": "Map of configuration names",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition"}
}
},
"configuration_definition" : {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"equipment": {"$ref": "definitions.schema.json#/equipment"},
"stages": {"$ref": "stages.schema.json#/definitions/modifications" },
"stage_modifications": {"$ref": "stages.schema.json#/definitions/stage_modifications" },
"seed_codes": {"$ref": "#/definitions/seed_codes"}
},
"additionalProperties": false
},
"seed_codes" : {
"description": "Seed codes, azimuths and dips associated with a sensor",
"type" : "object",
"required" : ["band",
"instrument"],
"properties" : {
"band": {"$ref": "#/definitions/seed_band_code" },
"instrument": {"$ref": "#/definitions/seed_instrument_code" }
},
"additionalProperties": false
},
"seed_band_code" : {
"type": "string",
"description": "'broadband' for corner period >= 10s, 'shortperiod' for <10s (band code will be adjusted to the sample rate), or a single non-modifiable letter",
"enum": ["broadband", "shortperiod", "A", "I", "O", "L", "S"]
},
"seed_instrument_code": {
"description": "SEED instrument code",
"type": "string",
"pattern": "^[A-Z]$"
},
"seed_orientations_map": {
"description": "permitted orientation codes and their azimuth and dip",
"type": "object",
"patternProperties": {
"^[A-Z0-9]$": {
"type": "object",
"required": ["azimuth.deg", "dip.deg"],
"properties": {
"azimuth.deg": {"$ref": "definitions.schema.json#/azimuth.deg"},
"dip.deg": {"$ref": "definitions.schema.json#/dip.deg"}
}
}
}
}
}
}
stage_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Response",
"description": "OBS instrument/stage response",
"type": "object",
"required": [ "stage_base","format_version" ],
"properties": {
"format_version": {"$ref" : "definitions.schema.json#/format_version"},
"revision": {"$ref" : "definitions.schema.json#/revision"},
"yaml_anchors": {"$ref" : "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"stage_base": {"$ref" : "#/definitions/base"}
},
"additionalProperties" : false,
"definitions": {
"base_properties": {
"description": "list of common properties in {element}, modifications, base, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"input_units": {"$ref": "#/definitions/stage_io_units" },
"output_units": {"$ref": "#/definitions/stage_io_units" },
"gain" : {"$ref": "#/definitions/gain" },
"name": {"type": "string", "description": "BaseFilterType:name"},
"description": {"type": "string", "description": "BaseFilterType:Description"},
"decimation_factor": {"type": "integer", "description": "DecimationType:Factor"},
"decimation_offset": {"type": "integer", "description": "DecimationType:Offset, between 0 and decimation_factor - 1"},
"input_sample_rate": {"type": "number", "description": "DecimationType:InputSampleRate"},
"delay" : {"type": "number", "description": "DecimationType:Delay"},
"filter" : {"$ref": "filter.schema.json#/definitions/filter"},
"calibration_dates": {"$ref": "definitions.schema.json#calibration_dates_def"},
"polarity": {"$ref": "definitions.schema.json#/polarity_codes"},
"resource_id": {"$ref": "definitions.schema.json#/resource_id"}
}
},
"stage" : {
"description" : "stage definition (base+configuration)",
"type": "object",
"required": ["base"],
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref": "#/definitions/modifications"},
"notes" : {"$ref": "definitions.schema.json#/note_list"}
},
"additionalProperties" : false
},
"modifications": {
"type" : "object",
"description" : "Allowed stage modifications",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"input_units": {"$ref": "#/definitions/stage_io_units" },
"output_units": {"$ref": "#/definitions/stage_io_units" },
"gain" : {"$ref": "#/definitions/gain" },
"name": {"type": "string", "description": "BaseFilterType:name"},
"description": {"type": "string", "description": "BaseFilterType:Description"},
"decimation_factor": {"type": "integer", "description": "DecimationType:Factor"},
"decimation_offset": {"type": "integer", "description": "DecimationType:Offset, between 0 and decimation_factor - 1"},
"input_sample_rate": {"type": "number", "description": "DecimationType:InputSampleRate"},
"delay" : {"type": "number", "description": "DecimationType:Delay"},
"filter" : {"$ref": "filter.schema.json#/definitions/filter"},
"calibration_dates": {"$ref": "definitions.schema.json#calibration_dates_def"},
"polarity": {"$ref": "definitions.schema.json#/polarity_codes"},
"resource_id": {"$ref": "definitions.schema.json#/resource_id"}
},
"additionalProperties" : false
},
"base": {
"type" : "object",
"description" : "Response stage",
"required" : [
"input_units",
"output_units",
"gain",
"filter"
],
"properties": {
"input_units": {"$ref": "#/definitions/stage_io_units" },
"output_units": {"$ref": "#/definitions/stage_io_units" },
"gain" : {"$ref": "#/definitions/gain" },
"filter" : {"$ref": "filter.schema.json#/definitions/filter"},
"name": {"type": "string", "description": "BaseFilterType:name"},
"description": {"type": "string", "description": "BaseFilterType:Description"},
"decimation_factor": {"type": "integer", "description": "DecimationType:Factor"},
"decimation_offset": {"type": "integer", "description": "DecimationType:Offset, between 0 and decimation_factor - 1"},
"input_sample_rate": {"type": "number", "description": "DecimationType:InputSampleRate"},
"delay" : {"type": "number", "description": "DecimationType:Delay"},
"calibration_dates": {"$ref": "definitions.schema.json#calibration_dates_def"},
"polarity": {"$ref": "definitions.schema.json#/polarity_codes"},
"resource_id": {"$ref": "definitions.schema.json#/resource_id"},
"configuration_default": {"type": "string"},
"configurations": {"$ref": "#/definitions/configurations_map"}
},
"additionalProperties" : false
},
"configurations_map": {
"description": "Map of configuration names for a given stage",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "#/definitions/configuration_definition"}}
},
"configuration_definition": {
"description": "Configuration-specific properties",
"properties": {
"configuration_description": {"type": "string"},
"input_units": {"$ref": "#/definitions/stage_io_units" },
"output_units": {"$ref": "#/definitions/stage_io_units" },
"gain" : {"$ref": "#/definitions/gain" },
"name": {"type": "string", "description": "BaseFilterType:name"},
"description": {"type": "string", "description": "BaseFilterType:Description"},
"decimation_factor": {"type": "integer", "description": "DecimationType:Factor"},
"decimation_offset": {"type": "integer", "description": "DecimationType:Offset, between 0 and decimation_factor - 1"},
"input_sample_rate": {"type": "number", "description": "DecimationType:InputSampleRate"},
"delay" : {"type": "number", "description": "DecimationType:Delay"},
"filter" : {"$ref": "filter.schema.json#/definitions/filter"},
"calibration_dates": {"$ref": "definitions.schema.json#calibration_dates_def"},
"polarity": {"$ref": "definitions.schema.json#/polarity_codes"},
"resource_id": {"$ref": "definitions.schema.json#/resource_id"}
},
"additionalProperties": false
},
"stage_io_units": {
"type" : "object",
"description": "units entering or exiting a stage",
"required" : ["name"],
"properties": {
"name": { "type" : "string", "$ref": "iris_units.json#/iris_units", "description": "BaseFilterType:name"},
"description": { "type" : "string", "pattern": "[A-Za-z/*12-]+", "description": "BaseFilterType:description"}
},
"additionalProperties" : false
},
"gain" : {
"type" : "object",
"description": "output units / input unit. (Called sensitivity in DBIRD)",
"required" : ["value"],
"properties" : {
"value" : {"type" : "number"},
"frequency" : {
"type" : "number",
"description": "Hz",
"default": 0
}
},
"additionalProperties" : false
}
}
}
subnetwork files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Subnetwork",
"description": "Subnetwork of stations deployed by an OBS operator within a FDSN network $comment: No $id (or id) yet: should be set to a URL at a domain we control (e.g. http://www.ipgp.fr/~crawford/json-schemas/network.schema.json",
"type": "object",
"required": ["format_version", "subnetwork"],
"properties": {
"format_version": {"$ref" : "#/format_version"},
"revision": {"$ref": "definitions.schema.json#/revision"},
"yaml_anchors": {"$ref": "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"subnetwork": {"$ref": "#/definitions/subnetwork"}
},
"additionalProperties" : false,
"format_version" : {
"type": "string",
"anyOf": [
{"pattern": "^1\\.1$"},
{"pattern": "^1\\.2$"},
{"$ref": "definitions.schema.json#/format_version"}
]
},
"definitions" : {
"subnetwork": {
"type": "object",
"required": [
"operators",
"network",
"stations"
],
"properties": {
"operators": {"$ref": "operator.schema.json#/definitions/operators"},
"network": {"$ref": "network.schema.json#/definitions/network"},
"leapseconds": {"$ref": "#/definitions/leapseconds"},
"stations": {"$ref": "#/definitions/stations_map"},
"reference_names": {"$ref": "#/definitions/reference_names"},
"comments": {"$ref": "definitions.schema.json#/comments"},
"extras": {"$ref": "definitions.schema.json#/extras" }
},
"additionalProperties" : false
},
"reference_names": {
"type": "object",
"description": "GRANDFATHERED!",
"properties": {
"campaign": {"$ref": "definitions.schema.json#/reference_name"},
"operator": {"$ref": "definitions.schema.json#/reference_name"}
},
"additionalProperties": false
},
"leapseconds": {
"type": "object",
"required": [
"list_file_entries",
"default_applied_corrections"
],
"properties": {
"list_file_entries": {"$ref": "#/definitions/ls_list_file_entries"},
"default_applied_corrections": {"$ref": "#/definitions/ls_default_applied_corrections"}
},
"additionalProperties": false
},
"ls_list_file_entries": {
"type" : "array",
"description" : "list of leapsecond.list file entries",
"minItems": 1,
"items" : {
"type": "object",
"required": [
"line_text",
"leap_type"
],
"properties": {
"line_text": {"type": "string", "description": "line from leapseconds.lst"},
"leap_type": {"type": "string", "description" : "Leapsecond direction", "enum" : ["+","-"]}
},
"additionalProperties": false
}
},
"ls_default_applied_corrections": {
"type": "object",
"required": [
"not_clock_corrected_miniseed",
"syncs_instrument"
],
"properties": {
"not_clock_corrected_miniseed": {"type": "boolean", "description": "Are not-clock-corrected miniseed data corrected for leap seconds?"},
"syncs_instrument": {"type": "boolean", "description": "Are instrument synchronization datetimes corrected for leap seconds?"}
},
"additionalProperties": false
},
"stations_map" : {
"type": "object",
"description": "Seafloor seismological stations, keys are station names",
"$comment": "If we use draft-06, 'patternProperties' should probably be replaced by 'propertyNames':{'pattern':}",
"patternProperties": {
"^[A-Za-z0-9_-]+$": {"$ref": "station.schema.json#/definitions/station"}
},
"additionalProperties": false
}
}
}
timing_base files
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Timing Base",
"description": "Information about OBSs timing",
"type": "object",
"required": ["format_version", "timing_base"],
"properties": {
"format_version" : {"$ref": "definitions.schema.json#/format_version"},
"revision" : {"$ref": "definitions.schema.json#/revision"},
"notes": {"$ref": "definitions.schema.json#/note_list"},
"timing_base": {"$ref": "#/definitions/base"}
},
"additionalProperties" : false,
"definitions": {
"base_properties": {
"description": "common properties in {element}, modifications, base, definition, and configuration_definition. This is unused because 'allOf' for makes ugly schema validation",
"properties": {
"instrument": {"type": "string", "description" : "time base used in OBS"},
"instrument_nominal_drift_rate": {"type": "number", "description": "nominal dimensionless drift of the instrument time base"},
"reference": {"type": "string", "description" : "time base used as reference"},
"syncs_instrument_reference": {"$ref": "#/definitions/syncs_inst_ref"}
}
},
"timing" : {
"type" : "object",
"required": [
"base",
"type",
"syncs_instrument_reference"
],
"properties": {
"base": {"$ref" : "#/definitions/base"},
"configuration": {"type": ["string", "null"]},
"modifications": {"$ref" : "#/definitions/modifications"},
"instrument": {"type": "string", "description" : "time base used in OBS"},
"reference": {"type": "string", "description" : "time base used as reference"},
"type": {"type": "string", "enum": ["piecewise_linear", "cubic_spline", "polynomial"]},
"parameters": {"type": "string"},
"syncs_instrument_reference": {"$ref": "#/definitions/syncs_inst_ref"}
},
"additionalProperties" : false
},
"modifications" : {
"type" : "object",
"properties": {
"base": {"$ref" : "#/definitions/base" },
"configuration": {"type": ["string", "null"]},
"instrument": {"type": "string", "description" : "time base used in OBS"},
"reference": {"type": "string", "description" : "time base used as reference"}
},
"additionalProperties" : false
},
"syncs_inst_ref": {
"type": "array",
"minItems": 2,
"items": {"type": "array",
"description": "simultaneous instrument and reference times.",
"minItems": 2,
"maxItems": 2,
"items": {"$ref": "definitions.schema.json#/date-time-Z_or_null"}
}
},
"base" : {
"type" : "object",
"required": [
"instrument",
"reference"
],
"properties": {
"instrument" : {"type": "string", "default" : "MCXO"},
"reference" : {"type": "string", "default" : "GNSS"},
"instrument_nominal_drift_rate" : {
"type": "number", "default" : 1e-8,
"description": "instrument's nominal drift rate"}
},
"additionalProperties" : false
}
}
}
Others
These either are used by many file types or simplify the definition of a file type
stages
Used by datalogger_base, sensor_base and preamplifier_base
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Response",
"description": "OBS instrument_component response stages",
"type": "object",
"required": [ "stages", "format_version" ],
"properties": {
"format_version": {"$ref" : "definitions.schema.json#/format_version"},
"revision": {"$ref" : "definitions.schema.json#/revision"},
"yaml_anchors": {"$ref" : "definitions.schema.json#/yaml_anchors"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"stages": {"$ref" : "#/definitions/stages" }
},
"additionalProperties" : false,
"definitions": {
"stages" : {
"if": {"type": "array"},
"then": {
"minItems": 1,
"description" : "list of stages",
"items" : { "$ref" : "stage_base.schema.json#/definitions/stage" }
},
"else": {"$ref" : "stage_base.schema.json#/definitions/stage" }
},
"modifications" : {
"if": {"type": "array"},
"then": {
"minItems": 1,
"description" : "list of stages",
"items" : { "$ref" : "stage_base.schema.json#/definitions/modifications" }
},
"else": {"$ref" : "stage_base.schema.json#/definitions/modifications" }
},
"stage_modifications": {
"type": "object",
"description": "individual changes specified by stage number",
"patternProperties": {
"^\\*$": { "$ref": "stage_base.schema.json#/definitions/modifications"},
"^\\[[0-9]+\\-[0-9]+\\]$": { "$ref": "stage_base.schema.json#/definitions/modifications"},
"^\\[[0-9\\,]*[0-9]+\\]$": { "$ref": "stage_base.schema.json#/definitions/modifications"},
"^[0-9]+$": { "$ref": "stage_base.schema.json#/definitions/modifications"}
}
}
}
}
station
Used by subnetwork
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Station",
"description": "Station deployed by an OBS operator. Probably never a solo file",
"type": "object",
"required": ["format_version", "station"],
"properties": {
"format_version": {"$ref": "definitions.schema.json#/format_version"},
"revision": {"$ref": "definitions.schema.json#/revision"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"station": {"$ref": "#/definitions/station"}
},
"additionalProperties" : false,
"definitions" : {
"station" : {
"type" : "object",
"description" : "OBS station",
"if": {
"required": ["instrumentation"],
"properties": {
"instrumentation": {
"description": "fit any type so we can get to next level testing",
"type": ["string", "number", "integer", "object",
"array", "boolean", "null"]
}
},
"additionalProperties": true
},
"then": {
"required": [
"start_date",
"end_date",
"locations",
"instrumentation"
],
"properties": {
"start_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"end_date": {"$ref": "definitions.schema.json#/date-time-Z_or_null"},
"locations": {"$ref": "#/definitions/locations_map"},
"location_code": {"$ref": "#/definitions/location_code"},
"instrumentation": {"$ref": "instrumentation_base.schema.json#/definitions/instrumentation"},
"site": {"$ref": "#/definitions/site"},
"operators": {"$ref": "operator.schema.json#/definitions/operators"},
"processing": {"$ref": "#/definitions/processing_list"},
"comments": {"$ref" : "definitions.schema.json#/comments"},
"extras": {"$ref" : "definitions.schema.json#/extras"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"source_id": {"$ref": "definitions.schema.json#source_id"},
"external_references": {"$ref": "definitions.schema.json#external_references"},
"identifiers": {"$ref": "definitions.schema.json#identifiers"},
"description": {"type": "string"},
"restricted_status": {"$ref": "definitions.schema.json#/restricted_status"}
},
"additionalProperties": false
},
"else": {
"required": [
"start_date",
"end_date",
"locations",
"instrumentations"
],
"properties": {
"site": {"$ref": "#/definitions/site"},
"start_date": {"$ref": "definitions.schema.json#/date-time-Z"},
"end_date": {"$ref": "definitions.schema.json#/date-time-Z_or_null"},
"locations": {"$ref": "#/definitions/locations_map"},
"location_code": {"$ref": "#/definitions/location_code"},
"instrumentations": {"$ref": "#/definitions/instrumentation_list"},
"operators": {"$ref": "operator.schema.json#/definitions/operators"},
"processing": {"$ref": "#/definitions/processing_list"},
"notes" : {"$ref": "definitions.schema.json#/note_list"},
"comments": {"$ref" : "definitions.schema.json#/comments"},
"extras": {"$ref" : "definitions.schema.json#/extras"},
"source_id": {"$ref": "definitions.schema.json#source_id"},
"external_references": {"$ref": "definitions.schema.json#external_references"},
"identifiers": {"$ref": "definitions.schema.json#identifiers"},
"description": {"type": "string"},
"restricted_status": {"$ref": "definitions.schema.json#/restricted_status"}
},
"additionalProperties": false
}
},
"site": {
"if": {"type": "string"},
"then": {
"description": "will be injected into site:name"
},
"else": {
"type" : "object",
"required": ["name"],
"description": "Site object",
"properties" : {
"name": {"type": "string"},
"description": {"type": "string"},
"town": {"type": "string"},
"county": {"type": "string"},
"region": {"type": "string"},
"country": {"type": "string"}
}
}
},
"location_code" : {
"type" : "string",
"description" : "SEED location code, empty or 2-number string",
"pattern" : "^(.{0}|[0-9]{2})$"
},
"locations_map" : {
"type" : "object",
"description" : "sensor position by location code (two digits or empty)",
"patternProperties": {
"^(.{0}|[0-9]{2})$": { "$ref": "location_base.schema.json#/definitions/location" }
}
},
"instrumentation_list": {
"type": "array",
"description":" list of instrumentation",
"minItems" : 1,
"items" : {"$ref": "instrumentation_base.schema.json#/definitions/instrumentation"}
},
"processing_list": {
"type": "array",
"description": "other information",
"items": {
"type": "object",
"description": "other informations that will be appear as comments ",
"properties": {
"clock_correction": {"$ref": "#/definitions/clock_correction"}
},
"additionalProperties" : false
}
},
"clock_correction" : {
"type" : "object",
"description" : "clock correction information",
"properties" : {
"drift": {"$ref": "timing_base.schema.json#/definitions/timing"},
"leapsecond_applied_corrections": {"$ref": "#/definitions/leapsecond_applied_corrections"},
},
"additionalProperties": false
},
"leapsecond_applied_corrections" : {
"type" : "object",
"description" : "Leap-second corrections that are different from defaults",
"properties" : {
"not_clock_corrected_miniseed": {"type": "boolean", "description": "Are instrument synchronizations corrected for leap seconds?"},
"syncs_instrument": {"type": "boolean", "description": "Are basic minisee data corrected for leap seconds?"}
},
"additionalProperties": false
}
}
}
definitions
Used by several file types
{
"format_version": {
"description": "Schema file's obsinfo version",
"type": "string",
"pattern": "^1.0$"
},
"yaml_anchors" : {
"description": "Free-form object or list used to set YAML anchors",
"oneOf": [{"type": "object"}, {"type": "array"}]
},
"extras" : {
"type": "object",
"description": "Free-form object for attribute additions to information files"
},
"note_list": {
"type" : "array",
"description" : "list of strings",
"minItems": 1,
"items" : {"type": "string"}
},
"comments": {
"type" : "array",
"description" : "list of comments (should be included in output metadata)",
"minItems": 0,
"items" : {
"if": {"type": "string"},
"then": {
"description": "basic comment",
"minimum": 2},
"else": {"$ref":"#/_stationxml_comment"}
}
},
"_stationxml_comment": {
"type" : "object",
"required": ["value"],
"description": "Multiple comments with the same subject should be considered related",
"properties" : {
"value": {"type":"string"},
"begin_effective_time": {"$ref": "#/date-time-Z"},
"end_effective_time": {"$ref": "#/date-time-Z"},
"id": {"type": "integer", "minimum": 0},
"subject": {"type": "string"},
"authors": {
"type": "array",
"items": {"$ref": "person.schema.json#/definitions/person"}
}
}
},
"date": {
"type": "string",
"description": "Date in yyyy-mm-dd format",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"date_or_null": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {
"type": "string",
"description": "yyyy-mm-dd date",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
}
},
"date-time-Z": {
"type": "string",
"description": "Date-time in ISO format with Z for GMT+0. The Z is not required.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]*)?[Z]*$"
},
"date-time-Z_or_null": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {"$ref": "#/date-time-Z"}
},
"ISOdatetime": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {
"type": "string",
"description": "Date-time in ISO format with Z for GMT+0. The Z is not required.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]*)?[Z]*$"
}
},
"email": {
"type": "string",
"format": "email"
},
"notes": {
"type": "array",
"description": "list of notes (should not be included in output metadata)",
"minItems": 0,
"items": {"type": "string", "minLength": 1 }
},
"phone": {
"if": {"type": "string"},
"then": {
"description": "Phone in international format",
"pattern": "^[+]{0,1}[0-9]{1,3}([ ]*[(][0-9]+[)]){0,1}[ ]*([0-9]+[ -])*[0-9]+"
},
"else": {
"description": "Phone in US format",
"type": "object",
"required": ["area_code", "phone_number"],
"properties": {
"description": {"type": "string"},
"country_code": {
"type": "string",
"pattern": "^\\+{0,1}[0-9]{1,3}$"
},
"area_code": {
"type": "string",
"pattern": "^[(]{0,1}[0-9]{1,3}[)]{0,1}$"
},
"phone_number": {
"type": "string",
"pattern": "^[0-9]+\\-[0-9]+$"
}
}
}
},
"reference_name": {
"type": "string",
"description": "campaign or operator reference name"
},
"restricted_status": {
"type": "string",
"description": "restricted state",
"enum": ["open", "closed", "partial"]
},
"revision": {
"type": "object",
"if": { "required": ["$ref"]},
"then": {"$ref": "#/jsonref"},
"else": {
"description": "Date provenance of instrumentation information",
"type": "object",
"required": ["date", "authors"],
"properties": {
"date": {"$ref": "#/date"},
"authors": {
"type": "array",
"minItems" : 1,
"items" : {"$ref": "person.schema.json#/definitions/person"}
}
}
}
},
"jsonref": {
"type": "object",
"required": ["$ref"],
"properties": {
"$ref": {"type": "string"}
},
"additionalProperties": false
},
"string_or_null": {
"type": ["string" , "null"]
},
"URI_and_revision": {
"type": "object",
"description": "URI and revision date of file to be loaded",
"required" : ["$ref","revision_date"],
"properties" : {
"$ref" : {"type":"string"},
"revision_date": {
"oneOf" : [
{ "$ref" :"#/date-time-Z"},
{ "$ref" :"#/date_or_null"}
]
}
},
"additionalProperties" : false
},
"URI_ref": {
"type": "object",
"description": "URI to file containing information to be loaded here",
"required": ["$ref"],
"properties": {"$ref": {"type": "string"}},
"additionalProperties": false
},
"website": {
"type": "string",
"format": "uri"
},
"any_date":{
"oneOf" :[
{"$ref": "#/date" },
{"$ref": "#/date-time-Z"}
]
},
"any_date_or_null":{
"oneOf" :[
{"type" : "null"},
{"$ref": "#/date" },
{"$ref": "#/date-time-Z"}
]
},
"float_type": {
"oneOf":[
{ "$ref" :"#/float_type_number"},
{ "$ref" :"#/float_type_object"}
]
},
"float_type_number": {
"type": "number",
"description": "value only, set uncertainty and measurement_method to null"
},
"float_type_object": {
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number"},
"uncertainty": {"type": "number"},
"measurement_method": {"type": "string"}
}
},
"azimuth.deg": {
"description": "azimuth value-limited float_type",
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number", "minimum": 0.0, "exclusiveMaximum": 360.0},
"uncertainty": {"type": "number", "minimum": 0.0, "maximum": 180.0},
"measurement_method": {"type": "string"}
}
},
"dip.deg": {
"description": "dip value-limited float_type",
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number", "minimum": -90.0, "maxiumum": 90.0},
"uncertainty": {"type": "number", "minimum": 0.0, "maximum": 180.0},
"measurement_method": {"type": "string"}
}
},
"equipment": {
"type": "object",
"description": "You should include at least type, description, manufacturer and model",
"properties": {
"type": {"type": ["string","null"]},
"description": {"type": ["string","null"]},
"manufacturer": {"type": ["string","null"]},
"vendor": {"type": ["string","null"]},
"model": {"type": ["string","null"]},
"serial_number": {"type": ["string","null"]},
"installation_date": {"$ref": "#any_date"},
"removal_date": {"$ref": "#any_date"},
"calibration_dates": {"$ref": "#calibration_dates_def"},
"resource_id": {"$ref": "#resource_id"},
},
"additionalProperties": false
},
"calibration_dates_def": {
"type": "array",
"description": "list of calibration dates",
"minItems": 1,
"items": {"$ref": "#/any_date"}
},
"custom_fields": {
"type": "array",
"description": "custom StationXML fields such as <gfz:Identifier type='hdl'>10881/sensor.a7561d1a-d518-475d-9733-30370432996c</gfz:Identifier>",
"comment": "does no checking for now",
"minItems": 1,
"items": {"type": "string"}
},
"resource_id": {
"type": "string",
"description": "unique ID for instruments, stages and/or filters. Can be interpreted differently depending on the datacenter/software that generated the document. We recommend using a prefix, e.g., GENERATOR:Meaningful ID. It should be expected that elements with the same resourceId should indicate the same information."
},
"source_id": {
"type": "string",
"format": "uri",
"description": "stationXML sourceID in URI form "
},
"external_references": {
"type": "array",
"description": "list of external_reference",
"minItems": 1,
"items": {"$ref": "#/external_reference"}
},
"external_reference": {
"type": "object",
"description": "URI of any type of external report",
"comment": "URI and description for external information to reference",
"required": ["uri", "description"],
"properties": {
"uri": {"type": "string", "format": "uri"},
"description": {"type": "string"}
},
"examples": [{"uri": "http://usgs.gov", "description": "USGS website"},
{"uri": "http://ipgp.fr", "description": "IPGP website"}]
},
"identifiers": {
"type": "array",
"description": "list of persistent identifiers",
"minItems": 1,
"items": {"$ref": "#/identifier"}
},
"identifier": {
"type": "string",
"format": "uri",
"description": "Persistent identifiers. Must have a URI scheme (prefix)",
"examples": ["DOI:10.7915/SN/XX"]
},
"polarity_codes" : {
"type": "string",
"pattern": "^[+-]$"
}
}
iris_units
Only used by stage_base schema, but could be useful for others…
{
"format_version": {
"description": "Schema file's obsinfo version",
"type": "string",
"pattern": "^1.0$"
},
"yaml_anchors" : {
"description": "Free-form object or list used to set YAML anchors",
"oneOf": [{"type": "object"}, {"type": "array"}]
},
"extras" : {
"type": "object",
"description": "Free-form object for attribute additions to information files"
},
"note_list": {
"type" : "array",
"description" : "list of strings",
"minItems": 1,
"items" : {"type": "string"}
},
"comments": {
"type" : "array",
"description" : "list of comments (should be included in output metadata)",
"minItems": 0,
"items" : {
"if": {"type": "string"},
"then": {
"description": "basic comment",
"minimum": 2},
"else": {"$ref":"#/_stationxml_comment"}
}
},
"_stationxml_comment": {
"type" : "object",
"required": ["value"],
"description": "Multiple comments with the same subject should be considered related",
"properties" : {
"value": {"type":"string"},
"begin_effective_time": {"$ref": "#/date-time-Z"},
"end_effective_time": {"$ref": "#/date-time-Z"},
"id": {"type": "integer", "minimum": 0},
"subject": {"type": "string"},
"authors": {
"type": "array",
"items": {"$ref": "person.schema.json#/definitions/person"}
}
}
},
"date": {
"type": "string",
"description": "Date in yyyy-mm-dd format",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"date_or_null": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {
"type": "string",
"description": "yyyy-mm-dd date",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
}
},
"date-time-Z": {
"type": "string",
"description": "Date-time in ISO format with Z for GMT+0. The Z is not required.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]*)?[Z]*$"
},
"date-time-Z_or_null": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {"$ref": "#/date-time-Z"}
},
"ISOdatetime": {
"if": {"type" : "null"},
"then": {"description": "no date entered"},
"else": {
"type": "string",
"description": "Date-time in ISO format with Z for GMT+0. The Z is not required.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]*)?[Z]*$"
}
},
"email": {
"type": "string",
"format": "email"
},
"notes": {
"type": "array",
"description": "list of notes (should not be included in output metadata)",
"minItems": 0,
"items": {"type": "string", "minLength": 1 }
},
"phone": {
"if": {"type": "string"},
"then": {
"description": "Phone in international format",
"pattern": "^[+]{0,1}[0-9]{1,3}([ ]*[(][0-9]+[)]){0,1}[ ]*([0-9]+[ -])*[0-9]+"
},
"else": {
"description": "Phone in US format",
"type": "object",
"required": ["area_code", "phone_number"],
"properties": {
"description": {"type": "string"},
"country_code": {
"type": "string",
"pattern": "^\\+{0,1}[0-9]{1,3}$"
},
"area_code": {
"type": "string",
"pattern": "^[(]{0,1}[0-9]{1,3}[)]{0,1}$"
},
"phone_number": {
"type": "string",
"pattern": "^[0-9]+\\-[0-9]+$"
}
}
}
},
"reference_name": {
"type": "string",
"description": "campaign or operator reference name"
},
"restricted_status": {
"type": "string",
"description": "restricted state",
"enum": ["open", "closed", "partial"]
},
"revision": {
"type": "object",
"if": { "required": ["$ref"]},
"then": {"$ref": "#/jsonref"},
"else": {
"description": "Date provenance of instrumentation information",
"type": "object",
"required": ["date", "authors"],
"properties": {
"date": {"$ref": "#/date"},
"authors": {
"type": "array",
"minItems" : 1,
"items" : {"$ref": "person.schema.json#/definitions/person"}
}
}
}
},
"jsonref": {
"type": "object",
"required": ["$ref"],
"properties": {
"$ref": {"type": "string"}
},
"additionalProperties": false
},
"string_or_null": {
"type": ["string" , "null"]
},
"URI_and_revision": {
"type": "object",
"description": "URI and revision date of file to be loaded",
"required" : ["$ref","revision_date"],
"properties" : {
"$ref" : {"type":"string"},
"revision_date": {
"oneOf" : [
{ "$ref" :"#/date-time-Z"},
{ "$ref" :"#/date_or_null"}
]
}
},
"additionalProperties" : false
},
"URI_ref": {
"type": "object",
"description": "URI to file containing information to be loaded here",
"required": ["$ref"],
"properties": {"$ref": {"type": "string"}},
"additionalProperties": false
},
"website": {
"type": "string",
"format": "uri"
},
"any_date":{
"oneOf" :[
{"$ref": "#/date" },
{"$ref": "#/date-time-Z"}
]
},
"any_date_or_null":{
"oneOf" :[
{"type" : "null"},
{"$ref": "#/date" },
{"$ref": "#/date-time-Z"}
]
},
"float_type": {
"oneOf":[
{ "$ref" :"#/float_type_number"},
{ "$ref" :"#/float_type_object"}
]
},
"float_type_number": {
"type": "number",
"description": "value only, set uncertainty and measurement_method to null"
},
"float_type_object": {
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number"},
"uncertainty": {"type": "number"},
"measurement_method": {"type": "string"}
}
},
"azimuth.deg": {
"description": "azimuth value-limited float_type",
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number", "minimum": 0.0, "exclusiveMaximum": 360.0},
"uncertainty": {"type": "number", "minimum": 0.0, "maximum": 180.0},
"measurement_method": {"type": "string"}
}
},
"dip.deg": {
"description": "dip value-limited float_type",
"type": "object",
"required": ["value"],
"properties": {
"value": {"type": "number", "minimum": -90.0, "maxiumum": 90.0},
"uncertainty": {"type": "number", "minimum": 0.0, "maximum": 180.0},
"measurement_method": {"type": "string"}
}
},
"equipment": {
"type": "object",
"description": "You should include at least type, description, manufacturer and model",
"properties": {
"type": {"type": ["string","null"]},
"description": {"type": ["string","null"]},
"manufacturer": {"type": ["string","null"]},
"vendor": {"type": ["string","null"]},
"model": {"type": ["string","null"]},
"serial_number": {"type": ["string","null"]},
"installation_date": {"$ref": "#any_date"},
"removal_date": {"$ref": "#any_date"},
"calibration_dates": {"$ref": "#calibration_dates_def"},
"resource_id": {"$ref": "#resource_id"},
},
"additionalProperties": false
},
"calibration_dates_def": {
"type": "array",
"description": "list of calibration dates",
"minItems": 1,
"items": {"$ref": "#/any_date"}
},
"custom_fields": {
"type": "array",
"description": "custom StationXML fields such as <gfz:Identifier type='hdl'>10881/sensor.a7561d1a-d518-475d-9733-30370432996c</gfz:Identifier>",
"comment": "does no checking for now",
"minItems": 1,
"items": {"type": "string"}
},
"resource_id": {
"type": "string",
"description": "unique ID for instruments, stages and/or filters. Can be interpreted differently depending on the datacenter/software that generated the document. We recommend using a prefix, e.g., GENERATOR:Meaningful ID. It should be expected that elements with the same resourceId should indicate the same information."
},
"source_id": {
"type": "string",
"format": "uri",
"description": "stationXML sourceID in URI form "
},
"external_references": {
"type": "array",
"description": "list of external_reference",
"minItems": 1,
"items": {"$ref": "#/external_reference"}
},
"external_reference": {
"type": "object",
"description": "URI of any type of external report",
"comment": "URI and description for external information to reference",
"required": ["uri", "description"],
"properties": {
"uri": {"type": "string", "format": "uri"},
"description": {"type": "string"}
},
"examples": [{"uri": "http://usgs.gov", "description": "USGS website"},
{"uri": "http://ipgp.fr", "description": "IPGP website"}]
},
"identifiers": {
"type": "array",
"description": "list of persistent identifiers",
"minItems": 1,
"items": {"$ref": "#/identifier"}
},
"identifier": {
"type": "string",
"format": "uri",
"description": "Persistent identifiers. Must have a URI scheme (prefix)",
"examples": ["DOI:10.7915/SN/XX"]
},
"polarity_codes" : {
"type": "string",
"pattern": "^[+-]$"
}
}