JSON representation

MID JSON representation

A full example of a simple MID SB serialised to JSON is given below. This SBDefinition, identified as ‘sbi-mvp01-20200325-00001’, defines two field configurations identified as ‘science field’ and ‘calibrator field’ respectively. Field configuration ‘science field’ contains 2 sidereal targets, identified as beam #1 and beam #2 which point at two sidereal positions. Field configuration ‘calibrator field’ contains one target with ID ‘bandpass calibrator’ which points at Mars. Two scan definitions are defined: a scan identified as calibrator scan, which would observe the field calibrator field (=Mars) for 10 seconds, and a scan identified as science scan, which would observe the field science field (=beam #1 and beam #2) for 60 seconds. The scan_sequence says to observe calibrator scan, science scan, science scan, calibrator scan, so the final observing sequence would be:

  1. Observe Mars for 10 seconds
  2. Observe beam #1 and beam #2 for 60 seconds
  3. Observe beam #1 and beam #2 again for 60 seconds
  4. Observe Mars for 10 seconds

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",
    "last_modified_on": "2022-03-28T15:43:53.971548",
    "last_modified_by": "Liz Bartlett"
  },
  "activities": {
    "allocate": {
      "procedure_type": "filesystemscript",
      "path": "/path/to/allocatescript.py",
      "default_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "run": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    },
    "observe": {
      "procedure_type": "gitscript",
      "path": "/relative/path/to/scriptinsiderepo.py",
      "repo": "https://gitlab.com/script_repo/operational_scripts",
      "branch": "main",
      "default_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "run": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    }
  },
  "scan_definitions": [
    {
      "scan_definition_id": "calibrator scan",
      "scan_duration": 60000,
      "field_configuration": "calibrator field",
      "dish_configuration": "dish config 123",
      "scan_type": "calibration_B",
      "csp_configuration": "csp-mvp01-20220329-00001"
    },
    {
      "scan_duration": 60000,
      "field_configuration": "science field",
      "dish_configuration": "dish config 123",
      "scan_type": "science_A",
      "scan_definition_id": "science scan"
    }
  ],
  "scan_sequence": [
    "calibrator scan",
    "science scan",
    "science scan",
    "calibrator scan"
  ],
  "field_configurations": [
    {
      "field_id": "calibrator field",
      "targets": [
        {
          "target_id": "my calibrator target",
          "kind": "sidereal",
          "target_name": "Polaris Australis",
          "reference_frame": "ICRS",
          "ra": "21:08:47.92",
          "dec": "-88:57:22.9"
        }
      ]
    },
    {
      "field_id": "science field",
      "targets": [
        {
          "target_id": "my science target",
          "kind": "sidereal",
          "target_name": "Polaris Australis",
          "reference_frame": "ICRS",
          "ra": "21:08:47.92",
          "dec": "-88:57:22.9"
        }
      ]
    }
  ],
  "sdp_configuration": {
    "eb_id": "eb-mvp01-20200325-00001",
    "max_length": 100.0,
    "scan_types": [
      {
        "scan_type_id": "science_A",
        "target": "my science target",
        "channels": [
          {
            "count": 744,
            "start": 0,
            "stride": 2,
            "freq_min": 0.35e9,
            "freq_max": 0.368e9,
            "link_map": [
              [
                0,
                0
              ],
              [
                200,
                1
              ],
              [
                744,
                2
              ],
              [
                944,
                3
              ]
            ]
          },
          {
            "count": 744,
            "start": 2000,
            "stride": 1,
            "freq_min": 0.36e9,
            "freq_max": 0.368e9,
            "link_map": [
              [
                2000,
                4
              ],
              [
                2200,
                5
              ]
            ]
          }
        ]
      },
      {
        "scan_type_id": "calibration_B",
        "target": "my calibrator target",
        "channels": [
          {
            "count": 744,
            "start": 0,
            "stride": 2,
            "freq_min": 0.35e9,
            "freq_max": 0.368e9,
            "link_map": [
              [
                0,
                0
              ],
              [
                200,
                1
              ],
              [
                744,
                2
              ],
              [
                944,
                3
              ]
            ]
          },
          {
            "count": 744,
            "start": 2000,
            "stride": 1,
            "freq_min": 0.36e9,
            "freq_max": 0.368e9,
            "link_map": [
              [
                2000,
                4
              ],
              [
                2200,
                5
              ]
            ]
          }
        ]
      }
    ],
    "processing_blocks": [
      {
        "pb_id": "pb-mvp01-20200325-00001",
        "workflow": {
          "name": "vis_receive",
          "kind": "realtime",
          "version": "0.1.0"
        },
        "parameters": {}
      },
      {
        "pb_id": "pb-mvp01-20200325-00002",
        "workflow": {
          "name": "test_receive_addresses",
          "kind": "realtime",
          "version": "0.3.2"
        },
        "parameters": {}
      },
      {
        "pb_id": "pb-mvp01-20200325-00003",
        "workflow": {
          "name": "ical",
          "kind": "batch",
          "version": "0.1.0"
        },
        "parameters": {},
        "dependencies": [
          {
            "pb_id": "pb-mvp01-20200325-00001",
            "kind": [
              "visibilities"
            ]
          }
        ]
      },
      {
        "pb_id": "pb-mvp01-20200325-00004",
        "workflow": {
          "name": "dpreb",
          "kind": "batch",
          "version": "0.1.0"
        },
        "parameters": {},
        "dependencies": [
          {
            "kind": [
              "calibration"
            ],
            "pb_id": "pb-mvp01-20200325-00003"
          }
        ]
      }
    ]
  },
  "csp_configurations": [
    {
      "config_id": "csp-mvp01-20220329-00001",
      "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": "dci_mvp01-20220329-00001",
      "receiver_band": "1"
    }
  ]
}

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"
  },
  "activities": {
    "allocate": {
      "procedure_type": "filesystemscript",
      "path": "/path/to/allocatescript.py",
      "default_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "run": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      }
    },
    "observe": {
      "procedure_type": "gitscript",
      "path": "/relative/path/to/scriptinsiderepo.py",
      "repo": "https://gitlab.com/script_repo/operational_scripts",
      "branch": "main",
      "commit": "d234c257dadd18b3edcd990b8194c6ad94fc278a",
      "default_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "run": {
          "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"
      ],
      "field_configuration": "target field"
    },
    {
      "scan_definition_id": "sbi-mvp01-20220328-00002",
      "scan_duration": 64000,
      "target_beam_configurations": [
        "target #2 with beam A config 1"
      ],
      "field_configuration": "target field"
    }
  ],
  "scan_sequence": [
    "sbi-mvp01-20220328-00001",
    "sbi-mvp01-20220328-00002",
    "sbi-mvp01-20220328-00002",
    "sbi-mvp01-20220328-00001"
  ],
  "field_configurations": [
    {
      "field_id": "target field",
      "targets": [
        {
          "target_id": "target #1",
          "kind": "driftscan",
          "target_name": "Drift scan at 45 degs",
          "reference_frame": "HORIZON",
          "az": 180.0,
          "el": 45.0
        },
        {
          "target_id": "target #2",
          "kind": "driftscan",
          "target_name": "Drift scan at 85 degs",
          "reference_frame": "HORIZON",
          "az": 180.0,
          "el": 85.0
        }
      ]
    }
  ],
  "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
        ]
      ]
    }
  ]
}