Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
arts_sc1.py 2.92 KiB
###############################################################################
#
# Copyright (C) 2016
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
# Author
# . Daniel van der Schuur
# Purpose
# . Use stream.py to model the ARTS SC1 data path
# Description
# . This stream model matches ASTRON-SP-062, chapter 5.
###############################################################################
# Import our StreamArray class
###############################################################################
from stream import *
###############################################################################
# Constants: definitions from SP-062, page 8
###############################################################################
# Streaming array update interval
T_INT_X = 1.024 # Correlator intergration period
# Parallel (physical) dimensions
N_DISH = 12 # Number of dishes
N_POL = 2 # Number of polarizations
N_BAND = 16 # Number of bands
# Serial (time) dimensions
N_INT_X = 800000 # Number of time samples per corrrelator intergration period
N_SLOT = 1024 # Number of beamlet slots on single BF FN
W_BEAMLET = 6 # Complex beamlet data width
nof_intervals = 0 # Unlimited runtime
###############################################################################
# Equation 1
###############################################################################
parallel_dimensions= (N_DISH, N_POL, N_BAND)
data_width = N_POL*W_BEAMLET
# StreamArray definition
parallel_definition = (('dish', N_DISH), ('polarization', N_POL), ('band', N_BAND))
serial_definition = (('interval', nof_intervals, T_INT_X),('timesample', N_INT_X), ('slot', N_SLOT))
CB444 = StreamArray(parallel_definition, serial_definition, data_width, block_size=1024, nof_blocks=1)
# Print dish 0, pol 0, band (front node) 0:
for i in CB444[0][0][0]:
print i['slot']
###############################################################################
# Equation 2: transpose the band and dish (physical) dimensions of CB444: flip dimensions 0 and 2
###############################################################################
CB444_T = CB444.transpose((2,1,0))
for i in CB444_T[0][0][0]:
print i['dish']