From 3c28b80a91625a9a8c0c96fe1dce7e467b7a841f Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Mon, 14 Sep 2020 15:37:38 +0200
Subject: [PATCH] TMSS-000: revert of demo patches.

---
 .../schemas/common_schema_template-qa-1.json  | 206 +++------
 .../common_schema_template-stations-1.json    | 322 +++++--------
 .../task_template-target_observation-1.json   | 435 ++++--------------
 .../src/tmss/tmssapp/serializers/widgets.py   |   3 -
 4 files changed, 271 insertions(+), 695 deletions(-)

diff --git a/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-qa-1.json b/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-qa-1.json
index 3efb3adcb16..a023ce3c2a3 100644
--- a/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-qa-1.json
+++ b/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-qa-1.json
@@ -1,152 +1,92 @@
 {
-  "$id": "http://scu199.control.lofar:8008/api/schemas/commonschematemplate/QA/1#",
-  "title": "QA",
+  "$id":"http://tmss.lofar.org/api/schemas/commonschematemplate/QA/1#",
   "$schema": "http://json-schema.org/draft-06/schema#",
-  "version": 1,
-  "definitions": {
-    "QA": {
-      "type": "object",
-      "title": "QA",
-      "default": {},
-      "required": [
-        "file_conversion",
-        "plots"
-      ],
-      "properties": {
-        "plots": {
-          "type": "object",
-          "title": "Plots",
-          "default": {},
-          "required": [
-            "enabled",
-            "autocorrelation",
-            "crosscorrelation"
-          ],
-          "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"
-            }
-          },
-          "description": "Create dynamic spectrum plots",
-          "additionalProperties": false
+  "title":"QA",
+  "description":"This schema defines the parameters to setup and control the Quality Assurance (QA) tasks.",
+  "version":1,
+  "definitions":{
+    "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"
         },
-        "file_conversion": {
-          "type": "object",
-          "title": "File Conversion",
-          "default": {},
-          "required": [
-            "enabled",
-            "nr_of_subbands",
-            "nr_of_timestamps"
-          ],
-          "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)"
-            }
-          },
-          "description": "Create a QA file for the observation",
-          "additionalProperties": false
+        "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)"
         }
       },
-      "description": "Perform all Quality Assurance (QA) tasks, including file conversion and plotting.",
-      "additionalProperties": false
-    },
-    "plots": {
-      "type": "object",
-      "title": "Plots",
-      "default": {},
+      "additionalProperties":false,
       "required": [
         "enabled",
-        "autocorrelation",
-        "crosscorrelation"
-      ],
-      "properties": {
-        "enabled": {
-          "type": "boolean",
-          "title": "enabled",
-          "default": true,
-          "description": "Do/Don't create plots from the QA file from the observation"
+        "nr_of_subbands",
+        "nr_of_timestamps"]
+    },
+    "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"
+        "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"
+        "crosscorrelation":{
+          "type":"boolean",
+          "title":"crosscorrelation",
+          "default":true,
+          "description":"Create crosscorrelation plots for all baselines"
         }
       },
-      "description": "Create dynamic spectrum plots",
-      "additionalProperties": false
-    },
-    "file_conversion": {
-      "type": "object",
-      "title": "File Conversion",
-      "default": {},
+      "additionalProperties":false,
       "required": [
         "enabled",
-        "nr_of_subbands",
-        "nr_of_timestamps"
-      ],
+        "autocorrelation",
+        "crosscorrelation"]
+    },
+    "QA": {
+      "type":"object",
+      "title":"QA",
+      "description":"Perform all Quality Assurance (QA) tasks, including file conversion and plotting.",
+      "default":{},
       "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"
+        "file_conversion" : {
+          "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/QA/1#/definitions/file_conversion",
+          "default": {}
         },
-        "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)"
+        "plots" : {
+          "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/QA/1#/definitions/plots",
+          "default": {}
         }
       },
-      "description": "Create a QA file for the observation",
-      "additionalProperties": false
+      "additionalProperties":false,
+      "required": [
+        "file_conversion",
+        "plots"]
     }
-  },
-  "description": "This schema defines the parameters to setup and control the Quality Assurance (QA) tasks."
+  }
 }
\ No newline at end of file
diff --git a/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-stations-1.json b/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-stations-1.json
index 1a4024296bc..6c598b18722 100644
--- a/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-stations-1.json
+++ b/SAS/TMSS/src/tmss/tmssapp/schemas/common_schema_template-stations-1.json
@@ -1,207 +1,22 @@
 {
-  "$id": "http://scu199.control.lofar:8008/api/schemas/commonschematemplate/stations/1#",
-  "type": "object",
-  "title": "stations",
+  "$id":"http://tmss.lofar.org/api/schemas/commonschematemplate/stations/1#",
   "$schema": "http://json-schema.org/draft-06/schema#",
-  "version": 1,
-  "definitions": {
-    "filter": {
-      "enum": [
-        "LBA_10_70",
-        "LBA_30_70",
-        "LBA_10_90",
-        "LBA_30_90",
-        "HBA_110_190",
-        "HBA_210_250"
-      ],
-      "type": "string",
-      "title": "Band-pass filter",
-      "default": "HBA_110_190",
-      "description": "Must match antenna type"
-    },
-    "stations": {
-      "oneOf": [
-        {
-          "type": "object",
-          "items": {
-            "type": "object",
-            "title": "Station set",
-            "required": [
-              "group",
-              "min_stations"
-            ],
-            "properties": {
-              "group": {
-                "enum": [
-                  "ALL",
-                  "SUPERTERP",
-                  "CORE",
-                  "REMOTE",
-                  "DUTCH",
-                  "INTERNATIONAL"
-                ],
-                "type": "string",
-                "title": "Group/station",
-                "default": "ALL",
-                "description": "Which (group of) station(s) to select from"
-              },
-              "min_stations": {
-                "type": "integer",
-                "title": "Minimum nr of stations",
-                "default": 1,
-                "minimum": 0,
-                "description": "Number of stations to use within group/station"
-              }
-            },
-            "headerTemplate": "{{ self.group }}",
-            "additionalProperties": false
-          },
-          "title": "dynamic station set",
-          "default": {},
-          "additionalItems": false
-        },
-        {
-          "type": "array",
-          "items": {
-            "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"
-            ],
-            "type": "string",
-            "title": "Station",
-            "description": ""
-          },
-          "title": "fixed station list",
-          "default": [
-            "CS001"
-          ],
-          "minItems": 1,
-          "uniqueItems": true,
-          "additionalItems": false,
-          "additionalProperties": false
-        }
-      ],
-      "title": "stations",
-      "default": {
-        "group": "ALL",
-        "min_stations": 1
-      },
-      "description": "Use either the fixed station list, or one of the dynamic station sets."
-    },
-    "antenna_set": {
-      "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"
+  "title":"stations",
+  "description":"This schema provives a definitions for the LOFAR stations and their antenna sets and filters",
+  "version":"1",
+  "type":"object",
+  "definitions":{
+    "station_list":{
+      "title":"fixed station list",
+      "default":[
+        "CS001"
       ],
-      "type": "string",
-      "title": "Antenna set",
-      "default": "HBA_DUAL",
-      "description": "Fields & antennas to use"
-    },
-    "station_set": {
-      "type": "object",
-      "items": {
-        "type": "object",
-        "title": "Station set",
-        "required": [
-          "group",
-          "min_stations"
-        ],
-        "properties": {
-          "group": {
-            "enum": [
-              "ALL",
-              "SUPERTERP",
-              "CORE",
-              "REMOTE",
-              "DUTCH",
-              "INTERNATIONAL"
-            ],
-            "type": "string",
-            "title": "Group/station",
-            "default": "ALL",
-            "description": "Which (group of) station(s) to select from"
-          },
-          "min_stations": {
-            "type": "integer",
-            "title": "Minimum nr of stations",
-            "default": 1,
-            "minimum": 0,
-            "description": "Number of stations to use within group/station"
-          }
-        },
-        "headerTemplate": "{{ self.group }}",
-        "additionalProperties": false
-      },
-      "title": "dynamic station set",
-      "default": {},
-      "additionalItems": false
-    },
-    "station_list": {
-      "type": "array",
-      "items": {
-        "enum": [
+      "type":"array",
+      "additionalItems":false,
+      "additionalProperties":false,
+      "items":{
+        "type":"string",
+        "enum":[
           "CS001",
           "CS002",
           "CS003",
@@ -257,19 +72,98 @@
           "IE613",
           "LV614"
         ],
-        "type": "string",
-        "title": "Station",
-        "description": ""
+        "title":"Station",
+        "description":""
       },
-      "title": "fixed station list",
-      "default": [
-        "CS001"
+      "minItems":1,
+      "uniqueItems":true
+    },
+    "station_set":{
+      "title":"dynamic station set",
+      "type":"object",
+      "default":{},
+      "additionalItems":false,
+      "items":{
+        "type":"object",
+        "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"
+        ]
+      }
+    },
+    "stations": {
+      "title":"stations",
+      "description":"Use either the fixed station list, or one of the dynamic station sets.",
+      "oneOf": [ {
+          "$ref": "#/definitions/station_list"
+        },
+        {
+          "$ref": "#/definitions/station_set"
+        }
       ],
-      "minItems": 1,
-      "uniqueItems": true,
-      "additionalItems": false,
-      "additionalProperties": false
+      "default": {
+        "group": "ALL",
+        "min_stations": 1
+      }
+    },
+    "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"
+      ]
     }
-  },
-  "description": "This schema provives a definitions for the LOFAR stations and their antenna sets and filters"
-}
+  }
+}
\ No newline at end of file
diff --git a/SAS/TMSS/src/tmss/tmssapp/schemas/task_template-target_observation-1.json b/SAS/TMSS/src/tmss/tmssapp/schemas/task_template-target_observation-1.json
index f9fd0edd0b3..b4e8f192401 100644
--- a/SAS/TMSS/src/tmss/tmssapp/schemas/task_template-target_observation-1.json
+++ b/SAS/TMSS/src/tmss/tmssapp/schemas/task_template-target_observation-1.json
@@ -1,356 +1,93 @@
 {
-  "$id": "http://0.0.0.0:8008/api/schemas/tasktemplate/target%20observation/1#",
-  "type": "object",
-  "title": "target observation",
+  "$id": "http://tmss.lofar.org/api/schemas/tasktemplate/target observation/1#",
   "$schema": "http://json-schema.org/draft-06/schema#",
+  "title": "target observation",
+  "description": "This schema defines the parameters to setup a target observation task.",
   "version": 1,
-  "required": [
-    "stations",
-    "antenna_set",
-    "filter",
-    "SAPs",
-    "duration",
-    "correlator"
-  ],
+  "type": "object",
   "properties": {
-    "QA": {
-      "type": "object",
-      "title": "QA",
+    "stations": {
+      "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/stations/1/#/definitions/stations",
+      "default": ["CS001"]
+    },
+    "antenna_set": {
+      "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/stations/1/#/definitions/antenna_set",
+      "default": "HBA_DUAL"
+    },
+    "filter": {
+      "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/stations/1/#/definitions/filter",
+      "default": "HBA_110_190"
+    },
+    "tile_beam": {
+      "title": "Tile beam",
+      "description": "HBA only",
       "default": {},
-      "required": [
-        "file_conversion",
-        "plots"
-      ],
-      "properties": {
-        "plots": {
-          "type": "object",
-          "title": "Plots",
-          "default": {},
-          "required": [
-            "enabled",
-            "autocorrelation",
-            "crosscorrelation"
-          ],
-          "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"
-            }
-          },
-          "description": "Create dynamic spectrum plots",
-          "additionalProperties": false
-        },
-        "file_conversion": {
-          "type": "object",
-          "title": "File Conversion",
-          "default": {},
-          "required": [
-            "enabled",
-            "nr_of_subbands",
-            "nr_of_timestamps"
-          ],
-          "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)"
-            }
-          },
-          "description": "Create a QA file for the observation",
-          "additionalProperties": false
-        }
-      },
-      "description": "Perform all Quality Assurance (QA) tasks, including file conversion and plotting.",
-      "additionalProperties": false
+      "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/pointing/1/#/definitions/pointing"
     },
     "SAPs": {
       "type": "array",
+      "title": "SAPs",
+      "description": "Station beams",
+      "additionalItems": false,
+      "default": [
+        {}
+      ],
       "items": {
-        "type": "object",
         "title": "SAP",
+        "headerTemplate": "{{ i0 }} - {{ self.name }}",
+        "type": "object",
+        "additionalProperties": false,
         "default": {},
-        "required": [
-          "digital_pointing",
-          "subbands"
-        ],
         "properties": {
           "name": {
             "type": "string",
             "title": "Name/target",
-            "default": "",
-            "description": "Identifier for this beam"
+            "description": "Identifier for this beam",
+            "default": ""
+          },
+          "digital_pointing": {
+            "title": "Digital pointing",
+            "default": {},
+            "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/pointing/1/#/definitions/pointing"
           },
           "subbands": {
             "type": "array",
+            "title": "Subband list",
+            "additionalItems": false,
+            "default": [],
             "items": {
               "type": "integer",
               "title": "Subband",
-              "maximum": 511,
-              "minimum": 0
-            },
-            "title": "Subband list",
-            "default": [],
-            "additionalItems": false
-          },
-          "digital_pointing": {
-            "type": "object",
-            "default": {},
-            "required": [
-              "angle1",
-              "angle2"
-            ],
-            "properties": {
-              "angle1": {
-                "type": "number",
-                "title": "Angle 1",
-                "default": 0,
-                "description": "First angle (e.g. RA)"
-              },
-              "angle2": {
-                "type": "number",
-                "title": "Angle 2",
-                "default": 0,
-                "description": "Second angle (e.g. DEC)"
-              },
-              "angle3": {
-                "type": "number",
-                "title": "Angle 3",
-                "default": 0,
-                "description": "Third angle (e.g. N in LMN)"
-              },
-              "direction_type": {
-                "enum": [
-                  "J2000",
-                  "AZELGEO",
-                  "LMN",
-                  "SUN",
-                  "MOON",
-                  "MERCURY",
-                  "VENUS",
-                  "MARS",
-                  "JUPITER",
-                  "SATURN",
-                  "URANUS",
-                  "NEPTUNE",
-                  "PLUTO"
-                ],
-                "type": "string",
-                "title": "Reference frame",
-                "default": "J2000",
-                "description": ""
-              }
-            },
-            "additionalProperties": false
+              "minimum": 0,
+              "maximum": 511
+            }
           }
         },
-        "headerTemplate": "{{ i0 }} - {{ self.name }}",
-        "additionalProperties": false
-      },
-      "title": "SAPs",
-      "default": [
-        {}
-      ],
-      "description": "Station beams",
-      "additionalItems": false
-    },
-    "filter": {
-      "enum": [
-        "LBA_10_70",
-        "LBA_30_70",
-        "LBA_10_90",
-        "LBA_30_90",
-        "HBA_110_190",
-        "HBA_210_250"
-      ],
-      "type": "string",
-      "title": "Band-pass filter",
-      "default": "HBA_110_190",
-      "description": "Must match antenna type"
+        "required": [
+          "digital_pointing",
+          "subbands"
+        ]
+      }
     },
     "duration": {
       "type": "number",
       "title": "Duration (seconds)",
+      "description": "Duration of this observation",
       "default": 300,
-      "minimum": 1,
-      "description": "Duration of this observation"
-    },
-    "stations": {
-      "type": "array",
-      "items": {
-        "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"
-        ],
-        "type": "string",
-        "title": "Station",
-        "description": ""
-      },
-      "title": "fixed station list",
-      "default": [
-        "CS001"
-      ],
-      "minItems": 1,
-      "uniqueItems": true,
-      "additionalItems": false,
-      "additionalProperties": false
-    },
-    "tile_beam": {
-      "type": "object",
-      "required": [
-        "angle1",
-        "angle2"
-      ],
-      "properties": {
-        "angle1": {
-          "type": "number",
-          "title": "Angle 1",
-          "default": 0,
-          "description": "First angle (e.g. RA)"
-        },
-        "angle2": {
-          "type": "number",
-          "title": "Angle 2",
-          "default": 0,
-          "description": "Second angle (e.g. DEC)"
-        },
-        "angle3": {
-          "type": "number",
-          "title": "Angle 3",
-          "default": 0,
-          "description": "Third angle (e.g. N in LMN)"
-        },
-        "direction_type": {
-          "enum": [
-            "J2000",
-            "AZELGEO",
-            "LMN",
-            "SUN",
-            "MOON",
-            "MERCURY",
-            "VENUS",
-            "MARS",
-            "JUPITER",
-            "SATURN",
-            "URANUS",
-            "NEPTUNE",
-            "PLUTO"
-          ],
-          "type": "string",
-          "title": "Reference frame",
-          "default": "J2000",
-          "description": ""
-        }
-      },
-      "additionalProperties": false
+      "minimum": 1
     },
     "correlator": {
-      "type": "object",
       "title": "Correlator Settings",
+      "type": "object",
+      "additionalProperties": false,
       "default": {},
-      "required": [
-        "channels_per_subband",
-        "integration_time",
-        "storage_cluster"
-      ],
       "properties": {
-        "storage_cluster": {
-          "enum": [
-            "CEP4",
-            "DragNet"
-          ],
-          "type": "string",
-          "title": "Storage cluster",
-          "default": "CEP4",
-          "description": "Cluster to write output to"
-        },
-        "integration_time": {
-          "type": "number",
-          "title": "Integration time (seconds)",
-          "default": 1,
-          "minimum": 0.1,
-          "description": "Desired integration period"
-        },
         "channels_per_subband": {
+          "type": "integer",
+          "title": "Channels/subband",
+          "description": "Number of frequency bands per subband",
+          "default": 64,
+          "minimum": 8,
           "enum": [
             8,
             16,
@@ -360,35 +97,43 @@
             256,
             512,
             1024
-          ],
-          "type": "integer",
-          "title": "Channels/subband",
-          "default": 64,
-          "minimum": 8,
-          "description": "Number of frequency bands per subband"
+          ]
+        },
+        "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"
+          ]
         }
       },
-      "additionalProperties": false
+      "required": [
+        "channels_per_subband",
+        "integration_time",
+        "storage_cluster"
+      ]
     },
-    "antenna_set": {
-      "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"
-      ],
-      "type": "string",
-      "title": "Antenna set",
-      "default": "HBA_DUAL",
-      "description": "Fields & antennas to use"
+    "QA": {
+      "$ref": "http://tmss.lofar.org/api/schemas/commonschematemplate/QA/1/#/definitions/QA",
+      "default": {}
     }
   },
-  "description": "This schema defines the parameters to setup a target observation task."
+  "required": [
+    "stations",
+    "antenna_set",
+    "filter",
+    "SAPs",
+    "duration",
+    "correlator"
+  ]
 }
\ No newline at end of file
diff --git a/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py b/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py
index b2e6982bd92..d2d3adfff7c 100644
--- a/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py
+++ b/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py
@@ -72,7 +72,4 @@ class JSONEditorField(serializers.JSONField):
                 self.style = {'template': 'josdejong_jsoneditor_widget.html',
                               'schema': json.dumps(schema)}
 
-        if self.parent.context['request'].accepted_media_type == 'application/json':
-            return super().to_representation(json_utils.resolved_refs(value))
-
         return super().to_representation(value)
-- 
GitLab