Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
scheduling_constraints_template-constraints-1.json 4.44 KiB
{
  "$id":"http://tmss.lofar.org/api/schemas/schedulingconstraintstemplate/constraints/1#",
  "$schema": "http://json-schema.org/draft-06/schema#",
  "title": "constraints",
  "description": "This schema defines the scheduling constraints for a scheduling unit",
  "version": 1,
  "definitions": {
    "timestamp": {
      "description": "A timestamp defined in UTC",
      "type": "string",
      "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?Z",
      "format": "date-time"
    },
    "timewindow": {
      "type": "object",
      "description": "A timewindow interval: [from, to)",
      "properties": {
        "from": {
          "$ref": "#/definitions/timestamp"
        },
        "to": {
          "$ref": "#/definitions/timestamp"
        }
      },
      "additionalProperties": false,
      "required": [
        "from",
        "to"
      ]
    },
    "distance_on_sky": {
      "type": "number",
      "minimum": 0,
      "maximum": 3.142
    },
    "elevation": {
      "type": "number",
      "minimum": 0,
      "maximum": 1.571
    }
  },
  "type": "object",
  "properties": {
    "scheduler": {
      "name": "Scheduler",
      "description": "Which scheduling system will schedule this",
      "type": "string",
      "enum": [
        "manual",
        "dynamic"
      ],
      "default": "dynamic"
    },
    "time": {
      "type": "object",
      "default": {},
      "properties": {
        "at": {
          "description": "Start at this moment",
          "$ref": "#/definitions/timestamp"
        },
        "after": {
          "description": "Start after this moment",
          "$ref": "#/definitions/timestamp"
        },
        "before": {
          "description": "End before this moment",
          "$ref": "#/definitions/timestamp"
        },
        "between": {
          "description": "Run within one of these time windows",
          "type": "array",
          "items": {
            "$ref": "#/definitions/timewindow"
          },
          "minItems":0,
          "uniqueItems":true,
          "default": []
        },
        "not_between": {
          "description": "Do NOT run within any of these time windows",
          "type": "array",
          "items": {
            "$ref": "#/definitions/timewindow"
          },
          "minItems":0,
          "uniqueItems":true,
          "default": []
        }
      },
      "additionalProperties": false
    },
    "daily": {
      "type": "object",
      "default": {},
      "properties": {
        "require_night": {
          "description": "Must run at night",
          "type": "boolean",
          "default": false
        },
        "require_day": {
          "description": "Must run in daylight",
          "type": "boolean",
          "default": false
        },
        "avoid_twilight": {
          "description": "Do not run during sunrise or sunset",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "sky": {
      "type": "object",
      "default": {},
      "properties": {
        "min_calibrator_elevation": {
          "description": "Minimum elevation for all calibrator sources",
          "$ref": "#/definitions/elevation",
          "default": 0.5
        },
        "min_target_elevation": {
          "description": "Minimum elevation for all target sources",
          "$ref": "#/definitions/elevation",
          "default": 0.5
        },
        "transit_offset": {
          "description": "Offset window to LST centering",
          "type": "object",
          "properties": {
            "from": {
              "type": "number",
              "minimum": -0.20943951,
              "maximum": 0.20943951
            },
            "to": {
              "type": "number",
              "minimum": -0.20943951,
              "maximum": 0.20943951
            }
          },
          "additionalProperties": false
        },
        "min_distance": {
          "type": "object",
          "properties": {
            "sun": {
              "$ref": "#/definitions/distance_on_sky",
              "default": 0.5
            },
            "moon": {
              "$ref": "#/definitions/distance_on_sky",
              "default": 0.5
            },
            "jupiter": {
              "$ref": "#/definitions/distance_on_sky",
              "default": 0.5
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "scheduler"
  ]
}