Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self._Npols = uvp.UVParameter('Npols', description='Number of polarizations. '
'Only required if beam_type is "power".',
expected_type=int, required=False)
desc = ('Array of polarization integers, shape (Npols). '
'Uses the same convention as UVData: pseudo-stokes 1:4 (pI, pQ, pU, pV); '
'circular -1:-4 (RR, LL, RL, LR); linear -5:-8 (XX, YY, XY, YX). '
'Only required if beam_type is "power".')
self._polarization_array = uvp.UVParameter('polarization_array',
description=desc, required=False,
expected_type=int, form=('Npols',),
acceptable_vals=list(np.arange(-8, 0)) + list(np.arange(1, 5)))
desc = 'Array of frequencies, center of the channel, shape (Nspws, Nfreqs), units Hz'
self._freq_array = uvp.UVParameter('freq_array', description=desc,
form=('Nspws', 'Nfreqs'),
expected_type=np.float,
tols=1e-3) # mHz
self._spw_array = uvp.UVParameter('spw_array',
description='Array of spectral window '
'Numbers, shape (Nspws)', form=('Nspws',),
expected_type=int)
desc = ('Normalization standard of data_array, options are: '
'"physical", "peak" or "solid_angle". Physical normalization '
'means that the frequency dependence of the antenna sensitivity '
'is included in the data_array while the frequency dependence '
'of the receiving chain is included in the bandpass_array. '
'Peak normalized means that for each frequency the data_array'
'is separately normalized such that the peak is 1 (so the beam '
form=("Nspws", "Nfreqs"),
expected_type=np.float,
tols=1e-3,
) # mHz
desc = (
"Array of polarization integers, shape (Npols). "
"AIPS Memo 117 says: pseudo-stokes 1:4 (pI, pQ, pU, pV); "
"circular -1:-4 (RR, LL, RL, LR); linear -5:-8 (XX, YY, XY, YX). "
"NOTE: AIPS Memo 117 actually calls the pseudo-Stokes polarizations "
'"Stokes", but this is inaccurate as visibilities cannot be in '
"true Stokes polarizations for physical antennas. We adopt the "
"term pseudo-Stokes to refer to linear combinations of instrumental "
"visibility polarizations (e.g. pI = xx + yy)."
)
self._polarization_array = uvp.UVParameter(
"polarization_array",
description=desc,
expected_type=int,
acceptable_vals=list(np.arange(-8, 0)) + list(np.arange(1, 5)),
form=("Npols",),
)
self._history = uvp.UVParameter(
"history",
description="String of history, units English",
form="str",
expected_type=str,
)
# ---antenna information ---
desc = (
desc = (
"Required if cal_type = 'delay'. Frequency range that solutions "
"are valid for. list: [start_frequency, end_frequency] in Hz."
)
self._freq_range = uvp.UVParameter(
"freq_range",
required=False,
description=desc,
form=2,
expected_type=float,
tols=1e-3,
)
# --- cal_style parameters ---
desc = "Style of calibration. Values are sky or redundant."
self._cal_style = uvp.UVParameter(
"cal_style",
form="str",
expected_type=str,
description=desc,
acceptable_vals=["sky", "redundant"],
)
desc = (
'Required if cal_style = "sky". Short string describing field '
"center or dominant source."
)
self._sky_field = uvp.UVParameter(
"sky_field", form="str", required=False, expected_type=str, description=desc
)
desc = 'Required if cal_style = "sky". Name of calibration catalog.'
# --- cal_style parameters ---
desc = "Style of calibration. Values are sky or redundant."
self._cal_style = uvp.UVParameter(
"cal_style",
form="str",
expected_type=str,
description=desc,
acceptable_vals=["sky", "redundant"],
)
desc = (
'Required if cal_style = "sky". Short string describing field '
"center or dominant source."
)
self._sky_field = uvp.UVParameter(
"sky_field", form="str", required=False, expected_type=str, description=desc
)
desc = 'Required if cal_style = "sky". Name of calibration catalog.'
self._sky_catalog = uvp.UVParameter(
"sky_catalog",
form="str",
required=False,
expected_type=str,
description=desc,
)
desc = 'Required if cal_style = "sky". Phase reference antenna.'
self._ref_antenna_name = uvp.UVParameter(
"ref_antenna_name",
form="str",
self._antenna_numbers = uvp.UVParameter('antenna_numbers', description=desc,
form=('Nants_telescope',),
expected_type=int)
# -------- extra, non-required parameters ----------
desc = ('Orientation of the physical dipole corresponding to what is '
'labelled as the x polarization. Examples include "east" '
'(indicating east/west orientation) and "north" (indicating '
'north/south orientation)')
self._x_orientation = uvp.UVParameter('x_orientation', description=desc,
required=False, expected_type=str)
desc = ('Any user supplied extra keywords, type=dict. Keys should be '
'8 character or less strings if writing to uvfits or miriad files. '
'Use the special key "comment" for long multi-line string comments.')
self._extra_keywords = uvp.UVParameter('extra_keywords', required=False,
description=desc, value={},
spoof_val={}, expected_type=dict)
desc = ('Array giving coordinates of antennas relative to '
'telescope_location (ITRF frame), shape (Nants_telescope, 3), '
'units meters. See the tutorial page in the documentation '
'for an example of how to convert this to topocentric frame.')
self._antenna_positions = uvp.AntPositionParameter('antenna_positions',
required=False,
description=desc,
form=(
'Nants_telescope', 3),
expected_type=np.float,
tols=1e-3) # 1 mm
desc = ('Array of antenna diameters in meters. Used by CASA to '
'(i.e. number of spectra). Not necessarily '
'equal to Nbls * Ntimes', expected_type=int)
self._Nfreqs = uvp.UVParameter('Nfreqs', description='Number of frequency channels',
expected_type=int)
self._Npols = uvp.UVParameter('Npols', description='Number of polarizations',
expected_type=int)
desc = ('Array of the visibility data, shape: (Nblts, Nspws, Nfreqs, '
'Npols), type = complex float, in units of self.vis_units')
self._data_array = uvp.UVParameter('data_array', description=desc,
form=('Nblts', 'Nspws',
'Nfreqs', 'Npols'),
expected_type=np.complex)
desc = 'Visibility units, options are: "uncalib", "Jy" or "K str"'
self._vis_units = uvp.UVParameter('vis_units', description=desc,
form='str', expected_type=str,
acceptable_vals=["uncalib", "Jy", "K str"])
desc = ('Number of data points averaged into each data element, '
'NOT required to be an integer. type = float, same shape as data_array')
self._nsample_array = uvp.UVParameter('nsample_array', description=desc,
form=('Nblts', 'Nspws',
'Nfreqs', 'Npols'),
expected_type=(np.float))
desc = 'Boolean flag, True is flagged, same shape as data_array.'
self._flag_array = uvp.UVParameter('flag_array', description=desc,
form=('Nblts', 'Nspws',
'Nfreqs', 'Npols'),
expected_type=np.bool)
)
self._flag_array = uvp.UVParameter(
"flag_array",
description=desc,
form=("Nants_data", "Nspws", "Nfreqs", "Ntimes", "Njones"),
expected_type=np.bool,
)
desc = (
"Array of qualities of calibration solutions. "
"The shape depends on cal_type, if the cal_type is 'gain' or "
"'unknown', the shape is: (Nants_data, Nspws, Nfreqs, Ntimes, Njones), "
"if the cal_type is 'delay', the shape is "
"(Nants_data, Nspws, 1, Ntimes, Njones). The type is float."
)
self._quality_array = uvp.UVParameter(
"quality_array",
description=desc,
form=("Nants_data", "Nspws", "Nfreqs", "Ntimes", "Njones"),
expected_type=np.float,
)
desc = (
"Orientation of the physical dipole corresponding to what is "
'labelled as the x polarization. Options are "east" '
'(indicating east/west orientation) and "north" (indicating '
"north/south orientation)"
)
self._x_orientation = uvp.UVParameter(
"x_orientation",
description=desc,
expected_type=str,
)
desc = (
"Array of frequencies, center of the channel, "
"shape (Nspws, Nfreqs), units Hz."
)
self._freq_array = uvp.UVParameter(
"freq_array",
description=desc,
form=("Nspws", "Nfreqs"),
expected_type=np.float,
tols=1e-3,
) # mHz
desc = "Channel width of of a frequency bin. Units Hz."
self._channel_width = uvp.UVParameter(
"channel_width", description=desc, expected_type=np.float, tols=1e-3
)
desc = (
"Array of antenna polarization integers, shape (Njones). "
"linear pols -5:-8 (jxx, jyy, jxy, jyx)."
"circular pols -1:-4 (jrr, jll. jrl, jlr)."
)
self._jones_array = uvp.UVParameter(
"jones_array",
description=desc,
expected_type=int,
acceptable_vals=list(np.arange(-8, 0)),
form=("Njones",),
)
'or power values ("power" beam type) for beam model. units are linear '
'normalized to either peak or solid angle as given by data_normalization. '
'The shape depends on the beam_type and pixel_coordinate_system, if it is '
'"healpix", the shape is: (Naxes_vec, Nspws, Nfeeds or Npols, Nfreqs, Npixels), '
'otherwise it is (Naxes_vec, Nspws, Nfeeds or Npols, Nfreqs, Naxes2, Naxes1)')
self._data_array = uvp.UVParameter('data_array', description=desc,
expected_type=np.complex,
form=('Naxes_vec', 'Nspws', 'Nfeeds',
'Nfreqs', 'Naxes2', 'Naxes1'),
tols=1e-3)
desc = ('Frequency dependence of the beam. Depending on the data_normalization, '
'this may contain only the frequency dependence of the receiving '
'chain ("physical" normalization) or all the frequency dependence '
'("peak" normalization).')
self._bandpass_array = uvp.UVParameter('bandpass_array', description=desc,
expected_type=np.float,
form=('Nspws', 'Nfreqs'),
tols=1e-3)
# --------- metadata -------------
self._telescope_name = uvp.UVParameter('telescope_name',
description='Name of telescope '
'(string)', form='str',
expected_type=str)
self._feed_name = uvp.UVParameter('feed_name',
description='Name of physical feed '
'(string)', form='str',
expected_type=str)
self._feed_version = uvp.UVParameter('feed_version',
expected_type=np.float, tols=1e-3) # 1 ms
self._channel_width = uvp.UVParameter('channel_width',
description='Width of frequency channels (Hz)',
expected_type=np.float,
tols=1e-3) # 1 mHz
# --- observation information ---
self._object_name = uvp.UVParameter('object_name',
description='Source or field '
'observed (string)', form='str',
expected_type=str)
self._telescope_name = uvp.UVParameter('telescope_name',
description='Name of telescope '
'(string)', form='str',
expected_type=str)
self._instrument = uvp.UVParameter('instrument', description='Receiver or backend. '
'Sometimes identical to telescope_name',
form='str', expected_type=str)
desc = ('Telescope location: xyz in ITRF (earth-centered frame). '
'Can also be accessed using telescope_location_lat_lon_alt or '
'telescope_location_lat_lon_alt_degrees properties')
self._telescope_location = uvp.LocationParameter('telescope_location',
description=desc,
acceptable_range=(
6.35e6, 6.39e6),
tols=1e-3)
self._history = uvp.UVParameter('history', description='String of history, units English',
form='str', expected_type=str)
# --- phasing information ---