Direction-dependent effects¶
These scripts simulate MID observations of multiple point sources and calculate the effect of direction dependent gain errors.
The sky model is constructed from Oxford S3-SEX catalog. 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). This allows
See the following presentation for an overview of the results:
The core simulation functions reside in RASCIL. The RASCIL driver script in this repository is direction_dependent/src/mid_simulation.py. This can be run directly using the command line arguments listed below, or some typical bash scripts have been provided in direction_dependent_src/scripts. The bash scripts allow for looping over duration and declination. The scripts will need to be altered for location of the various files needed. We recommend use of the bash scripts at first.
Note that the simulation has two steps: first the visibilities are calculated and written to HDF files, using mid_simulation.py and 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.
These simulations typically requiring a cluster to run. In Cambridge They work well on the P3 login node, which has 512GB and 64 threads/32 cores, using a large number of threads. For this approach –use_slurm should be False.
There are types of output: MeasurementSets and Images. Each are calculated for on, off, and difference. The time consumed in the calculation of the MeasurementSets is small compared to the time in writing the MeasurementSet and the time to make the images. The image calculation can be avoided by setting –imaging_context None
The fits images can be viewed using the casaviewer or carta. The MeasurementSets can be viewed using casaviewer.
Effects simulated¶
Heterogenous¶
A set of point sources is simulated and the relevant voltage pattern for each end of interferometer is applied before Fourier transform.
Simulates observations with all SKA and MEERKAT dishes (on state) and all SKA dishes (off state).
stokesIQUV, band B2
Heterogenous_meerkat+¶
A set of point sources is simulated and the relevant voltage pattern for each end of interferometer is applied before Fourier transform.
Simulates observations with MEERKAT+ configuration, all SKA and MEERKAT dishes (on state) and all SKA dishes (off state).
stokesIQUV, band B2
Ionosphere¶
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.
Simulates observations with ionospheric screens on and off.
This requires the screens to be calculated first or downloaded: see ../screens/README.md
stokesI, band B1LOW
Polarisation¶
Simulates observations with SKA and EMSS calculated primary beam models with cross pol (on) and no cross pol set to zero (off)
Polarisation stokesIQUV, linear, band B2
Surface sag¶
Simulates observations with sagging dish (on) and nominal dish (off).
Models of the voltage pattern are available at +15, +45, +90 deg elevation.
We interpolate between those to 5 degrees.
Stokes I, band B2
For more details see: https://confluence.skatelescope.org/display/SE/Dish+deformation+simulations
Troposphere¶
Simulates observations with tropospheric screens on and off.
This requires the screens to be calculated first or downloaded: see ../screens/README.md
stokesI, bands B2 and B5
A set of point sources is simulated and the phases calculated using a thin screen model for the atmosphere. The phase is evaluated at places in the screen where the line of sight from source to dish pierces the screen. The screen has units of meters of delay.
Wind pointing¶
Simulates observations with wind buffeting of dishes (on) and without (off)
Stokes I, bands B2 and B5
For more details see: https://confluence.skatelescope.org/display/SE/MID+pointing+error+simulations
Simulate SKA-MID direction dependent errors
usage: mid_simulation.py [-h] [--rmax RMAX] [--configuration CONFIGURATION]
[--ra RA] [--declination DECLINATION] [--band BAND]
[--nchan NCHAN] [--channel_width CHANNEL_WIDTH]
[--integration_time INTEGRATION_TIME]
[--time_range TIME_RANGE TIME_RANGE]
[--image_pol IMAGE_POL] [--vis_pol VIS_POL]
[--imaging_context IMAGING_CONTEXT] [--npixel NPIXEL]
[--cellsize CELLSIZE] [--weighting WEIGHTING]
[--robustness ROBUSTNESS] [--pbradius PBRADIUS]
[--pbtype PBTYPE] [--seed SEED]
[--flux_limit FLUX_LIMIT] [--results RESULTS]
[--elevation_sampling ELEVATION_SAMPLING] [--r0 R0]
[--height HEIGHT] [--screen SCREEN]
[--time_chunk TIME_CHUNK] [--mode MODE]
[--duration DURATION]
[--wind_conditions WIND_CONDITIONS]
[--global_pe GLOBAL_PE GLOBAL_PE]
[--static_pe STATIC_PE STATIC_PE]
[--dynamic_pe DYNAMIC_PE]
[--pointing_directory POINTING_DIRECTORY]
[--vp_directory VP_DIRECTORY] [--show SHOW]
[--nthreads NTHREADS] [--processes PROCESSES]
[--memory MEMORY] [--nworkers NWORKERS]
[--use_dask USE_DASK] [--use_slurm USE_SLURM]
[--cores CORES] [--slurm_project SLURM_PROJECT]
[--slurm_queue SLURM_QUEUE]
[--slurm_walltime SLURM_WALLTIME]
[--interface INTERFACE]
Named Arguments¶
- --rmax
Maximum distance of dish from centre (m)
Default: 200000.0
- --configuration
MID Configuration: MID | MEERKAT+
Default: “MID”
- --ra
Right ascension of phase centre (degrees)
Default: 0.0
- --declination
Declination of phase centre (degrees)
Default: -40.0
- --band
Band B1LOW | B1 | B2 | Ku
Default: “B2”
- --nchan
Number of frequency channels
Default: 1
- --channel_width
Channel bandwidth (Hz) (default is to calculate from frequency
- --integration_time
Integration time (s)
Default: 180
- --time_range
Time range in hour angle
Default: [-4.0, 4.0]
- --image_pol
RASCIL polarisation frame for image: stokesI | stokes IQ | stokesIQUV
Default: “stokesIQUV”
- --vis_pol
RASCIL polarisation frame for visibility: linear | linearnp
Default: “linear”
- --imaging_context
Imaging context ‘2d’ | ‘ng’
- --npixel
Number of pixels
- --cellsize
Cellsize in radians
- --weighting
Type of weighting
Default: “robust”
- --robustness
Robustness for robust weighting
Default: 0.0
- --pbradius
Radius of sources to include (in HWHM)
Default: 1.5
- --pbtype
Primary beam model: MID_B1 MID_B1LOW NID_B2 MID_Ku MEERKAT_B1 MEERKAT_B2
Default: “MID_B2”
- --seed
Random number seed
Default: 18051955
- --flux_limit
Flux limit (Jy)
Default: 0.01
- --results
Directory for results
Default: “./”
- --elevation_sampling
Sampling in elevation for surface (deg)
Default: 1.0
- --r0
R0 (meters)
Default: 5000.0
- --height
Height of layer (meters)
- --screen
Location of atmospheric phase screen
Default: <MagicMock name=’mock()’ id=‘139890010615992’>
- --time_chunk
Time for a chunk (s)
Default: 3600.0
- --mode
Mode of simulation: wind_pointing|random_pointing|polarisation|ionosphere|troposphere|heterogeneous
Default: “wind_pointing”
- --duration
Type of duration: long or medium or short
Default: “long”
- --wind_conditions
SKA definition of wind conditions: precision|standard|degraded
Default: “precision”
- --global_pe
Global pointing error
Default: [0.0, 0.0]
- --static_pe
Multipliers for static errors
Default: [0.0, 0.0]
- --dynamic_pe
Multiplier for dynamic errors
Default: 1.0
- --pointing_directory
Location of wind PSD pointing files
Default: <MagicMock name=’mock()’ id=‘139890010615992’>
- --vp_directory
Location of voltage pattern files
Default: <MagicMock name=’mock()’ id=‘139890010615992’>
- --show
Show details of simulation?
Default: “False”
- --nthreads
Number of threads per worker
Default: 1
- --processes
Number of processes per worker
Default: 1
- --memory
Memory per worker (GB)
- --nworkers
Number of workers
Default: 4
- --use_dask
Use dask processing?
Default: “True”
- --use_slurm
Use SLURM?
Default: “False”
- --cores
Number of cores for a SLURM job
Default: 4
- --slurm_project
SLURM project for accounting
Default: “SKA-SDP”
- --slurm_queue
SLURM queue
Default: “compute”
- --slurm_walltime
SLURM time limit
Default: “01:00:00”
- --interface
Network interface
Default: “eth0”