Beam-gain calculation with OSKAR

The oskar_sim_beam_gain_sing.py script is used to run OSKAR to calculate the beam gain in the direction of each transmitter for one or more SKA stations. This can be run in one of two ways, using an installed version of OSKAR or using a containerised (Singularity) version of OSKAR. The python script will determine the version to use, by default trying first the Singularity image, and if that doesn’t exist, reverting to the installed version. If the containerised version is used, it should be located in the rfi directory. This can be replaced by a newer version as required and can be downloaded from the OSKAR repository.

For further information please see the OSKAR documentation.

Simulation inputs

OSKAR telescope configuration

A telescope configuration file for OSKAR containing SKA Low station information. For full details see the OSKAR documentation. As appropriate those provided with OSKAR can be used and may provide more up-to-date configuration information. By default a copy of a configuration file is used in rfi/data/telescope_files/SKA1-LOW_SKO-0000422_Rev3_38m_SKALA4_spot_frequencies.tm.

HDF5 input and output

The script uses the HDF5 output file from Propagation attenuation with Pycraf script, with structure explained at Radio Frequency Interference (RFI) interface, and write the results into another HDF5 file, which is based on the following class:

class rfi.rfi_interface.rfi_data_cube.BeamGainDataCube(ra: float, dec: float, obs_time: str, freq_chans: ndarray, rfi_ids: ndarray, nstations: int)[source]

Data Cube to contain Beam Gain information calculated by OSKAR.

Parameters:
  • ra – right ascension of observed source

  • dec – declination of observed source

  • obs_time – time of observation

  • freq_chans – array of frequency channels

  • rfi_ids – array of RFI source IDs

  • nstations – number of SKA stations

property beam_gain

Beam gain value

export_to_hdf5(filename)[source]

Save transformed data to HDF5

Parameters:

filename – name of output file

This is true, as long as the transmitter HDF5 file name is supplied via the --input_hdf_file CLI argument. By default, it is set to tv_transmitter_attenuation_cube.hdf5, which is the default output generated by the Propagation attenuation with Pycraf script.

When the script is run this way, OSKAR performs calculations per SKA station. The OSKAR output files are only temporarily saved, then read back in so the data can be exported to HDF5. At the end of the run, the temporary files are removed. The HDF5 file also contains pointing information (i.e right ascension and declination), which is used as input for Simulation of visibility with RASCIL.

Transmitter data

Alternatively, one can supply an updated transmitter CSV file and individual azimuth-elevation files, created by the Propagation attenuation with Pycraf script, via the --transmitters and --indir CLI arguments. You also have to set the --input_hdf_file CLI argument to an empty string ("") explicitly, to avoid using the HDF5 set-up.

In this case, OSKAR calculates beam gains for the array centre, given by the single az-el input for each transmitter (instead of a value per transmitter per SKA station). For more information on the transmitter data, follow Terrestrial transmitter data.

The python script outputs beam-gain values as a function of frequency as txt files.

Command line arguments

OSKAR Python script