Example #1
0
 def setUp(self):
     self.lsb = SpectralWindow(1000.0, 10.0, 6, sideband=-1, product='lsb')
     self.usb = SpectralWindow(1000.0, 10.0, 6, sideband=1, band='X')
     self.odd = SpectralWindow(1000.0, 10.0, 5, sideband=1)
     # channel_width will not be an exact float. The values have been
     # chosen so that bandwidth / num_chans * num_chans does not quite
     # equal bandwidth.
     self.inexact = SpectralWindow(1000.0,
                                   None,
                                   14,
                                   sideband=1,
                                   bandwidth=230.0)
Example #2
0
 def setup(self):
     self.target = Target('PKS1934-638, radec, 19:39, -63:42')
     self.antennas = [
         Antenna('m000, -30:42:39.8, 21:26:38.0, 1086.6, 13.5, '
                 '-8.264 -207.29 8.5965'),
         Antenna('m063, -30:42:39.8, 21:26:38.0, 1086.6, 13.5, '
                 '-3419.5845 -1840.48 16.3825')
     ]
     corrprods = [('m000h', 'm000h'), ('m000v', 'm000v'),
                  ('m063h', 'm063h'), ('m063v', 'm063v'),
                  ('m000h', 'm063h'), ('m000v', 'm063v')]
     subarray = Subarray(self.antennas, corrprods)
     spw = SpectralWindow(centre_freq=1284e6,
                          channel_width=0,
                          num_chans=16,
                          sideband=1,
                          bandwidth=856e6)
     # Pick a time when the source is up as that seems more realistic
     self.timestamps = 1234667890.0 + 1.0 * np.arange(10)
     self.dataset = MinimalDataSet(self.target, subarray, spw,
                                   self.timestamps)
     self.array_ant = self.dataset.sensor.get('Antennas/array/antenna')[0]
Example #3
0
                             add_applycal_sensors, calc_correction,
                             calibrate_flux)
from katdal.flags import POSTPROC
from katdal.visdatav4 import SENSOR_PROPS

POLS = ['v', 'h']
ANTS = ['m000', 'm001', 'm002', 'm003', 'm004']
N_DUMPS = 100
SAMPLE_RATE = 1712.0

CENTRE_FREQ = 1284.0
BANDWIDTH = 856.0
N_CHANS = 128
FREQS = SpectralWindow(CENTRE_FREQ,
                       None,
                       N_CHANS,
                       sideband=1,
                       bandwidth=BANDWIDTH).channel_freqs
CAL_CENTRE_FREQ = 1200.0
CAL_BANDWIDTH = 800.0
CAL_N_CHANS = 64
CAL_FREQS = SpectralWindow(CAL_CENTRE_FREQ,
                           None,
                           CAL_N_CHANS,
                           sideband=1,
                           bandwidth=CAL_BANDWIDTH).channel_freqs
DATA_TO_CAL_CHANNEL = np.abs(FREQS[:, np.newaxis] -
                             CAL_FREQS[np.newaxis, :]).argmin(axis=-1)

INPUTS = [ant + pol for ant in ANTS for pol in POLS]
INDEX1, INDEX2 = np.triu_indices(len(INPUTS))