Parameter and configuration Files

When running simulations from yaml and csv files, there are four configuration files that must be used.

The outermost parameter file is the obsparam_*.yaml, which is parsed by initialize_uvdata_from_params into a uvdata object, a source list, a beam dictionary, and a beam list.

The antenna layout and telescope config yaml files determine the full properties of the array, including location, beam models, layout, and naming.

The catalog text files give point source lists

These files contain overall simulation parameters. Passed into ``run_param_pyuvsim.py``

Example obsparam yaml file
filing:
  outdir: '.'   #Output file directory
  outfile_prefix: 'sim_' # Prefix for the output uvfits file.
freq:
  Nfreqs: 10    # Number of frequencies
  channel_width: 80000.0    # Frequency channel width
  end_freq: 100800000.0     # Start and end frequencies (Hz)
  start_freq: 100000000.0
  freq_array : [1.0000e+08,   1.0008e+08,   1.0016e+08, 1.0024e+08,
      1.0032e+08,   1.0040e+08,   1.0048e+08, 1.0056e+08,
      1.0064e+08, 1.0072e+08]
  bandwidth: 800000.0
sources:
  catalog: 'mock'       #Choice of catalog file name (or specify mock to use builtin catalogs).
  mock_arrangement: 'zenith'    # Choosing a mock layout
telescope:
  array_layout: 'triangle_bl_layout.csv'    # Antenna layout csv file
  telescope_config_name: '28m_triangle_10time_10chan.yaml'  # Telescope metadata file.
time:
  Ntimes: 10        # Number of times.
  integration_time: 11.0  # Time step size  (seconds)
  start_time: 2457458.1738949567    # Start and end times (Julian date)
  end_time: 2457458.175168105
  duration_hours: 0.0276

Note The example above is shown with all allowed keywords, but many of these are redundant. This will be further explained below.

Time and frequency

Time and frequency structure may be defined with different combinations of keywords to suit the user’s purposes. The user must specify sufficient information for the frequency and time arrays to be defined.

Minimum frequency requirements:
specify bandwidth via one of the following combinations:
  • (start_freq, end_freq)
  • (channel_width, Nfreqs)
  • (bandwidth)
specify channel width via:
  • (bandwidth, Nfreqs)
  • (channel width)
specify a reference frequency via:
  • (start_freq)
  • (end_freq)

As long as one of the sets from each category above is met by the supplied keywords, the frequency array will be successfully built. Likewise for the time array:

Minimum time requirements:
Total time:
  • (start_time, end_time)
  • (integration_time, Ntimes)
  • (duration_hours) or (duration_days)
Time step:
  • (duration_hours or duration_days, Ntimes)
  • (integration_time)
Reference time:
  • (start_time)
  • (end_time)

You can also just give an explicit time_array or freq_array.

Telescope Configuration

Under the telescope section, the keywords array_layout and telescope_config_name give paths to, respectively, the array layout text file and the telescope metadata configuration yaml file. If the full path is not specified, pyuvsim will look in the same directory as the obsparam file.

Example array layout:

Name Number   BeamID   E          N          U

ANT1        0        0    -8.2011    -0.0000     0.0000
ANT2        1        1    19.7989     0.0000     0.0000

Columns here provide, in order from left to right, the antenna name, antenna number, a beam ID number, and the antenna positions relative to the array center in eastings/northings/up-ings in meters. The layout file has a corresponding telescope metadata file, shown below:

beam_paths:
  0: HERA_NicCST.uvbeam
  1: 'uniform'
  2: 'gaussian'

This yaml file provides the telescope name, location in lat/lon/alt degrees, and the beam dictionary.

The beam dictionary, along with the beam IDs in the layout file, allow one to specify different beam models be used for different antennas. The beam_paths section of the telescope param file pairs each beam ID present in the layout with either the path to a beamfits file or a keyword specifying an existing analytic beam. Right now, only uniform and gaussian beams are supported. If the gaussian beam is used, the sigma keyword must also be given, which specifies the beam width in radians. (see documentation of the AnalyticBeam class for details).

Sources

Specify the path to a text catalog file via catalog.

An example catalog file:

SOURCE_ID	RA_J2000 [deg]	Dec_J2000 [deg]	Flux [Jy]	Frequency [Hz]
The columns are:
  • SOURCE_ID : Identifying code for the source
  • RA_J2000 : Right ascension of source at J2000 epoch, in decimal hours.
  • DEC_J2000 : Declination of source at J2000 epoch, in decimal degrees.
  • FLUX: Source stokes I brightness in Janskies. (Currently only point sources are supported).
  • Frequency: A reference frequency for the given flux. This will be used for spectral modeling.

Alternatively, you can specify a mock and provide the mock_arrangement keyword to specify which mock catalog to generate. Available options are shown in the create_mock_catalog doctstring:

pyuvsim.create_mock_catalog(time, arrangement='zenith', array_location=None, Nsrcs=None, alt=None, save=False, min_alt=None, rseed=None)[source]

Create a mock catalog.

Sources are defined in an AltAz frame at the given time, then returned in ICRS ra/dec coordinates.

Parameters:
  • time (float or astropy Time object) – Julian date
  • arrangement (str) –

    Point source pattern (default = 1 source at zenith). Accepted arrangements:

    triangle: Three point sources forming a triangle around the zenith
    cross: An asymmetric cross
    zenith: Some number of sources placed at the zenith.
    off-zenith: A single source off zenith
    long-line: Horizon to horizon line of point sources
    hera_text: Spell out HERA around the zenith
    random: Randomly distributed point sources near zenith
  • Nsrcs (int) – Number of sources to put at zenith
  • array_location (EarthLocation object) – [Default = HERA site]
  • alt (float) – For off-zenith and triangle arrangements, altitude to place sources. (deg)
  • save (bool) – Save mock catalog as npz file.
  • rseed (int) – If using the random configuration, pass in a RandomState seed.
Returns:

List of pyuvsim.Source objects mock_kwds: (dictionary) The keywords defining this source catalog

Return type:

catalog