JSON representation

MID JSON representation

A full example of a simple MID SB serialised to JSON is given below. This SB is not self consistent (i.e. does not correctly describe an observation “end-to-end”) but gives an example of the structure and possible contents of a MID SB.

SBDefinition also allows to optionally include SDP and CSP configurations.

{
  "interface": "https://schema.skao.int/ska-oso-pdm-sbd/0.1",
  "sbd_id": "sbi-mvp01-20200325-00001",
  "telescope": "ska_mid",
  "metadata": {
    "version": 1,
    "created_by": "Liz Bartlett",
    "created_on": "2022-03-28T15:43:53.971548+00:00",
    "last_modified_on": "2022-03-28T15:43:53.971548+00:00",
    "last_modified_by": "Liz Bartlett"
  },
  "activities": {
    "allocate": {
      "kind": "filesystem",
      "path": "file:///path/to/allocatescript.py",
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    },
    "observe": {
      "kind": "git",
      "path": "git://relative/path/to/scriptinsiderepo.py",
      "repo": "https://gitlab.com/script_repo/operational_scripts",
      "branch": "main",
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    }
  },
  "scan_definitions": [
    {
      "scan_definition_id": "calibrator scan",
      "scan_duration": 60000,
      "target": "Polaris Australis",
      "dish_configuration": "dish config 123",
      "scan_type": "calibration_B",
      "csp_configuration": "csp config 123"
    },
    {
      "scan_duration": 60000,
      "target": "M83",
      "dish_configuration": "dish config 123",
      "scan_type": "science_A",
      "scan_definition_id": "science scan",
      "csp_configuration": "csp config 123"
    }
  ],
  "scan_sequence": [
    "calibrator scan",
    "science scan",
    "science scan",
    "calibrator scan"
  ],
  "targets": [
    {
      "target_id": "Polaris Australis",
      "pointing_pattern": {
        "active": "FivePointParameters",
        "parameters": [
          {
            "kind": "FivePointParameters",
            "offset_arcsec": 5.0
          },
          {
            "kind": "RasterParameters",
            "row_length_arcsec": 1.23,
            "row_offset_arcsec": 4.56,
            "n_rows": 2,
            "pa": 7.89,
            "unidirectional": true
          },
          {
            "kind": "StarRasterParameters",
            "row_length_arcsec": 1.23,
            "n_rows": 2,
            "row_offset_angle": 4.56,
            "unidirectional": true
          }
        ]
      },
      "reference_coordinate": {
        "kind": "equatorial",
        "ra": "21:08:47.92",
        "dec": "-88:57:22.9",
        "reference_frame": "ICRS",
        "unit": [
          "hourangle",
          "deg"
        ]
      }
    },
    {
      "target_id": "M83",
      "pointing_pattern": {
        "active": "SinglePointParameters",
        "parameters": [
          {
            "kind": "SinglePointParameters",
            "offset_x_arcsec": 0.0,
            "offset_y_arcsec": 0.0
          }
        ]
      },
      "reference_coordinate": {
        "kind": "equatorial",
        "ra": "13:37:00.919",
        "dec": "-29:51:56.74",
        "reference_frame": "ICRS",
        "unit": [
          "hourangle",
          "deg"
        ]
      }
    }
  ],
  "sdp_configuration": {
    "execution_block": {
      "eb_id": "eb-mvp01-20200325-00001",
      "max_length": 100.0,
      "context": {
        "foo": "bar",
        "baz": 123
      },
      "beams": [
        {
          "beam_id": "vis0",
          "function": "visibilities"

        },
        {
          "beam_id": "pss1",
          "search_beam_id": 1,
          "function": "pulsar search"
        },
        {
          "beam_id": "pss2",
          "search_beam_id": 2,
          "function": "pulsar search"
        },
        {
          "beam_id": "pst1",
          "timing_beam_id": 1,
          "function": "pulsar search"
        },
        {
          "beam_id": "pst2",
          "timing_beam_id": 2,
          "function": "pulsar search"
        },
        {
          "beam_id": "vlbi",
          "vlbi_beam_id": 1,
          "function": "vlbi"
        }
      ],
      "scan_types": [
        {
          "scan_type_id": ".default",
          "beams": [
            {
              "beam_id": "vis0",
              "channels_id": "vis_channels",
              "polarisations_id": "all"
            },
            {
              "beam_id": "pss1",
              "field_id": "M83",
              "channels_id": "pulsar_channels",
              "polarisations_id": "all"
            },
            {
              "beam_id": "pss2",
              "field_id": "Polaris Australis",
              "channels_id": "pulsar_channels",
              "polarisations_id": "all"
            },
            {
              "beam_id": "pst1",
              "field_id": "M83",
              "channels_id": "pulsar_channels",
              "polarisations_id": "all"
            },
            {
              "beam_id": "pst2",
              "field_id": "Polaris Australis",
              "channels_id": "pulsar_channels",
              "polarisations_id": "all"
            },
            {
              "beam_id": "vlbi",
              "field_id": "Polaris Australis",
              "channels_id": "vlbi_channels",
              "polarisations_id": "all"
            }
          ]
        },
        {
          "scan_type_id": ".default",
          "derive_from": ".default",
          "beams": [
            {
              "beam_id": "vis0",
              "field_id": "M83"
            }
          ]
        }
      ],
      "channels": [
        {
          "channels_id": "vis_channels",
          "spectral_windows": [
            {
              "spectral_window_id": "fsp_1_channels",
              "count": 744,
              "start": 0,
              "stride": 2,
              "freq_min": 350000000,
              "freq_max": 368000000,
              "link_map": [
                [
                  0,
                  0
                ],
                [
                  200,
                  1
                ],
                [
                  744,
                  2
                ],
                [
                  944,
                  3
                ]
              ]
            },
            {
              "spectral_window_id": "fsp_2_channels",
              "count": 744,
              "start": 2000,
              "stride": 1,
              "freq_min": 360000000,
              "freq_max": 368000000,
              "link_map": [
                [
                  2000,
                  4
                ],
                [
                  2200,
                  5
                ]
              ]
            },
            {
              "spectral_window_id": "zoom_window_1",
              "count": 744,
              "start": 4000,
              "stride": 1,
              "freq_min": 360000000,
              "freq_max": 361000000,
              "link_map": [
                [
                  4000,
                  6
                ],
                [
                  4200,
                  7
                ]
              ]
            }
          ]
        },
        {
          "channels_id": "pulsar_channels",
          "spectral_windows": [
            {
              "spectral_window_id": "pulsar_fsp_channels",
              "count": 744,
              "start": 0,
              "freq_min": 350000000,
              "freq_max": 368000000
            }
          ]
        }
      ],
      "polarisations": [
        {
          "polarisations_id": "all",
          "corr_type": [
            "XX",
            "XY",
            "YY",
            "YX"
          ]
        }
      ]
    },
    "processing_blocks": [
      {
        "pb_id": "pb-mvp01-20200325-00001",
        "sbi_ids": [
          "sbi-mvp01-20200325-00001"
        ],
        "script": {
          "version": "0.1.0",
          "name": "vis_receive",
          "kind": "realtime"
        },
        "parameters": {}
      },
      {
        "pb_id": "pb-mvp01-20200325-00002",
        "sbi_ids": [
          "sbi-mvp01-20200325-00001"
        ],
        "script": {
          "version": "0.1.0",
          "name": "test_realtime",
          "kind": "realtime"
        },
        "parameters": {}
      },
      {
        "pb_id": "pb-mvp01-20200325-00003",
        "sbi_ids": [
          "sbi-mvp01-20200325-00001"
        ],
        "script": {
          "version": "0.1.0",
          "name": "ical",
          "kind": "batch"
        },
        "parameters": {},
        "dependencies": [
          {
            "pb_id": "pb-mvp01-20200325-00001",
            "kind": [
              "visibilities"
            ]
          }
        ]
      },
      {
        "pb_id": "pb-mvp01-20200325-00004",
        "sbi_ids": [
          "sbi-mvp01-20200325-00001"
        ],
        "script": {
          "version": "0.1.0",
          "name": "dpreb",
          "kind": "batch"
        },
        "parameters": {},
        "dependencies": [
          {
            "pb_id": "pb-mvp01-20200325-00003",
            "kind": [
              "calibration"
            ]
          }
        ]
      }
    ],
    "resources": {
      "csp_links": [
        1,
        2,
        3,
        4
      ],
      "receptors": [
        "FS4",
        "FS8",
        "FS16",
        "FS17",
        "FS22",
        "FS23",
        "FS30",
        "FS31",
        "FS32",
        "FS33",
        "FS36",
        "FS52",
        "FS56",
        "FS57",
        "FS59",
        "FS62",
        "FS66",
        "FS69",
        "FS70",
        "FS72",
        "FS73",
        "FS78",
        "FS80",
        "FS88",
        "FS89",
        "FS90",
        "FS91",
        "FS98",
        "FS108",
        "FS111",
        "FS132",
        "FS144",
        "FS146",
        "FS158",
        "FS165",
        "FS167",
        "FS176",
        "FS183",
        "FS193",
        "FS200",
        "FS345",
        "FS346",
        "FS347",
        "FS348",
        "FS349",
        "FS350",
        "FS351",
        "FS352",
        "FS353",
        "FS354",
        "FS355",
        "FS356",
        "FS429",
        "FS430",
        "FS431",
        "FS432",
        "FS433",
        "FS434",
        "FS465",
        "FS466",
        "FS467",
        "FS468",
        "FS469",
        "FS470"
      ],
      "receive_nodes": 10
    }
  },
  "csp_configurations": [
    {
      "config_id": "csp config 123",
      "subarray": {
        "subarray_name": "science period 23"
      },
      "common": {
        "subarray_id": 1,
        "band_5_tuning": [
          5.85,
          7.25
        ]
      },
      "cbf": {
        "fsp": [
          {
            "fsp_id": 1,
            "function_mode": "CORR",
            "frequency_slice_id": 1,
            "integration_factor": 1,
            "zoom_factor": 0,
            "channel_averaging_map": [
              [
                0,
                2
              ],
              [
                744,
                0
              ]
            ],
            "channel_offset": 0,
            "output_link_map": [
              [
                0,
                0
              ],
              [
                200,
                1
              ]
            ]
          },
          {
            "fsp_id": 2,
            "function_mode": "CORR",
            "frequency_slice_id": 2,
            "integration_factor": 1,
            "zoom_factor": 1,
            "zoom_window_tuning": 650000
          }
        ]
      }
    }
  ],
  "dish_allocations": {
    "receptor_ids": [
      "0001",
      "0002"
    ]
  },
  "dish_configurations": [
    {
      "dish_configuration_id": "dish config 123",
      "receiver_band": "5a"
    }
  ]
}

LOW JSON representation

A full example of a simple SKA LOW SB serialised to JSON is given below. This LOW SBDefinition, identified as “sbi-mvp01-20200325-00001”, defines a MCCS subarray beam, beam A, composed of stations 1 and 2, configured to output on one channel block. One field consisting of two targets is defined. The targets are drift scan targets, at 45 degree and 85 degree elevation respectively. One subarray beam configuration is defined. If other scans required different subarray beam configurations, they would be defined here too. The SB then defines two target beam configurations that link subarray beam configurations to targets: each configuration points beam A at 45 degree elevation and 85 degree elevation targets respectively. Two scan definitions are defined that each perform a drift scan. The first is defined as the ‘calibrator scan’ that is using the subarray beam configuration for the first ‘target’ at 45 degrees elevation, the second is the ‘science scan’ which uses the same subarray beam configuration with the second target at 85 degrees. Finally, the scan sequence declares the observation to consist of four scans, with a calibrator scan bookending two science scans performed back-to-back.

{
  "interface": "https://schema.skao.int/ska-oso-pdm-sbd/0.1",
  "sbd_id": "sbi-mvp01-20200325-00001",
  "telescope": "ska_low",
  "metadata": {
    "version": 1,
    "created_by": "Liz Bartlett",
    "created_on": "2022-03-28T15:43:53.971548+00:00"
  },
  "activities": {
    "allocate": {
      "kind": "filesystem",
      "path": "/path/to/allocatescript.py",
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    },
    "observe": {
      "kind": "git",
      "path": "/relative/path/to/scriptinsiderepo.py",
      "repo": "https://gitlab.com/script_repo/operational_scripts",
      "branch": "main",
      "commit": "d234c257dadd18b3edcd990b8194c6ad94fc278a",
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    }
  },
  "scan_definitions": [
    {
      "scan_definition_id": "sbi-mvp01-20220328-00001",
      "scan_duration": 64000,
      "target_beam_configurations": [
        "target #1 with beam A config 1"
      ],
      "target": "target #1"
    },
    {
      "scan_definition_id": "sbi-mvp01-20220328-00002",
      "scan_duration": 64000,
      "target_beam_configurations": [
        "target #2 with beam A config 1"
      ],
      "target": "target #2"
    }
  ],
  "scan_sequence": [
    "sbi-mvp01-20220328-00001",
    "sbi-mvp01-20220328-00002",
    "sbi-mvp01-20220328-00002",
    "sbi-mvp01-20220328-00001"
  ],
  "targets": [
    {
      "target_id": "target #1",
      "pointing_pattern": {
        "active": "SinglePointParameters",
        "parameters": [
          {
            "kind": "SinglePointParameters",
            "offset_x_arcsec": 0.0,
            "offset_y_arcsec": 0.0
          }
        ]
      },
      "reference_coordinate": {
        "kind": "horizontal",
        "az": 180.0,
        "el": 45.0,
        "reference_frame": "ALTAZ",
        "unit": ["deg"]
      }
    },
    {
      "target_id": "target #2",
      "pointing_pattern": {
        "active": "SinglePointParameters",
        "parameters": [
          {
            "kind": "SinglePointParameters",
            "offset_x_arcsec": 0.0,
            "offset_y_arcsec": 0.0
          }
        ]
      },
      "reference_coordinate": {
        "kind": "horizontal",
        "az": 180.0,
        "el": 85.0,
        "reference_frame": "ALTAZ",
        "unit": ["deg"]
      }
    }
  ],
  "mccs_allocation": {
    "subarray_beam_ids": [
      "beam A"
    ],
    "station_ids": [
      [
        1,
        2
      ]
    ],
    "channel_blocks": [
      1
    ]
  },
  "target_beam_configurations": [
    {
      "target_beam_id": "target #1 with beam A config 1",
      "target": "target #1",
      "subarray_beam_configuration": "beam A config 1"
    },
    {
      "target_beam_id": "target #2 with beam A config 1",
      "target": "target #2",
      "subarray_beam_configuration": "beam A config 1"
    }
  ],
  "subarray_beam_configurations": [
    {
      "subarray_beam_configuration_id": "beam A config 1",
      "subarray_beam_id": "beam A",
      "update_rate": 0.0,
      "antenna_weights": [
        1.0,
        1.0,
        1.0
      ],
      "phase_centre": [
        0.0,
        0.0
      ],
      "channels": [
        [
          0,
          8,
          1,
          1
        ],
        [
          8,
          8,
          2,
          1
        ]
      ]
    }
  ]
}