Continuum imaging¶
These scripts simulate MID continuum imaging observations of multiple point sources.
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).
The core simulation functions reside in RASCIL. The RASCIL driver script for simulation in this repository is direction_dependent/src/mid_simulation.py. This driver scripts can be run directly using the command line arguments listed below. Canonical bash scripts have been provided in continuum_imaging/scripts. The scripts will need to be altered for location of the various files needed. We recommend use of the bash scripts at first.
These simulations typically requiring a cluster to run. In Cambridge They work well on the P3 cluster using 16 nodes of 128GB each.
There are types of output: MeasurementSets and Images. Each are calculated for actual, nominal, 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. Images may be calculated using the dist_imager.
The fits images can be viewed using the casaviewer or carta. The MeasurementSets can be viewed using casaviewer.
Effects simulated¶
Nominal¶
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 dishes.
stokesIQUV, band B2
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]
[--antennas [ANTENNAS [ANTENNAS ...]]] [--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] [--sim_pol SIM_POL]
[--vis_pol VIS_POL] [--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] [--nthreads NTHREADS]
[--processes PROCESSES] [--memory MEMORY]
[--nworkers NWORKERS] [--use_dask USE_DASK]
[--write_hdf WRITE_HDF]
[--imaging_dft_kernel IMAGING_DFT_KERNEL]
Named Arguments¶
- --rmax
Maximum distance of dish from centre (m)
Default: 200000.0
- --configuration
MID Configuration: MID | MEERKAT+
Default: “MID”
- --antennas
antenna names to include (default is all)
- --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”
- --sim_pol
RASCIL polarisation frame for simulation: stokesI | stokes IQ | stokesIQUV
Default: “stokesI”
- --vis_pol
RASCIL polarisation frame for output visibility: linear | linearnp
Default: “linear”
- --pbradius
Radius of sources to include (in HWHM)
Default: 1.5
- --pbtype
Primary beam model: MID_B1 MID_B1LOW MID_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)
Default: 300000.0
- --screen
Location of atmospheric phase screen
Default: <MagicMock name=’mock()’ id=’140443122806992’>
- --time_chunk
Time for a chunk (s)
Default: 3600.0
- --mode
Mode of simulation: wind_pointing|random_pointing|polarisation|ionosphere|troposphere|heterogeneous
Default: “none”
- --duration
Type of duration: long or medium or short
Default: “long”
- --wind_conditions
SKA definition of wind conditions: precision or standard or 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=’140443122806992’>
- --vp_directory
Location of voltage pattern files
- --nthreads
Number of threads per worker
- --processes
Number of processes per worker
Default: 1
- --memory
Memory per worker (GB)
- --nworkers
Number of workers
- --use_dask
Use dask processing?
Default: “True”
- --write_hdf
Write intermediate files as HDF
Default: “False”
- --imaging_dft_kernel
DFT kernel: cpu_looped | cpu_numba | gpu_raw