-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2multifsound.py
68 lines (50 loc) · 2.15 KB
/
2multifsound.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
#!/usr/bin/python
"""
2multifsound
~~~~~~~~~~~~
Twofsound but transmitting two frequencies concurrently instead of alternating.
:copyright: 2019 SuperDARN Canada
:author: Keith Kotyk
"""
import copy
from experiment_prototype.experiment_prototype import ExperimentPrototype
import borealis_experiments.superdarn_common_fields as scf
class TwoMultifsound(ExperimentPrototype):
def __init__(self):
cpid = 3570
super(TwoMultifsound, self).__init__(cpid)
if scf.IS_FORWARD_RADAR:
beams_to_use = scf.STD_16_FORWARD_BEAM_ORDER
else:
beams_to_use = scf.STD_16_REVERSE_BEAM_ORDER
freqs = (scf.COMMON_MODE_FREQ_1, scf.COMMON_MODE_FREQ_2)
if scf.options.site_id in ["cly", "rkn", "inv"]:
num_ranges = scf.POLARDARN_NUM_RANGES
if scf.options.site_id in ["sas", "pgr", "lab"]:
num_ranges = scf.STD_NUM_RANGES
slice_1 = { # slice_id = 0, the first slice
"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": beams_to_use,
"tx_beam_order": beams_to_use,
"freq" : freqs[0], #kHz
"acf": True,
"xcf": True, # cross-correlation processing
"acfint": True, # interferometer acfs
}
slice_2 = copy.deepcopy(slice_1)
slice_2['freq'] = freqs[1]
list_of_slices = [slice_1, slice_2]
sum_of_freq = 0
for slice in list_of_slices:
sum_of_freq += slice['freq']# kHz, oscillator mixer frequency on the USRP for TX
rxctrfreq = txctrfreq = int(sum_of_freq/len(list_of_slices))
super().__init__(cpid, txctrfreq=txctrfreq, rxctrfreq=rxctrfreq,
comment_string='Twofsound simultaneous in-sequence')
self.add_slice(slice_1)
self.add_slice(slice_2, interfacing_dict={0: 'CONCURRENT'})