Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
063c0c58
Commit
063c0c58
authored
6 years ago
by
Jonathan Hargreaves
Browse files
Options
Downloads
Patches
Plain Diff
Utility to set weights in arts sc4 tab beamformer based on Stefan Wijnholds script
parent
353e10a6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/arts/commissioning/arts_sc4_tabs_weights.py
+58
-0
58 additions, 0 deletions
applications/arts/commissioning/arts_sc4_tabs_weights.py
with
58 additions
and
0 deletions
applications/arts/commissioning/arts_sc4_tabs_weights.py
0 → 100644
+
58
−
0
View file @
063c0c58
#! /usr/bin/env python
###############################################################################
#
# Copyright (C) 2012
# 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/>.
#
###############################################################################
"""
Utility to set the weights in the ARTS SC4 tabs beamformer
Replicate Stefan Wijnhold
'
s Matlab script (BFWeights.m)
Then apply the weights using Pieter Donker
'
s script
$UPE/peripherals/pi_arts_tab_beamformer_weights.py
Usage:
python arts_sc4_tabs_weights.py
"""
import
math
import
pi_arts_tab_beamformer_weights
num_dish
=
10
num_tabs
=
12
#phases = [num_dish][num_tabs] * 0
norm_factor
=
255.0
/
math
.
sqrt
(
num_dish
)
tab_index
=
range
(
-
int
(
math
.
floor
(
num_tabs
/
2
)),
int
(
math
.
floor
((
num_tabs
)
/
2
))
)
beta
=
[
float
(
eachelement
)
/
float
(
num_tabs
)
for
eachelement
in
tab_index
]
dishes
=
range
(
num_dish
)
phase_n
=
[[
eachtab
*
float
(
eachdish
)
for
eachdish
in
dishes
]
for
eachtab
in
beta
]
for
tab
in
range
(
num_tabs
):
for
dish
in
range
(
num_dish
):
weightre
=
norm_factor
*
math
.
cos
(
2
*
math
.
pi
*
phase_n
[
tab
][
dish
])
weightim
=
norm_factor
*
math
.
sin
(
2
*
math
.
pi
*
phase_n
[
tab
][
dish
])
print
"
tab
"
,
tab
,
"
dish
"
,
dish
,
"
phase
"
,
2
*
math
.
pi
*
phase_n
[
tab
][
dish
],
"
weight re, im
"
,
weightre
,
weightim
#print tab_index, beta, dishes
#print phase_n
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment