Skip to content
Snippets Groups Projects
Commit 7977a19c authored by goei's avatar goei
Browse files

TMSS-166: Add scheduling unit schema. Move task schemas to file. Disable...

TMSS-166: Add scheduling unit schema. Move task schemas to file. Disable populate of task draft example
parent b636c0c2
Branches
Tags
1 merge request!176Resolve TMSS-166 and TMSS-209
...@@ -22,3 +22,5 @@ add_subdirectory(renderers) ...@@ -22,3 +22,5 @@ add_subdirectory(renderers)
add_subdirectory(serializers) add_subdirectory(serializers)
add_subdirectory(viewsets) add_subdirectory(viewsets)
add_subdirectory(adapters) add_subdirectory(adapters)
add_subdirectory(schemas)
This diff is collapsed.
include(PythonInstall)
set(_json_schema_files
scheduling-unit.json
task-calibrator-addon.json
task-observation-with-stations.json
task-stations.json
task-correlator.json
task-preprocessing.json
)
python_install(${_json_schema_files}
DESTINATION lofar/sas/tmss/tmss/tmssapp/schemas)
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"task_connector": {
"type": "object",
"additionalProperties": false,
"properties": {
"role": {
"type": "string",
"title": "Role"
},
"datatype": {
"type": "string",
"title": "Data Type"
}
},
"required": [
"role",
"datatype"
]
}
},
"properties": {
"tasks": {
"title": "Tasks",
"type": "array",
"additionalItems": false,
"uniqueItems": true,
"items": {
"type": "object",
"title": "Task",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name (unique)"
},
"description": {
"type": "string",
"title": "Description"
},
"tags": {
"type": "array",
"addtionalItems": false,
"uniqueItems": true,
"items": {
"type": "string",
"title": "Tag"
}
},
"specifications_doc": {
"type": "object",
"title": "Specifications",
"addtionalProperties": true
},
"specifications_template": {
"type": "string",
"title": "Name of Template for Specifications"
}
},
"required": [
"name",
"specifications_doc",
"specifications_template"
]
}
},
"task_relations": {
"title": "Task Relations",
"type": "array",
"additionalItems": false,
"uniqueItems": true,
"items": {
"type": "object",
"title": "Task Relation",
"additionalProperties": false,
"properties": {
"producer": {
"type": "string",
"title": "Name of Producer Task"
},
"consumer": {
"type": "string",
"title": "Name of Consumer Task"
},
"tags": {
"type": "array",
"addtionalItems": false,
"uniqueItems": true,
"items": {
"type": "string",
"title": "Tag"
}
},
"input": {
"title": "Input I/O Connector",
"$ref": "#/definitions/task_connector"
},
"output": {
"title": "Output I/O Connector",
"$ref": "#/definitions/task_connector"
},
"dataformat": {
"type": "string",
"title": "Data Format"
},
"selection_doc": {
"type": "object",
"title": "Filter selection",
"addtionalProperties": true
},
"selection_template": {
"type": "string",
"title": "Name of Template for Selection"
}
},
"required": [
"producer",
"consumer",
"input",
"output",
"selection_template"
]
}
},
"task_scheduling_relations": {
"title": "Task Scheduling Relations",
"type": "array",
"additionalItems": false,
"uniqueItems": true,
"items": {
"type": "object",
"title": "Task Scheduling Relation",
"additionalProperties": false,
"properties": {
"first": {
"type": "string",
"title": "Name of First Task"
},
"second": {
"type": "string",
"title": "Name of Second Task"
},
"placement": {
"type": "string",
"title": "Placement",
"description": "How `first' relates to `second'",
"enum": [
"before",
"after",
"parallel"
],
"default": "before"
},
"time_offset": {
"type": "number",
"title": "Time Offset",
"description": "Distance between `first' and `second' (in seconds)",
"default": 60
}
},
"required": [
"first",
"second",
"placement"
]
}
}
},
"required": []
}
\ No newline at end of file
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"pointing": {
"type": "object",
"additionalProperties": false,
"format": "grid",
"properties": {
"direction_type": {
"type": "string",
"title": "Reference frame",
"description": "",
"default": "J2000",
"enum": [
"J2000",
"SUN",
"MOON",
"MERCURY",
"VENUS",
"MARS",
"JUPITER",
"SATURN",
"URANUS",
"NEPTUNE",
"PLUTO"
]
},
"angle1": {
"type": "number",
"title": "Angle 1",
"description": "First angle (f.e. RA)",
"default": 0
},
"angle2": {
"type": "number",
"title": "Angle 2",
"description": "Second angle (f.e. DEC)",
"default": 0
}
}
}
},
"format": "grid",
"additionalProperties": false,
"properties": {
"duration": {
"type": "number",
"title": "Duration (seconds)",
"description": "Duration of this observation",
"default": 600,
"minimum": 1
},
"autoselect": {
"type": "boolean",
"format": "checkbox",
"title": "Auto-select",
"description": "Auto-select calibrator based on elevation",
"default": true
},
"pointing": {
"title": "Digital pointing",
"description": "Manually selected calibrator",
"$ref": "#/definitions/pointing"
}
}, "required": ["autoselect"]
}
\ No newline at end of file
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"pointing": {
"type": "object",
"additionalProperties": false,
"properties": {
"direction_type": {
"type": "string",
"title": "Reference frame",
"description": "",
"default": "J2000",
"enum": [
"J2000",
"SUN",
"MOON",
"MERCURY",
"VENUS",
"MARS",
"JUPITER",
"SATURN",
"URANUS",
"NEPTUNE",
"PLUTO"
]
},
"angle1": {
"type": "number",
"title": "Angle 1",
"description": "First angle (f.e. RA)",
"default": 0
},
"angle2": {
"type": "number",
"title": "Angle 2",
"description": "Second angle (f.e. DEC)",
"default": 0
}
}
}
},
"additionalProperties": false,
"properties": {
"duration": {
"type": "number",
"title": "Duration (seconds)",
"description": "Duration of this observation",
"default": 60,
"minimum": 1
},
"calibrator": {
"type": "object",
"additionalProperties": false,
"default": {},
"properties": {
"enabled": {
"type": "boolean",
"title": "Calibrator",
"description": "Replace targets by calibrators",
"default": false
},
"autoselect": {
"type": "boolean",
"title": "Auto-select",
"description": "Auto-select calibrator based on elevation",
"default": false
},
"pointing": {
"title": "Digital pointing",
"$ref": "#/definitions/pointing",
"default": {}
}
}
},
"channels_per_subband": {
"type": "integer",
"title": "Channels/subband",
"description": "Number of frequency bands per subband",
"default": 64,
"minimum": 8,
"enum": [
8,
16,
32,
64,
128,
256,
512,
1024
]
},
"integration_time": {
"type": "number",
"title": "Integration time (seconds)",
"description": "Desired integration period",
"default": 1,
"minimum": 0.1
},
"storage_cluster": {
"type": "string",
"title": "Storage cluster",
"description": "Cluster to write output to",
"default": "CEP4",
"enum": [
"CEP4",
"DragNet"
]
},
"QA": {
"type": "object",
"title": "Quality Assurance",
"default": {},
"description": "Specify Quality Assurance steps for this observation",
"properties": {
"file_conversion": {
"type": "object",
"title": "File Conversion",
"default": {},
"description": "Create a QA file for the observation",
"properties": {
"enabled": {
"type": "boolean",
"title": "enabled",
"default": true,
"description": "Do/Don't create a QA file for the observation"
},
"nr_of_subbands": {
"type": "integer",
"title": "#subbands",
"default": -1,
"description": "Keep this number of subbands from the observation in the QA file, or all if -1"
},
"nr_of_timestamps": {
"type": "integer",
"title": "#timestamps",
"default": 256,
"minimum": 1,
"description": "Extract this number of timestamps from the observation in the QA file (equidistantanly sampled, no averaging/interpolation)"
}
},
"additionalProperties": false
},
"plots": {
"type": "object",
"title": "Plots",
"default": {},
"description": "Create dynamic spectrum plots",
"properties": {
"enabled": {
"type": "boolean",
"title": "enabled",
"default": true,
"description": "Do/Don't create plots from the QA file from the observation"
},
"autocorrelation": {
"type": "boolean",
"title": "autocorrelation",
"default": true,
"description": "Create autocorrelation plots for all stations"
},
"crosscorrelation": {
"type": "boolean",
"title": "crosscorrelation",
"default": true,
"description": "Create crosscorrelation plots for all baselines"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
}
\ No newline at end of file
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"pointing": {
"type": "object",
"additionalProperties": false,
"format": "grid",
"properties": {
"direction_type": {
"type": "string",
"title": "Reference frame",
"description": "",
"default": "J2000",
"enum": [
"J2000",
"SUN",
"MOON",
"MERCURY",
"VENUS",
"MARS",
"JUPITER",
"SATURN",
"URANUS",
"NEPTUNE",
"PLUTO"
]
},
"angle1": {
"type": "number",
"title": "Angle 1",
"description": "First angle (f.e. RA)",
"default": 0
},
"angle2": {
"type": "number",
"title": "Angle 2",
"description": "Second angle (f.e. DEC)",
"default": 0
}
},
"required": [
"angle1",
"angle2"
]
}
},
"format": "grid",
"additionalProperties": false,
"properties": {
"stations": {
"title": "Station list",
"oneOf": [
{
"type": "array",
"title": "Fixed list",
"format": "grid",
"additionalItems": false,
"additionalProperties": false,
"items": {
"type": "string",
"enum": [
"CS001",
"CS002",
"CS003",
"CS004",
"CS005",
"CS006",
"CS007",
"CS011",
"CS013",
"CS017",
"CS021",
"CS024",
"CS026",
"CS028",
"CS030",
"CS031",
"CS032",
"CS101",
"CS103",
"CS201",
"CS301",
"CS302",
"CS401",
"CS501",
"RS104",
"RS106",
"RS205",
"RS208",
"RS210",
"RS305",
"RS306",
"RS307",
"RS310",
"RS406",
"RS407",
"RS409",
"RS410",
"RS503",
"RS508",
"RS509",
"DE601",
"DE602",
"DE603",
"DE604",
"DE605",
"FR606",
"SE607",
"UK608",
"DE609",
"PL610",
"PL611",
"PL612",
"IE613",
"LV614"
],
"title": "Station",
"description": ""
},
"minItems": 1,
"uniqueItems": true
},
{
"title": "Dynamic list",
"type": "array",
"format": "tabs",
"additionalItems": false,
"items": {
"type": "object",
"format": "grid",
"title": "Station set",
"headerTemplate": "{{ self.group }}",
"additionalProperties": false,
"properties": {
"group": {
"type": "string",
"title": "Group/station",
"description": "Which (group of) station(s) to select from",
"default": "ALL",
"enum": [
"ALL",
"SUPERTERP",
"CORE",
"REMOTE",
"DUTCH",
"INTERNATIONAL"
]
},
"min_stations": {
"type": "integer",
"title": "Minimum nr of stations",
"description": "Number of stations to use within group/station",
"default": 1,
"minimum": 0
}
},
"required": [
"group",
"min_stations"
]
}
}
]
},
"antenna_set": {
"type": "string",
"title": "Antenna set",
"description": "Fields & antennas to use",
"default": "HBA_DUAL",
"enum": [
"HBA_DUAL",
"HBA_DUAL_INNER",
"HBA_ONE",
"HBA_ONE_INNER",
"HBA_ZERO",
"HBA_ZERO_INNER",
"LBA_INNER",
"LBA_OUTER",
"LBA_SPARSE_EVEN",
"LBA_SPARSE_ODD",
"LBA_ALL"
]
},
"filter": {
"type": "string",
"title": "Band-pass filter",
"description": "Must match antenna type",
"default": "HBA_110_190",
"enum": [
"LBA_10_70",
"LBA_30_70",
"LBA_10_90",
"LBA_30_90",
"HBA_110_190",
"HBA_210_250"
]
},
"analog_pointing": {
"title": "Analog pointing",
"description": "HBA only",
"$ref": "#/definitions/pointing"
},
"beams": {
"type": "array",
"title": "Beams",
"format": "tabs",
"additionalItems": false,
"items": {
"title": "Beam",
"headerTemplate": "{{ i0 }} - {{ self.name }}",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name/target",
"description": "Identifier for this beam",
"default": ""
},
"digital_pointing": {
"title": "Digital pointing",
"$ref": "#/definitions/pointing"
},
"subbands": {
"type": "array",
"title": "Subband list",
"format": "table",
"additionalItems": false,
"items": {
"type": "integer",
"title": "Subband",
"minimum": 0,
"maximum": 511
}
}
},
"required": [
"digital_pointing",
"subbands"
]
}
},
"duration": {
"type": "number",
"title": "Duration (seconds)",
"description": "Duration of this observation",
"default": 300,
"minimum": 1
},
"correlator": {
"title": "Correlator Settings",
"type": "object",
"additionalProperties": false,
"properties": {
"channels_per_subband": {
"type": "integer",
"title": "Channels/subband",
"description": "Number of frequency bands per subband",
"default": 64,
"minimum": 8,
"enum": [
8,
16,
32,
64,
128,
256,
512,
1024
]
},
"integration_time": {
"type": "number",
"title": "Integration time (seconds)",
"description": "Desired integration period",
"default": 1,
"minimum": 0.1
},
"storage_cluster": {
"type": "string",
"title": "Storage cluster",
"description": "Cluster to write output to",
"default": "CEP4",
"enum": [
"CEP4",
"DragNet"
]
}
},
"required": [
"channels_per_subband",
"integration_time",
"storage_cluster"
]
}
},
"required": [
"stations",
"antenna_set",
"filter",
"beams",
"duration",
"correlator"
]
}
\ No newline at end of file
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema#",
"additionalProperties": false,
"definitions": {
"demix_strategy": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"yes",
"no"
]
}
},
"properties": {
"flag": {
"title": "Flagging",
"type": "object",
"additionalProperties": false,
"properties": {
"outerchannels": {
"type": "boolean",
"title": "Flag outer channels",
"default": true
},
"autocorrelations": {
"type": "boolean",
"title": "Flag auto correlations",
"default": true
},
"rfi_strategy": {
"type": "string",
"title": "RFI flagging strategy",
"default": "auto",
"enum": [
"none",
"auto",
"HBAdefault",
"LBAdefault"
]
}
},
"required": [
"outerchannels",
"autocorrelations",
"rfi_strategy"
],
"default": {}
},
"average": {
"title": "Averaging",
"type": "object",
"additionalProperties": false,
"properties": {
"frequency_steps": {
"type": "integer",
"title": "Frequency steps",
"default": 4,
"minimum": 1
},
"time_steps": {
"type": "integer",
"title": "Time steps",
"default": 1,
"minimum": 1
}
},
"required": [
"frequency_steps",
"time_steps"
],
"default": {}
},
"demix": {
"title": "Demixing",
"type": "object",
"additionalProperties": false,
"properties": {
"frequency_steps": {
"type": "integer",
"title": "Frequency steps",
"description": "Must be a multiple of the averaging frequency steps",
"default": 64,
"minimum": 1
},
"time_steps": {
"type": "integer",
"title": "Time steps",
"description": "Must be a multiple of the averaging time steps",
"default": 10,
"minimum": 1
},
"ignore_target": {
"type": "boolean",
"title": "Ignore target",
"default": false
},
"sources": {
"title": "Sources",
"type": "object",
"additionalProperties": false,
"properties": {
"CasA": {
"title": "CasA",
"$ref": "#/definitions/demix_strategy"
},
"CygA": {
"title": "CygA",
"$ref": "#/definitions/demix_strategy"
},
"HerA": {
"title": "HerA",
"$ref": "#/definitions/demix_strategy"
},
"HydraA": {
"title": "HyrdraA",
"$ref": "#/definitions/demix_strategy"
},
"TauA": {
"title": "TauA",
"$ref": "#/definitions/demix_strategy"
},
"VirA": {
"title": "VirA",
"$ref": "#/definitions/demix_strategy"
}
},
"default": {}
}
},
"required": [
"frequency_steps",
"time_steps",
"ignore_target",
"sources"
],
"options": {
"dependencies": {
"demix": true
}
},
"default": {}
},
"storagemanager": {
"type": "string",
"title": "Storage Manager",
"default": "dysco",
"enum": [
"basic",
"dysco"
]
}
},
"required": [
"storagemanager"
]
}
\ No newline at end of file
{
"$id": "http://example.com/example.json",
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"pointing": {
"type": "object",
"additionalProperties": false,
"properties": {
"direction_type": {
"type": "string",
"title": "Reference frame",
"description": "",
"default": "J2000",
"enum": [
"J2000",
"SUN",
"MOON",
"MERCURY",
"VENUS",
"MARS",
"JUPITER",
"SATURN",
"URANUS",
"NEPTUNE",
"PLUTO"
]
},
"angle1": {
"type": "number",
"title": "Angle 1",
"description": "First angle (f.e. RA)",
"default": 0
},
"angle2": {
"type": "number",
"title": "Angle 2",
"description": "Second angle (f.e. DEC)",
"default": 0
}
}
}
},
"additionalProperties": false,
"properties": {
"stations": {
"title": "Station list",
"type": "array",
"default": [{}],
"oneOf": [{
"type": "array",
"title": "Fixed list",
"additionalItems": false,
"additionalProperties": false,
"default": ["CS001"],
"items": {
"type": "string",
"enum": [
"CS001",
"CS002",
"CS003",
"CS004",
"CS005",
"CS006",
"CS007",
"CS011",
"CS013",
"CS017",
"CS021",
"CS024",
"CS026",
"CS028",
"CS030",
"CS031",
"CS032",
"CS101",
"CS103",
"CS201",
"CS301",
"CS302",
"CS401",
"CS501",
"RS104",
"RS106",
"RS205",
"RS208",
"RS210",
"RS305",
"RS306",
"RS307",
"RS310",
"RS406",
"RS407",
"RS409",
"RS410",
"RS503",
"RS508",
"RS509",
"DE601",
"DE602",
"DE603",
"DE604",
"DE605",
"FR606",
"SE607",
"UK608",
"DE609",
"PL610",
"PL611",
"PL612",
"IE613",
"LV614"
],
"title": "Station",
"description": ""
},
"minItems": 1,
"uniqueItems": true
},
{
"title": "Dynamic list",
"type": "array",
"additionalItems": false,
"default": [{}],
"items": {
"type": "object",
"title": "Station set",
"headerTemplate": "{{ self.group }}",
"additionalProperties": false,
"default": {},
"properties": {
"group": {
"type": "string",
"title": "Group/station",
"description": "Which (group of) station(s) to select from",
"default": "ALL",
"enum": [
"ALL",
"SUPERTERP",
"CORE",
"REMOTE",
"DUTCH",
"INTERNATIONAL"
]
},
"min_stations": {
"type": "integer",
"title": "Minimum nr of stations",
"description": "Number of stations to use within group/station",
"default": 1,
"minimum": 0
}
}
}
}
]
},
"antenna_set": {
"type": "string",
"title": "Antenna set",
"description": "Fields & antennas to use",
"default": "HBA_DUAL",
"enum": [
"HBA_DUAL",
"HBA_DUAL_INNER",
"HBA_JOINED",
"HBA_JOINED_INNER",
"HBA_ONE",
"HBA_ONE_INNER",
"HBA_ZERO",
"HBA_ZERO_INNER",
"LBA_INNER",
"LBA_OUTER",
"LBA_SPARSE_EVEN",
"LBA_SPARSE_ODD",
"LBA_ALL"
]
},
"filter": {
"type": "string",
"title": "Band-pass filter",
"description": "Must match antenna type",
"default": "HBA_110_190",
"enum": [
"LBA_10_70",
"LBA_30_70",
"LBA_10_90",
"LBA_30_90",
"HBA_110_190",
"HBA_210_250"
]
},
"analog_pointing": {
"title": "Analog pointing",
"description": "HBA only",
"default": {},
"$ref": "#/definitions/pointing"
},
"beams": {
"type": "array",
"title": "Beams",
"additionalItems": false,
"default": [{}],
"items": {
"title": "Beam",
"headerTemplate": "{{ i0 }} - {{ self.name }}",
"type": "object",
"additionalProperties": false,
"default": {},
"properties": {
"name": {
"type": "string",
"title": "Name/target",
"description": "Identifier for this beam",
"default": ""
},
"digital_pointing": {
"title": "Digital pointing",
"default": {},
"$ref": "#/definitions/pointing"
},
"subbands": {
"type": "array",
"title": "Subband list",
"additionalItems": false,
"default": [],
"items": {
"type": "integer",
"title": "Subband",
"minimum": 0,
"maximum": 511
}
}
}
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment