Direction-dependent effects
The bash scripts located in ska-sim-mid/scripts/direction_dependent/ simulate MID observations of multiple point sources and calculate the effect of direction dependent (DD) gain errors.
The sky model is constructed from Oxford S3-SEX catalogue. These are unpolarised point sources.
The observation is by MID or MEERKAT+ over a range of hour angles.
The visibility is calculated by Direct Fourier transform after application of the gaintable for each source.
Dask is used to distribute the processing over a number of workers.
Processing can be divided into chunks of time (default 1800s).
See the following presentation for an overview of the results: Simulating MID direction dependent gain effects SPO-1057
In addition, see discussions on this Confluence page.
mid_simulation.py is a python wrapper around RASCIL functionality, which was originally designed to simulate (DD) effects for the SKA Mid telescope. It can be run directly using the command line arguments described by the API, or by the example bash scripts linked above. The bash scripts allow for looping over duration and declination. They will need to be altered for location of the various files needed. We recommend use of the bash scripts at first. These simulations typically require a cluster to run (with minimum 512GB cores, and a large number of cores/threads).
The simulation has two steps:
first the visibilities are calculated and written to HDF files, using mid_simulation.py
then all the HDF files are combined into one MeasurementSet using convert_to_ms.py. In this conversion step, a number of diagnostic plots are written.
Types of output:
MeasurementSets (MS)
Images in FITS format: note that by default, an imager is not run as part of the simulations. Images can be made by setting the
--make_imagesCLI argument to “True”.
The following MS are generated: actual, nominal, and difference
actual: data with DD effects added, is it would “actually” be after an observation. See below for list of effects that can be simulated.
nominal: data without any gain errors. A set of point sources is simulated and the relevant nominal voltage pattern for each end of interferometer is applied before Fourier transform. The nominal pattern is constructed from a tapered symmetric illumination pattern, with the diameter of the SKA and/or MeerKAT dishes.
difference: difference between actual and nominal
If you are running on your own machine, make sure you have the below environment variables set up:
SSMROOT : location where the ska-sim-mid repository is
SSMRESOURCES : location of the resources e.g. beam models
SSMRESULTS: location of results folder
Effects simulated
The following effects can be simulated using mid_simulation.py. This can be set with
the --mode CLI argument:
wind_pointing: wind-induced pointing errors Three types of wind-conditions are available: precision, standard or degraded. The definitions are available in the Operation conditions.docx document attached to Confluence. Pre-generated pointing data used for the simulations is available from the Google Cloud Platform, ska1-simulation-data/resources/mid/pointing_models.random_pointing: allows simulating dynamic, static, and global pointing errors using the simulate_pointingtable RASCIL function. The size of pointing error is adjustable via CLI arguments of mid_simulations.py.polarisation: uses pre-generated voltage pattern files for both actual and nominal data. See create_polarisation_gaintable_rsexecute_workflow.heterogeneous: similar topolarisationwith the nominal voltage pattern modified slightly. See create_heterogeneous_gaintable_rsexecute_workflow.surface: simulate gravity-induced surface errors. See create_surface_errors_gaintable_rsexecute_workflow.ionosphere: ionospheric effects are simulated as a combination of pre-generated screen data and the voltage pattern data used for polarisation effect simulations. A set of point sources is simulated and the phases calculated using a thin screen model for the ionosphere. The screen has units of meters of Total Electron Content. The phase is evaluated at places in the screen where the line of sight from source to a dish pierces the screen.troposphere: same method asionospherebut using screen data with atmospheric effects.
wind_pointing, random_pointing, polarisation, and heterogeneous
effects use, as a first step, pre-generated
voltage pattern files,
which are available on GCP. For each option, a set of point sources is simulated and
the relevant voltage pattern for each end of the interferometer is applied before Fourier transform.
For more information on the provided bash scripts, see the documentation here: https://gitlab.com/ska-telescope/sim/ska-sim-mid/-/blob/master/scripts/direction_dependent/scripts/README.md