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.
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
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] [--image_sampling IMAGE_SAMPLING]
[--configuration CONFIGURATION]
[--antennas [ANTENNAS ...]] [--source SOURCE]
[--ra RA] [--declination DECLINATION] [--band BAND]
[--nchan NCHAN] [--channel_width CHANNEL_WIDTH]
[--integration_time INTEGRATION_TIME]
[--time_range TIME_RANGE TIME_RANGE]
[--time_step TIME_STEP] [--make_images MAKE_IMAGES]
[--only_actual ONLY_ACTUAL] [--apply_pb APPLY_PB]
[--pbtype PBTYPE] [--seed SEED]
[--flux_limit FLUX_LIMIT] [--npixel NPIXEL]
[--cellsize CELLSIZE] [--weighting WEIGHTING]
[--robustness ROBUSTNESS] [--results RESULTS]
[--elevation_sampling ELEVATION_SAMPLING] [--r0 R0]
[--height HEIGHT] [--screen SCREEN]
[--isoplanatic ISOPLANATIC] [--time_chunk TIME_CHUNK]
[--channel_start CHANNEL_START] [--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]
[--vp_support VP_SUPPORT] [--use_dask USE_DASK]
[--write_gt WRITE_GT] [--write_pt WRITE_PT]
[--imaging_dft_kernel IMAGING_DFT_KERNEL]
[--add_noise ADD_NOISE] [--ra_s RA_S] [--dec_s DEC_S]
[--vp_real_file VP_REAL_FILE]
[--vp_imag_file VP_IMAG_FILE] [--obs_time OBS_TIME]
Named Arguments
- --rmax
Maximum distance of dish from centre (m)
Default: 200000.0
- --image_sampling
Number of points per synthesized beam
Default: 3.0
- --configuration
MID Configuration: MID | MEERKAT+
Default: “MID”
- --antennas
Antenna names to include (default is all)
- --source
Type of source: s3sky or point or double
Default: “s3sky”
- --ra
Right ascension of phase centre (degrees)
Default: 0.0
- --declination
Declination of phase centre (degrees)
Default: -40.0
- --band
Band B1LOW | B1 | B2 | B5 | Ku
Default: “B2”
- --nchan
Number of frequency channels
Default: 1
- --channel_width
Channel bandwidth (Hz) (default is to calculate from band frequency)
- --integration_time
Integration time (s)
Default: 180
- --time_range
Time range in hour angle
Default: [-4.0, 4.0]
- --time_step
Time step (unit: second of time)
- --make_images
Make the images?
Default: “True”
- --only_actual
Only make the actual data?
Default: “False”
- --apply_pb
Apply the primary beam in modes troposphere and ionosphere?
Default: “True”
- --pbtype
Primary beam model: MID_B1 MID_B1LOW MID_B2 MID_Ku MEERKAT_B1 MEERKAT_B2 MEERKAT_Ku
Default: “MID_B2”
- --seed
Random number seed
Default: 18051955
- --flux_limit
Lower flux limit (Jy)
Default: 0.01
- --npixel
Number of pixels in the resulting image
Default: 512
- --cellsize
Cellsize in radians (will calculate if set to None)
- --weighting
Type of weighting (natural, uniform or robust)
Default: “uniform”
- --robustness
Robustness for robust weighting
Default: 0.0
- --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 data
Default: “/home/docs/checkouts/readthedocs.org/user_builds/ska-telescope-ska-sim-mid/envs/latest/lib/python3.10/site-packages/rascil/processing_components/../../data/models/test_mpc_screen.fits”
- --isoplanatic
Are the phase screens to be treated as isoplanatic?
Default: “False”
- --time_chunk
Time for a chunk (s)
Default: 3600.0
- --channel_start
First channel of interest if interested in some frequency range. Use with –nchan
- --mode
Mode of simulation: wind_pointing|random_pointing|polarisation|ionosphere|troposphere|heterogeneous
Default: “none”
- --duration
Type of duration: long or medium or short. Set to custom when using options –integration_time and –time_range (or–time_step)
Default: “long”
- --wind_conditions
SKA definition of wind conditions: precision, standard or degraded
Default: “precision”
- --global_pe
Global pointing error (absolute values)
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: “/home/docs/checkouts/readthedocs.org/user_builds/ska-telescope-ska-sim-mid/envs/latest/lib/python3.10/site-packages/rascil/processing_components/../../data/models”
- --vp_directory
Location of voltage pattern files
- --vp_support
Number of pixels in voltage pattern images
- --use_dask
Use dask processing?
Default: “True”
- --write_gt
Write gaintable files as HDF
Default: “False”
- --write_pt
Write pointing table files as HDF
Default: “False”
- --imaging_dft_kernel
DFT kernel: cpu_looped | cpu_numba | gpu_raw
- --add_noise
Add noises to visibilities
Default: “False”
- --ra_s
Right ascension of phase centre (degrees)
Default: -999.99
- --dec_s
Declination of phase centre (degrees)
Default: 999.99
- --vp_real_file
Voltage pattern real part file name
- --vp_imag_file
Voltage pattern imagine part file name
- --obs_time
Observation start time