-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfull_fov_comparison.py
82 lines (63 loc) · 2.88 KB
/
full_fov_comparison.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/python
"""
full_fov_comparison
~~~~~~~~~~~~~~~~~~~
This mode is a comparison between the transmission characteristics of full_fov.py and
full_fov_2freq.py, running on one frequency but interleaving the two transmissions each
averaging period. The first pulse in each sequence starts on the 0.1 second boundaries, to
enable bistatic listening on other radars.
:copyright: 2022 SuperDARN Canada
:author: Remington Rohel
"""
import copy
import numpy as np
import borealis_experiments.superdarn_common_fields as scf
from experiment_prototype.experiment_prototype import ExperimentPrototype
def widebeam_no_phase(frequency_khz, tx_antennas, antenna_spacing_m):
"""tx_antenna_pattern function for widebeam transmission without phasing across antennas."""
num_antennas = scf.options.main_antenna_count
pattern = np.zeros((1, num_antennas), dtype=np.complex64)
pattern[0, tx_antennas] = 1.0 + 0.0j
return pattern
class FullFOVComparison(ExperimentPrototype):
def __init__(self, **kwargs):
"""
kwargs:
freq: int, kHz
"""
cpid = 3811
super().__init__(cpid)
num_ranges = scf.STD_NUM_RANGES
if scf.options.site_id in ["cly", "rkn", "inv"]:
num_ranges = scf.POLARDARN_NUM_RANGES
# default frequency set here
freq = scf.COMMON_MODE_FREQ_1
if kwargs:
if 'freq' in kwargs.keys():
freq = kwargs['freq']
self.printing('Frequency set to {}'.format(freq))
num_antennas = scf.options.main_antenna_count
slice_0 = { # slice_id = 0
"pulse_sequence": scf.SEQUENCE_7P,
"tau_spacing": scf.TAU_SPACING_7P,
"pulse_len": scf.PULSE_LEN_45KM,
"num_ranges": num_ranges,
"first_range": scf.STD_FIRST_RANGE,
"intt": scf.INTT_7P, # duration of an integration, in ms
"beam_angle": scf.STD_16_BEAM_ANGLE,
"rx_beam_order": [[i for i in range(len(scf.STD_16_BEAM_ANGLE))]],
"tx_beam_order": [0], # only one pattern
"tx_antenna_pattern": scf.easy_widebeam,
"freq": freq, # kHz
"align_sequences": True, # align start of sequence to tenths of a second
"scanbound": scf.easy_scanbound(scf.INTT_7P, scf.STD_16_BEAM_ANGLE),
"wait_for_first_scanbound": False
}
slice_1 = copy.deepcopy(slice_0)
slice_1['tx_antennas'] = [i for i in range(num_antennas // 2)] # Only use left half of array
slice_2 = copy.deepcopy(slice_0)
slice_2['tx_antennas'] = [7, 8] # 2-antenna transmit, generates broad beam pattern
slice_2['tx_antenna_pattern'] = widebeam_no_phase
self.add_slice(slice_0)
self.add_slice(slice_1, interfacing_dict={0: 'AVEPERIOD'})
self.add_slice(slice_2, interfacing_dict={0: 'AVEPERIOD'})