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 :func:`pyuvsim.simsetup.initialize_uvdata_from_params` into a :class:`pyuvdata.UVData` object, a beam dictionary, and a :class:`pyuvsim.BeamList` object. 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. See :doc:`usage` for details on how these are passed into a simulation. .. code-block:: yaml :caption: Example obsparam yaml file filing: outdir: '.' #Output file directory outfile_prefix: 'sim' # Prefix for the output file name, separated by underscores outfile_suffix: 'results' # Suffix for output file name outfile_name: 'sim_results' # Alternatively, give the full name output_format: 'uvfits' # Format for output. Default is 'uvh5', but 'uvfits', measurement sets ('ms'), and 'miriad' are also supported. clobber: False # overwrite existing files. (Default False) 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: '../pyuvsim/data/gleam_50srcs.vot' # Path to catalog file (txt, vot, skyh5, fhd, etc.) readable with pyradiosky. filetype : "gleam" # optionally specify the catalog filetype (skyh5, gleam, vot, text, fhd). If not specified, the code attempt to guess the type. spectral_type: flat # If using the GLEAM catalog, specify the spectral type (flat, subband or spectral_index). Defaults to flat. table_name: single # Required for non-GLEAM VO table files id_column: name # Required for non-GLEAM VO table files flux_columns: Si # Required for non-GLEAM VO table files ra_column: RAJ2000 # Recommended for non-GLEAM VO table files dec_column: DEJ2000 # Recommended for non-GLEAM VO table files catalog: 'mock' # Alternatively, use 'mock' to use a builtin catalog). mock_arrangement: 'zenith' # If using the mock catalog, specify which one. Additional mock keywords are specified here. non_nan: 'all' # Optional, remove source components with NaN Stokes values at all (or any) frequencies non_negative: True # Optional, remove source components with negative Stokes I values min_flux: 0.2 # Optional, minimum flux for sourcec components to keep max_flux: 1.50 # Optional, maximum flux for sourcec components to keep 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 select: # limit which baselines are simulated. Use any UVData.select keywords (except polarizations) and/or redundant_threshold bls: '[(1, 2), (3, 4), (5, 6)]' ant_str: 'cross' antenna_nums: [1, 7, 9, 15] redundant_threshold: 0.1 # redundancy threshold in meters. Only simulate one baseline per redundant group ordering: # specify the baseline-time order and baseling conjugation convention conjugation_convention: ant1`__) supports a wide range of catalogs, including point sources and diffuse maps and multiple spectral models. An example text catalog file: .. literalinclude:: ../pyuvsim/data/mock_catalog_heratext_2458098.27471265.txt :lines: 1-5 The columns are: * ``source_id`` : Identifier for the source * ``ra_icrs`` : Right ascension of source in decimal degrees in the ICRS frame. Other frames are supported, e.g. ``ra_J2000`` would yield an FK5 frame at the J2000 epoch. See ``pyradiosky`` docs for more details on frame specification. * ``dec_icrs`` : Declination of source in decimal degrees in the ICRS frame. Other frames are supported, e.g. ``dec_J2000`` would yield an FK5 frame at the J2000 epoch. See ``pyradiosky`` docs for more details on frame specification. * ``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. If the catalog is a GLEAM VO table file, optionally specify the ``spectral_type`` as one of: ``flat``, ``subband`` or ``spectral_index``. If not specified it defaults to ``flat``. If the catalog is a different VO table file, several other keywords are required or recommended: * ``table_name`` : The name of the table to use from the file (required). * ``id_column`` : The name of the column to use for the source IDs (required). * ``flux_columns`` : One or a list of columns to use for the source fluxes (a list for fluxes at multiple frequencies) (required). * ``lon_column`` : The name of the column to use for the source longitudes (required, ``ra_column`` is a deprecated synonym) * ``lat_column`` : The name of the column to use for the source latitudes (required, ``ra_column`` is a deprecated synonym). * ``frame`` : The name of the ``astropy`` frame to use. Optionally specify the ``filetype`` as one of ['skyh5', 'gleam', 'vot', 'text', 'fhd']. If this is not specified, the code attempts to guess what file type it is. 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 :func:`pyuvsim.simsetup.create_mock_catalog` docstring. Flux limits can be made by providing the keywords ``min_flux`` and ``max_flux``. These specify the min/max stokes I flux to choose from the catalog. Note that when using the GLEAM catalog, depending on the spectral type you use there can be sources that have Stokes values that are NaNs and Stokes I values that are negative. You can remove sources that have NaN Stokes values at either any or all frequencies using the ``non_nan`` keyword (can be set to "any" or "all", note that for subband spectral types the default flux interpolation will not result in NaNs as long as not all the Stokes values are NaN). You can remove sources with negative Stokes I values using the ``non_negative`` keyword (set to True). See pyradiosky documentation for more details. The option ``horizon_buffer`` can be set (in radians) to adjust the tolerance on the coarse horizon cut. After reading in the catalog, ``pyuvsim`` roughly calculates the rise and set times (in local sidereal time, in radians) for each source. If the source never rises, it is excluded from the simulation, and if the source never sets its rise/set times are set to None. This calculation is less accurate than the astropy alt/az calculation used in the main task loop, so a "buffer" angle is added to the set lst (and subtracted from the rise lst) to ensure sources aren't accidentally excluded. Tests indicate that a 10 minute buffer is sufficient. Pyuvsim also excludes sources below the horizon after calculating their AltAz coordinates, which is more accurate. The coarse cut is only to reduce computational load. Select ^^^^^^ Specify keywords to select which baselines to simulate. The selection is done by UVData.select, so it can accept any keyword that function accepts, except ones that affect polarization because pyuvsim computes all polarizations. Note that if using the ``bls`` parameter for selecting, which specifies a list of baseline tuples, the list needs to be wrapped in a string in the obsparam yaml file. In addition to the UVData.select keywords, a ``redundant_threshold`` parameter can be specified. If it is present, only one baseline from each set of redundant baselines is simulated. The ``redundant_threshold`` specifies how different two baseline vectors can be to still be called redundant -- the magnitude of the vector differences must be less than or equal to the threshold. The vector differences are calculated for a phase center of zenith (i.e. in drift mode). Ordering ^^^^^^^^ Specify how data on the UVData object is ordered. The baseline conjugation convention (specified as ``conjugation_convention``) defaults to ``"ant1