SB Definition examples

MID JSON

A full example of a simple MID SB serialised to JSON is given below. This SB gives an example of the structure and possible contents of a MID SB.

{
  "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.971548Z",
    "last_modified_on": "2022-03-28T15:43:53.971548Z",
    "last_modified_by": "Liz Bartlett",
    "pdm_version": "28.1.0"
  },
  "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"
          }
        }
      }
    }
  },
  "targets": [
    {
      "target_id": "target-12345",
      "name": "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": "icrs",
        "ra_str": "21:08:47.92",
        "dec_str": "-88:57:22.9",
        "epoch": 2000.0,
        "parallax": 0.0,
        "pm_dec": 0.0,
        "pm_ra": 0.0
      },
      "radial_velocity": {
        "quantity": {
          "value": -12.345,
          "unit": "km / s"
        },
        "definition": "OPTICAL",
        "reference_frame": "LSRK",
        "redshift": 1.23
      },
      "tied_array_beams": {
        "pst_beams": [
          {
            "beam_id": 1,
            "beam_name": "PSR J0024-7204R",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:05.670",
              "dec_str": "-72:04:52.62",
              "pm_ra": 4.8,
              "pm_dec": -3.3,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          },
          {
            "beam_id": 2,
            "beam_name": "PSR J0024-7204W",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:06.0580",
              "dec_str": "-72:04:49.088",
              "pm_ra": 6.1,
              "pm_dec": -2.6,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          }
        ]
      },
      "spfrx": {
        "attenuation_1_x": 12.3,
        "attenuation_1_y": 12.3,
        "attenuation_2_x": 4.1,
        "attenuation_2_y": 4.1,
        "noise_diode": {
          "mode": "periodic",
          "period": {
            "value": 1.0,
            "unit": "ms"
          },
          "duty_cycle": {
            "value": 2.0,
            "unit": "ms"
          },
          "phase_shift": {
            "value": 3.0,
            "unit": "ms"
          }
        }
      }
    },
    {
      "target_id": "target-67890",
      "name": "M83",
      "pointing_pattern": {
        "active": "SinglePointParameters",
        "parameters": [
          {
            "kind": "SinglePointParameters",
            "offset_x_arcsec": 0.0,
            "offset_y_arcsec": 0.0
          }
        ]
      },
      "reference_coordinate": {
        "kind": "icrs",
        "ra_str": "13:37:00.919",
        "dec_str": "-29:51:56.74",
        "epoch": 2000.0,
        "pm_ra": 0.0,
        "pm_dec": 0.0,
        "parallax": 0.0
      },
      "radial_velocity": {
        "quantity": {
          "value": 0.0,
          "unit": "km / s"
        },
        "definition": "RADIO",
        "reference_frame": "LSRK",
        "redshift": 0.0
      },
      "tied_array_beams": {
        "pst_beams": [
          {
            "beam_id": 1,
            "beam_name": "PSR J0024-7204R",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:05.670",
              "dec_str": "-72:04:52.62",
              "pm_ra": 4.8,
              "pm_dec": -3.3,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          },
          {
            "beam_id": 2,
            "beam_name": "PSR J0024-7204W",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:06.0580",
              "dec_str": "-72:04:49.088",
              "pm_ra": 6.1,
              "pm_dec": -2.6,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          }
        ]
      }
    }
  ],
  "csp_configurations": [
    {
      "config_id": "csp-configuration-12345",
      "name": "csp config 123",
      "subarray": {
        "subarray_name": "science period 23"
      },
      "common": {
        "subarray_id": 1,
        "band_5_tuning": [
          5.85,
          7.25
        ]
      },
      "midcbf": {
        "frequency_band": "1",
        "subbands": [
          {
            "band_5_tuning": 12.3e9,
            "frequency_slice_offset": {
              "value": 0,
              "unit": "MHz"
            },
            "correlation_spws": [
              {
                "spw_id": 1,
                "logical_fsp_ids": [
                  1,
                  2
                ],
                "receptors":["SKA063", "SKA001", "SKA100"],
                "zoom_factor": 1,
                "centre_frequency": 800e6,
                "number_of_channels": 20000,
                "channel_averaging_factor": 1,
                "time_integration_factor": 1
              }
            ],
            "pst_spws": [
              {
                "spw_id": 2,
                "logical_fsp_ids": [
                  3
                ],
                "centre_frequency": 396291840,
                "number_of_channels": 3700
              }
            ]
          }
        ]
      },
      "spfrx": {
        "sync_pps": false,
        "saturation_threshold": 0.55
      }
    }
  ],
  "dish_allocations": {
    "dish_ids": ["SKA100", "SKA001", "SKA063", "SKA036"],
    "dish_allocation_id": "dish-allocation-74519",
    "selected_subarray_definition": "AA0.5"
  },
  "observing_constraints": {
    "sun_separation": {
      "min": {
        "value": 30.0,
        "unit": "arcmin"
      }
    },
    "moon_separation": {
      "min": {
        "value": 45.0,
        "unit": "arcsec"
      }
    },
    "jupiter_separation": {
      "min": {
        "value": 12.0,
        "unit": "deg"
      }
    },
    "altitude": {
      "min": {
        "value": 0.5,
        "unit": "rad"
      },
      "max": {
        "value": 80.0,
        "unit": "deg"
      }
    },
    "lst": {
      "start": {
        "value": 1.0,
        "unit": "hourangle"
      },
      "end": {
        "value": 3.14159,
        "unit": "rad"
      }
    },
    "minimum_receptors": 16,
    "required_receptors": [
      "SKA001",
      "SKA036",
      "SKA063"
    ]
  }
}

LOW JSON

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.971548Z",
    "last_modified_on": "2024-07-15T21:55:09.654185Z",
    "pdm_version": "28.1.0"
  },
  "activities": {
    "allocate": {
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      },
      "kind": "filesystem",
      "path": "/path/to/allocatescript.py"
    },
    "observe": {
      "function_args": {
        "init": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        },
        "main": {
          "args": [
            "posarg1",
            "posarg2"
          ],
          "kwargs": {
            "argname": "argval"
          }
        }
      },
      "kind": "git",
      "repo": "https://gitlab.com/script_repo/operational_scripts",
      "path": "/relative/path/to/scriptinsiderepo.py",
      "branch": "main",
      "commit": "d234c257dadd18b3edcd990b8194c6ad94fc278a"
    }
  },
  "targets": [
    {
      "target_id": "target-12345",
      "name": "47 Tuc",
      "pointing_pattern": {
        "active": "SinglePointParameters",
        "parameters": [
          {
            "kind": "SinglePointParameters",
            "offset_x_arcsec": 0.0,
            "offset_y_arcsec": 0.0
          }
        ]
      },
      "reference_coordinate": {
        "kind": "icrs",
        "ra_str": "00:24:05.359",
        "dec_str": "-72:04:53.20",
        "epoch": 2000.0,
        "pm_ra": 0.0,
        "pm_dec": 0.0,
        "parallax": 0.0
      },
      "radial_velocity": {
        "quantity": {
          "value": -17.2,
          "unit": "km / s"
        },
        "definition": "OPTICAL",
        "reference_frame": "BARYCENTRIC",
        "redshift": 0.0
      },
      "tied_array_beams": {
        "pst_beams": [
          {
            "beam_id": 1,
            "beam_name": "PSR J0024-7204R",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:05.670",
              "dec_str": "-72:04:52.62",
              "pm_ra": 4.8,
              "pm_dec": -3.3,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          },
          {
            "beam_id": 2,
            "beam_name": "PSR J0024-7204W",
            "beam_coordinate": {
              "kind": "icrs",
              "ra_str": "00:24:06.0580",
              "dec_str": "-72:04:49.088",
              "pm_ra": 6.1,
              "pm_dec": -2.6,
              "parallax": 0.0,
              "epoch": 2000.0
            },
            "stn_weights": [1.0, 1.0]
          }
        ]
      }
    }
  ],
  "mccs_allocation": {
    "mccs_allocation_id": "mccs-allocation-74519",
    "selected_subarray_definition": "AA0.5",
    "subarray_beams": [
	{
	    "subarray_beam_id": 1,
	    "apertures": [
		{
		    "station_id": 345,
		    "substation_id": 1,
		    "weighting_key": "uniform"
		},
		{
		    "station_id": 350,
		    "substation_id": 1,
		    "weighting_key": "uniform"
		},
		{
		    "station_id": 352,
		    "substation_id": 1,
		    "weighting_key": "uniform"
		},
		{
		    "station_id": 431,
		    "substation_id": 1,
		    "weighting_key": "uniform"
		}
	    ]
	}
    ]
},
  "csp_configurations": [
    {
      "config_id": "csp-configuration-12345",
      "name": "csp config 123",
      "lowcbf": {
        "do_pst": true,
        "correlation_spws": [
          {
            "spw_id": 1,
            "logical_fsp_ids": [
              0,
              1
            ],
            "zoom_factor": 0,
            "centre_frequency": 199.609375e6,
            "number_of_channels": 96,
            "integration_time_ms": 849
          }
        ]
      }
    }
  ],
  "qa_threshold_overrides": {
    "csp": {
      "cbf": {
        "processor_ready_percent": 95.5
      }
    }
  },
  "observing_constraints": {
    "sun_separation": {
      "min": {
        "value": 30.0,
        "unit": "arcmin"
      }
    },
    "moon_separation": {
      "min": {
        "value": 45.0,
        "unit": "arcsec"
      }
    },
    "jupiter_separation": {
      "min": {
        "value": 12.0,
        "unit": "deg"
      }
    },
    "altitude": {
      "min": {
        "value": 0.5,
        "unit": "rad"
      },
      "max": {
        "value": 80.0,
        "unit": "deg"
      }
    },
    "lst": {
      "start": {
        "value": 1.0,
        "unit": "hourangle"
      },
      "end": {
        "value": 3.14159,
        "unit": "rad"
      }
    },
    "minimum_receptors": 16,
    "required_receptors": [
      "S8-1",
      "S9-2",
      "S10-3"
    ]
  }
}