options: parameters: author: '' catch_exceptions: 'True' category: '[GRC Hier Blocks]' cmake_opt: '' comment: '' copyright: '' description: '' gen_cmake: 'On' gen_linking: dynamic generate_options: qt_gui hier_block_src_path: '.:' id: baa_seminar max_nouts: '0' output_language: python placement: (0,0) qt_qss_theme: '' realtime_scheduling: '' run: 'True' run_command: '{python} -u {filename}' run_options: run sizing_mode: fixed thread_safe_setters: '' title: '' window_size: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [8, 8] rotation: 0 state: enabled blocks: - name: IF id: variable_qtgui_entry parameters: comment: '' entry_signal: editingFinished gui_hint: Main@3:1,0 label: IF Frequency (GHz) type: real value: round(IF_freq/1e9,4) states: bus_sink: false bus_source: false bus_structure: null coordinate: [1216, 2764.0] rotation: 0 state: true - name: actual_freq id: variable parameters: comment: '' value: RF states: bus_sink: false bus_source: false bus_structure: null coordinate: [320, 148.0] rotation: 0 state: true - name: correct_baseline id: variable_qtgui_check_box parameters: comment: '' 'false': 'False' gui_hint: Main@1:0,0 label: Baseline Correction 'true': 'True' type: bool value: 'False' states: bus_sink: false bus_source: false bus_structure: null coordinate: [64, 2764.0] rotation: 0 state: true - name: data_rate id: variable parameters: comment: 'The "back end" operates at this many Hz 20Hz should be more than adequate for any data-logging requirements for this type of observing' value: '10' states: bus_sink: false bus_source: false bus_structure: null coordinate: [16, 216.0] rotation: 0 state: enabled - name: dc_gain id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:0,0 label: '"Detector Output Mult."' min_len: '100' orient: QtCore.Qt.Horizontal rangeType: float start: '1' step: '10' stop: '1000' value: dmult widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [368, 2764.0] rotation: 0 state: true - name: dophigh id: variable parameters: comment: '' value: ((samp_rate/2.0)/RF)*299792.0 states: bus_sink: false bus_source: false bus_structure: null coordinate: [128, 212.0] rotation: 0 state: enabled - name: doplow id: variable parameters: comment: '' value: -((samp_rate/2.0)/RF)*299792.0 states: bus_sink: false bus_source: false bus_structure: null coordinate: [128, 100.0] rotation: 0 state: enabled - name: fftrate id: variable parameters: comment: '' value: int(samp_rate/fftsize) states: bus_sink: false bus_source: false bus_structure: null coordinate: [16, 600.0] rotation: 0 state: enabled - name: fftsize id: variable parameters: comment: 'We make this a variable, but in reality Embedded Python blocks dont handle runtime vector sizing very well' value: '2048' states: bus_sink: false bus_source: false bus_structure: null coordinate: [16, 388.0] rotation: 0 state: enabled - name: fper id: variable parameters: comment: 'Compute fringe period from baseline length center frequency and declination' value: ra_funcs.fperiod(sky_freq*1e9,ibaseline,idecln,0.0) states: bus_sink: false bus_source: false bus_structure: null coordinate: [736, 2516.0] rotation: 0 state: true - name: freqlow id: variable parameters: comment: '' value: (IF_freq-(samp_rate/2.0))/1.0e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [192, 696.0] rotation: 0 state: enabled - name: freqstep id: variable parameters: comment: '' value: (samp_rate/fftsize)/1.0e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [200, 592.0] rotation: 0 state: enabled - name: gmt id: variable parameters: comment: '' value: time.gmtime() states: bus_sink: false bus_source: false bus_structure: null coordinate: [832, 3036.0] rotation: 0 state: true - name: iangEast id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:4,0,1,2 label: Phase Correction East min_len: '400' orient: QtCore.Qt.Horizontal rangeType: float start: '-180.0' step: '2.0' stop: '180.0' value: angleEast widget: counter_slider states: bus_sink: false bus_source: false bus_structure: null coordinate: [1104, 3188.0] rotation: 0 state: true - name: iangWest id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:4,2,1,2 label: Phase Correction West min_len: '400' orient: QtCore.Qt.Horizontal rangeType: float start: '-180.0' step: '2.0' stop: '180.0' value: angleWest widget: counter_slider states: bus_sink: false bus_source: false bus_structure: null coordinate: [1280, 3188.0] rotation: 0 state: true - name: ibaseline id: variable_qtgui_entry parameters: comment: '' entry_signal: editingFinished gui_hint: Main@3:2,2 label: Baseline Length type: real value: baseline states: bus_sink: false bus_source: false bus_structure: null coordinate: [1312, 3092.0] rotation: 0 state: true - name: idceast id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:6,0,1,2 label: DC Offset East min_len: '400' orient: QtCore.Qt.Horizontal rangeType: float start: '-0.01' step: '0.0001' stop: '0.01' value: dceast widget: counter_slider states: bus_sink: false bus_source: false bus_structure: null coordinate: [1464, 3188.0] rotation: 0 state: true - name: idcwest id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:6,2,1,2 label: DC Offset West min_len: '400' orient: QtCore.Qt.Horizontal rangeType: float start: '-0.01' step: '0.0001' stop: '0.01' value: dceast widget: counter_slider states: bus_sink: false bus_source: false bus_structure: null coordinate: [1616, 3188.0] rotation: 0 state: true - name: idecln id: variable_qtgui_entry parameters: comment: '' entry_signal: editingFinished gui_hint: Main@3:2,1 label: Declination type: real value: declination states: bus_sink: false bus_source: false bus_structure: null coordinate: [1296, 2996.0] rotation: 0 state: true - name: ihighpass id: variable_qtgui_check_box parameters: comment: '' 'false': '0' gui_hint: Main@3:0,3 label: Enable differential high pass 'true': '1' type: int value: highpass states: bus_sink: false bus_source: false bus_structure: null coordinate: [920, 2764.0] rotation: 0 state: true - name: imulEast id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:5,0 label: Gain Correction East min_len: '100' orient: QtCore.Qt.Horizontal rangeType: float start: '0.1' step: '0.01' stop: '1.5' value: mulEast widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [928, 3188.0] rotation: 0 state: true - name: imulWest id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:5,1 label: Gain Correction West min_len: '100' orient: QtCore.Qt.Horizontal rangeType: float start: '0.1' step: '0.01' stop: '1.5' value: mulWest widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [744, 3188.0] rotation: 0 state: true - name: irfgain id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:1,1 label: RF Gain min_len: '100' orient: QtCore.Qt.Horizontal rangeType: int start: '0' step: '5' stop: '100' value: rfgain widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [1088, 2764.0] rotation: 0 state: true - name: is_usrp id: variable parameters: comment: '' value: '"uhd" in device' states: bus_sink: false bus_source: false bus_structure: null coordinate: [336, 508.0] rotation: 0 state: true - name: isinteg id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:0,2 label: Spectral Integration Time min_len: '100' orient: QtCore.Qt.Horizontal rangeType: float start: '1' step: '10' stop: '1000' value: sinteg widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [744, 2764.0] rotation: 0 state: true - name: itinteg id: variable_qtgui_range parameters: comment: '' gui_hint: Main@3:0,1 label: TP Integration Time min_len: '100' orient: QtCore.Qt.Horizontal rangeType: float start: '1' step: '10' stop: '500' value: tinteg widget: counter states: bus_sink: false bus_source: false bus_structure: null coordinate: [560, 2764.0] rotation: 0 state: true - name: pacer id: variable_function_probe parameters: block_id: pacer_probe comment: 'A bit of a hack to get us an LMST display that is updated at 1Hz' function_args: '' function_name: level poll_rate: '1' value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [544, 2988.0] rotation: 0 state: true - name: phaseEast id: variable parameters: comment: '' value: complex(math.cos(math.radians(iangEast)),math.sin(math.radians(iangEast))) states: bus_sink: false bus_source: false bus_structure: null coordinate: [304, 292.0] rotation: 0 state: true - name: phaseWest id: variable parameters: comment: '' value: complex(math.cos(math.radians(iangWest)),math.sin(math.radians(iangWest))) states: bus_sink: false bus_source: false bus_structure: null coordinate: [304, 364.0] rotation: 0 state: true - name: samp_rate id: variable parameters: comment: '' value: int(srate) states: bus_sink: false bus_source: false bus_structure: null coordinate: [24, 132.0] rotation: 0 state: enabled - name: sky_freq id: variable_qtgui_entry parameters: comment: '' entry_signal: editingFinished gui_hint: Main@3:3,0 label: Sky Frequency (GHz) type: raw value: round(4850e6/1e9,4) states: bus_sink: false bus_source: false bus_structure: null coordinate: [1368, 2764.0] rotation: 0 state: true - name: split_ratio id: variable parameters: comment: '' value: '100' states: bus_sink: false bus_source: false bus_structure: null coordinate: [208, 508.0] rotation: 0 state: true - name: tiktok id: variable parameters: comment: '' value: pacer*0.0 states: bus_sink: false bus_source: false bus_structure: null coordinate: [432, 2988.0] rotation: 0 state: true - name: today id: variable parameters: comment: '' value: '"%04d-%02d-%02d" % (gmt.tm_year, gmt.tm_mon, gmt.tm_mday)' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1008, 3036.0] rotation: 0 state: true - name: tunereq id: variable parameters: comment: '' value: uhd.tune_request(RF,samp_rate*1.8) states: bus_sink: false bus_source: false bus_structure: null coordinate: [312, 68.0] rotation: 0 state: true - name: variable_qtgui_label_0 id: variable_qtgui_label parameters: comment: '' formatter: None gui_hint: 0,2 label: LMST type: bool value: ra_funcs.cur_sidereal(longitude+tiktok).replace(",",":") states: bus_sink: false bus_source: false bus_structure: null coordinate: [760, 2908.0] rotation: 0 state: true - name: variable_qtgui_label_0_0 id: variable_qtgui_label parameters: comment: '' formatter: None gui_hint: Main@3:3,2 label: Logging to... type: string value: prefix states: bus_sink: false bus_source: false bus_structure: null coordinate: [1224, 2908.0] rotation: 0 state: true - name: variable_qtgui_label_0_1 id: variable_qtgui_label parameters: comment: '' formatter: None gui_hint: 0,3 label: title type: string value: today states: bus_sink: false bus_source: false bus_structure: null coordinate: [1008, 2948.0] rotation: 0 state: true - name: variable_qtgui_label_0_1_0 id: variable_qtgui_label parameters: comment: '' formatter: None gui_hint: Main@3:2,3 label: Fringe Period type: string value: '"%5d secs" % fper' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1008, 3108.0] rotation: 0 state: true - name: winpower id: variable parameters: comment: '' value: sum([x*x for x in window.blackman_harris(fftsize)]) states: bus_sink: false bus_source: false bus_structure: null coordinate: [16, 688.0] rotation: 0 state: enabled - name: IF_freq id: parameter parameters: alias: '' comment: '' hide: none label: IF Frequency (Hz) short_id: '' type: eng_float value: 1.145e9 states: bus_sink: false bus_source: false bus_structure: null coordinate: [984, 668.0] rotation: 0 state: true - name: Main id: qtgui_tab_widget parameters: alias: '' comment: '' gui_hint: 2,0,4,4 label0: Total Power label1: Spectral label10: Tab 10 label11: Tab 11 label12: Tab 12 label13: Tab 13 label14: Tab 14 label15: Tab 15 label16: Tab 16 label17: Tab 17 label18: Tab 18 label19: Tab 19 label2: Correlation label3: Controls label4: Correction label5: Tab 5 label6: Tab 6 label7: Tab 7 label8: Tab 8 label9: Tab 9 num_tabs: '5' states: bus_sink: false bus_source: false bus_structure: null coordinate: [224, 2764.0] rotation: 0 state: true - name: RF id: parameter parameters: alias: '' comment: '' hide: none label: RF Frequency (Hz) short_id: '' type: eng_float value: 4850e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [1152, 668.0] rotation: 0 state: true - name: angleEast id: parameter parameters: alias: '' comment: '' hide: none label: Phase Corr. Angle EAST short_id: '' type: eng_float value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [24, 1068.0] rotation: 0 state: true - name: angleWest id: parameter parameters: alias: '' comment: '' hide: none label: Phase Corr. Angle WEST short_id: '' type: eng_float value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [208, 1076.0] rotation: 0 state: true - name: antenna id: parameter parameters: alias: '' comment: '' hide: none label: '"Antenna Selection"' short_id: '' type: str value: '""' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1160, 988.0] rotation: 0 state: true - name: baseline id: parameter parameters: alias: '' comment: '' hide: none label: Interferometer Baseline (meters) short_id: '' type: eng_float value: round(6,1) states: bus_sink: false bus_source: false bus_structure: null coordinate: [984, 980.0] rotation: 0 state: true - name: baseline_compensate id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\n\n\nclass blk(gr.sync_block): # other base classes\ \ are basic_block, decim_block, interp_block\n \"\"\"Baseline compensator\ \ block\n Takes in an integrated FFT vector and either outputs that\ \ vector, or\n outputs a baseline-subtracted version of that vector\n\ \ \n fftsize - size of input vector\n collect - operate\ \ in \"collect\" rather than compensate mode\n \"\"\"\n\n def __init__(self,\ \ fftsize=2048,collect=True): # only default arguments here\n \"\"\"\ arguments to this function show up as parameters in GRC\"\"\"\n gr.sync_block.__init__(\n\ \ self,\n name='BAA:Baseline Compensator', # will show\ \ up in GRC\n in_sig=[(np.float32,fftsize)],\n out_sig=[(np.float32,fftsize)]\n\ \ )\n # if an attribute with the same name as a parameter is found,\n\ \ # a callback is registered (properties work, too).\n self.collect\ \ = collect\n self.fftbuf = np.zeros(fftsize,dtype=np.float32)\n\n \ \ def work(self, input_items, output_items):\n \"\"\"Accumulate baseline\ \ data, apply corrections when asked\"\"\"\n if (self.collect == True):\n\ \ #\n # Collect samples, and compute a moving average\ \ on them\n # They're already fairly-well smoothed, so we don't\n\ \ # need to go overboard\n #\n for x in range(len(input_items[0])):\n\ \ self.fftbuf = np.add(self.fftbuf, input_items[0][x])\n \ \ self.fftbuf = np.divide(self.fftbuf, [2.0]*len(self.fftbuf))\n\ \ self.avg = sum(self.fftbuf)/len(self.fftbuf)\n self.avg\ \ *= 1.5\n \n for x in range(len(output_items[0])):\n\ \ output_items[0][x] = input_items[0][x]\n else:\n \ \ for x in range(len(output_items[0])):\n output_items[0][x]\ \ = np.subtract(input_items[0][x], self.fftbuf)\n output_items[0][x]\ \ = np.add(output_items[0][x], self.avg)\n \n return len(output_items[0])\n" affinity: '' alias: '' collect: True if correct_baseline == False else False comment: Optionally apply baseline-subtraction fftsize: fftsize maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Baseline Compensator', 'blk', [('fftsize', '2048'), ('collect', 'True')], [('0', 'float', 2048)], [('0', 'float', 2048)], 'Baseline compensator block\n Takes in an integrated FFT vector and either outputs that vector, or\n outputs a baseline-subtracted version of that vector\n \n fftsize - size of input vector\n collect - operate in "collect" rather than compensate mode\n ', ['collect']) bus_sink: false bus_source: false bus_structure: null coordinate: [1968, 1340.0] rotation: 0 state: true - name: baseline_compensate_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\n\n\nclass blk(gr.sync_block): # other base classes\ \ are basic_block, decim_block, interp_block\n \"\"\"Baseline compensator\ \ block\n Takes in an integrated FFT vector and either outputs that\ \ vector, or\n outputs a baseline-subtracted version of that vector\n\ \ \n fftsize - size of input vector\n collect - operate\ \ in \"collect\" rather than compensate mode\n \"\"\"\n\n def __init__(self,\ \ fftsize=2048,collect=True): # only default arguments here\n \"\"\"\ arguments to this function show up as parameters in GRC\"\"\"\n gr.sync_block.__init__(\n\ \ self,\n name='BAA:Baseline Compensator', # will show\ \ up in GRC\n in_sig=[(np.float32,fftsize)],\n out_sig=[(np.float32,fftsize)]\n\ \ )\n # if an attribute with the same name as a parameter is found,\n\ \ # a callback is registered (properties work, too).\n self.collect\ \ = collect\n self.fftbuf = np.zeros(fftsize,dtype=np.float32)\n\n \ \ def work(self, input_items, output_items):\n \"\"\"Accumulate baseline\ \ data, apply corrections when asked\"\"\"\n if (self.collect == True):\n\ \ #\n # Collect samples, and compute a moving average\ \ on them\n # They're already fairly-well smoothed, so we don't\n\ \ # need to go overboard\n #\n for x in range(len(input_items[0])):\n\ \ self.fftbuf = np.add(self.fftbuf, input_items[0][x])\n \ \ self.fftbuf = np.divide(self.fftbuf, [2.0]*len(self.fftbuf))\n\ \ self.avg = sum(self.fftbuf)/len(self.fftbuf)\n self.avg\ \ *= 1.5\n \n for x in range(len(output_items[0])):\n\ \ output_items[0][x] = input_items[0][x]\n else:\n \ \ for x in range(len(output_items[0])):\n output_items[0][x]\ \ = np.subtract(input_items[0][x], self.fftbuf)\n output_items[0][x]\ \ = np.add(output_items[0][x], self.avg)\n \n return len(output_items[0])\n" affinity: '' alias: '' collect: True if correct_baseline == False else False comment: Optionally apply baseline-subtraction fftsize: fftsize maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Baseline Compensator', 'blk', [('fftsize', '2048'), ('collect', 'True')], [('0', 'float', 2048)], [('0', 'float', 2048)], 'Baseline compensator block\n Takes in an integrated FFT vector and either outputs that vector, or\n outputs a baseline-subtracted version of that vector\n \n fftsize - size of input vector\n collect - operate in "collect" rather than compensate mode\n ', ['collect']) bus_sink: false bus_source: false bus_structure: null coordinate: [1968, 1460.0] rotation: 0 state: true - name: blocks_add_const_vxx_0 id: blocks_add_const_vxx parameters: affinity: '' alias: '' comment: 'Because 2nd input could be zeros We want to add a little bit so that log10 doesn''t throw exceptions' const: '[1.0e-14]*fftsize if "file=" in device else [0.0]*fftsize' maxoutbuf: '0' minoutbuf: '0' type: float vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [1728, 1452.0] rotation: 0 state: true - name: blocks_add_const_vxx_1 id: blocks_add_const_vxx parameters: affinity: '' alias: '' comment: '' const: idceast maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [912, 156.0] rotation: 0 state: true - name: blocks_add_const_vxx_1_0 id: blocks_add_const_vxx parameters: affinity: '' alias: '' comment: '' const: idcwest maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [936, 364.0] rotation: 0 state: true - name: blocks_add_xx_0 id: blocks_add_xx parameters: affinity: '' alias: '' comment: SUM maxoutbuf: '0' minoutbuf: '0' num_inputs: '2' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1440, 1712.0] rotation: 0 state: true - name: blocks_complex_to_float_0 id: blocks_complex_to_float parameters: affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1688, 368.0] rotation: 0 state: true - name: blocks_complex_to_mag_squared_0 id: blocks_complex_to_mag_squared parameters: affinity: '' alias: '' comment: 'A detector Computes (I^2)+(Q^2)' maxoutbuf: '0' minoutbuf: '0' vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [304, 1684.0] rotation: 0 state: enabled - name: blocks_complex_to_mag_squared_0_0 id: blocks_complex_to_mag_squared parameters: affinity: '' alias: '' comment: 'A detector Computes (I^2)+(Q^2)' maxoutbuf: '0' minoutbuf: '0' vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [304, 1860.0] rotation: 0 state: enabled - name: blocks_complex_to_mag_squared_1 id: blocks_complex_to_mag_squared parameters: affinity: '' alias: '' comment: Convert to power estimate maxoutbuf: '0' minoutbuf: '0' vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [928, 1252.0] rotation: 0 state: true - name: blocks_complex_to_mag_squared_1_0 id: blocks_complex_to_mag_squared parameters: affinity: '' alias: '' comment: Convert to power estimate maxoutbuf: '0' minoutbuf: '0' vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [928, 1404.0] rotation: 0 state: true - name: blocks_integrate_xx_0 id: blocks_integrate_xx parameters: affinity: '' alias: '' comment: '' decim: split_ratio maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [568, 1716.0] rotation: 0 state: true - name: blocks_integrate_xx_0_0 id: blocks_integrate_xx parameters: affinity: '' alias: '' comment: '' decim: split_ratio maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [512, 2236.0] rotation: 0 state: true - name: blocks_integrate_xx_0_1 id: blocks_integrate_xx parameters: affinity: '' alias: '' comment: '' decim: split_ratio maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [568, 1812.0] rotation: 0 state: true - name: blocks_keep_one_in_n_0 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: 'After filtering, we don''t need high sample rates reduce to ''data_rate'' Hz' maxoutbuf: '0' minoutbuf: '0' n: int(int(samp_rate/data_rate)/split_ratio) type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1928, 1684.0] rotation: 0 state: enabled - name: blocks_keep_one_in_n_0_0 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: 'After filtering, we don''t need high sample rates reduce to ''data_rate'' Hz' maxoutbuf: '0' minoutbuf: '0' n: int(int(samp_rate/data_rate)/split_ratio) type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1800, 2332.0] rotation: 0 state: enabled - name: blocks_keep_one_in_n_0_1 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: 'After filtering, we don''t need high sample rates reduce to ''data_rate'' Hz' maxoutbuf: '0' minoutbuf: '0' n: int(int(samp_rate/data_rate)/split_ratio) type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2088, 1852.0] rotation: 0 state: enabled - name: blocks_keep_one_in_n_0_2 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: 'After filtering, we don''t need high sample rates reduce to ''data_rate'' Hz' maxoutbuf: '0' minoutbuf: '0' n: int(int(samp_rate/data_rate)/split_ratio) type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1776, 156.0] rotation: 0 state: enabled - name: blocks_keep_one_in_n_0_2_0 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: 'After filtering, we don''t need high sample rates reduce to ''data_rate'' Hz' maxoutbuf: '0' minoutbuf: '0' n: int(int(samp_rate/data_rate)/split_ratio) type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1776, 260.0] rotation: 0 state: enabled - name: blocks_keep_one_in_n_1 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: Decimate maxoutbuf: '0' minoutbuf: '0' n: int(fftrate/data_rate) type: float vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [1600, 1252.0] rotation: 0 state: true - name: blocks_keep_one_in_n_1_0 id: blocks_keep_one_in_n parameters: affinity: '' alias: '' comment: Decimate maxoutbuf: '0' minoutbuf: '0' n: int(fftrate/data_rate) type: float vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [1456, 1404.0] rotation: 0 state: true - name: blocks_multiply_conjugate_cc_1 id: blocks_multiply_conjugate_cc parameters: affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [288, 2248.0] rotation: 0 state: true - name: blocks_multiply_const_vxx_0_0 id: blocks_multiply_const_vxx parameters: affinity: '' alias: '' comment: Apply the detector-multiplier const: float(dc_gain*10) maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2040, 2324.0] rotation: 0 state: true - name: blocks_multiply_const_xx_0 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: Integrator doesn't reduce const: (1.0/split_ratio)*dc_gain maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [800, 1716.0] rotation: 0 state: true - name: blocks_multiply_const_xx_0_0 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: Integrator doesn't reduce const: 1.0/split_ratio maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1528, 2324.0] rotation: 0 state: true - name: blocks_multiply_const_xx_0_1 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: Integrator doesn't reduce const: (1.0/split_ratio)*dc_gain maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [800, 1820.0] rotation: 0 state: true - name: blocks_multiply_const_xx_1 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: '' const: imulEast*phaseEast maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1024, 60.0] rotation: 0 state: true - name: blocks_multiply_const_xx_1_0 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: '' const: imulWest*phaseWest maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1008, 292.0] rotation: 0 state: true - name: blocks_multiply_const_xx_2 id: blocks_multiply_const_xx parameters: affinity: '' alias: '' comment: '' const: ihighpass maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1760, 2044.0] rotation: 0 state: true - name: blocks_nlog10_ff_0 id: blocks_nlog10_ff parameters: affinity: '' alias: '' comment: 'Turn into 10Log10 Then scale appropriately' k: -20*math.log10(fftsize)-10*math.log10(winpower/fftsize) maxoutbuf: '0' minoutbuf: '0' n: '10' vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [2336, 1332.0] rotation: 0 state: true - name: blocks_nlog10_ff_0_0 id: blocks_nlog10_ff parameters: affinity: '' alias: '' comment: 'Turn into 10Log10 Then scale appropriately' k: -20*math.log10(fftsize)-10*math.log10(winpower/fftsize) maxoutbuf: '0' minoutbuf: '0' n: '10' vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [2320, 1476.0] rotation: 0 state: true - name: blocks_patterned_interleaver_0 id: blocks_patterned_interleaver parameters: affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' pattern: '[0,1,2,3,4,5]' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2192, 8.0] rotation: 0 state: true - name: blocks_stream_to_vector_0 id: blocks_stream_to_vector parameters: affinity: '' alias: '' comment: 'FFT requires fft-sized vectors we do that here' maxoutbuf: '0' minoutbuf: '0' num_items: fftsize type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [344, 1308.0] rotation: 0 state: true - name: blocks_stream_to_vector_0_0 id: blocks_stream_to_vector parameters: affinity: '' alias: '' comment: 'FFT requires fft-sized vectors we do that here' maxoutbuf: '0' minoutbuf: '0' num_items: fftsize type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [336, 1420.0] rotation: 0 state: true - name: blocks_sub_xx_0 id: blocks_sub_xx parameters: affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' num_inputs: '2' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1232, 2368.0] rotation: 0 state: enabled - name: blocks_sub_xx_1 id: blocks_sub_xx parameters: affinity: '' alias: '' comment: DIFFERENCE maxoutbuf: '0' minoutbuf: '0' num_inputs: '2' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1440, 1840.0] rotation: 0 state: true - name: blocks_sub_xx_1_0 id: blocks_sub_xx parameters: affinity: '' alias: '' comment: HP subtractor maxoutbuf: '0' minoutbuf: '0' num_inputs: '2' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1904, 1856.0] rotation: 0 state: true - name: bw id: parameter parameters: alias: '' comment: '' hide: none label: '"Analog Bandwidth"' short_id: '' type: eng_float value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [464, 740.0] rotation: 0 state: true - name: comp id: parameter parameters: alias: '' comment: '' hide: none label: DC/IQ compensation mode short_id: '' type: intx value: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [400, 1076.0] rotation: 0 state: true - name: dceast id: parameter parameters: alias: '' comment: '' hide: none label: East DC correction short_id: '' type: eng_float value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 1172.0] rotation: 0 state: true - name: dcwest id: parameter parameters: alias: '' comment: '' hide: none label: West DC Correction short_id: '' type: eng_float value: '0.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [208, 1180.0] rotation: 0 state: true - name: declination id: parameter parameters: alias: '' comment: '' hide: none label: Object Declination short_id: '' type: eng_float value: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [816, 964.0] rotation: 0 state: true - name: device id: parameter parameters: alias: '' comment: '' hide: none label: Device string short_id: '' type: str value: '"rtl=0 rtl=1"' states: bus_sink: false bus_source: false bus_structure: null coordinate: [648, 860.0] rotation: 0 state: true - name: diff_gain_corr id: qtgui_number_sink parameters: affinity: '' alias: '' autoscale: 'False' avg: '0' color1: ("black", "black") color10: ("black", "black") color2: ("black", "black") color3: ("black", "black") color4: ("black", "black") color5: ("black", "black") color6: ("black", "black") color7: ("black", "black") color8: ("black", "black") color9: ("black", "black") comment: '' factor1: '1' factor10: '1' factor2: '1' factor3: '1' factor4: '1' factor5: '1' factor6: '1' factor7: '1' factor8: '1' factor9: '1' graph_type: qtgui.NUM_GRAPH_NONE gui_hint: Main@4:3,0 label1: '' label10: '' label2: '' label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' max: '5' min: '-5' name: diff_gain_corr nconnections: '1' type: float unit1: '' unit10: '' unit2: '' unit3: '' unit4: '' unit5: '' unit6: '' unit7: '' unit8: '' unit9: '' update_time: '0.10' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2384, 2016.0] rotation: 0 state: true - name: dmult id: parameter parameters: alias: '' comment: '' hide: none label: Detector Multiplier short_id: '' type: eng_float value: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [384, 972.0] rotation: 0 state: true - name: fft_vxx_0 id: fft_vxx parameters: affinity: '' alias: '' comment: '' fft_size: fftsize forward: 'True' maxoutbuf: '0' minoutbuf: '0' nthreads: '1' shift: 'True' type: complex window: window.blackmanharris(fftsize) states: bus_sink: false bus_source: false bus_structure: null coordinate: [632, 1220.0] rotation: 0 state: true - name: fft_vxx_0_0 id: fft_vxx parameters: affinity: '' alias: '' comment: '' fft_size: fftsize forward: 'True' maxoutbuf: '0' minoutbuf: '0' nthreads: '1' shift: 'True' type: complex window: window.blackmanharris(fftsize) states: bus_sink: false bus_source: false bus_structure: null coordinate: [624, 1388.0] rotation: 0 state: true - name: flipper id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\n\n\nclass blk(gr.sync_block): # other base classes\ \ are basic_block, decim_block, interp_block\n \"\"\"Flipper -- simply reverse\ \ the order of a vector\n fftsize - size of the (probably FFT)\ \ vector\n enabled - whether to flip or not\n \"\"\"\n\n \ \ def __init__(self, fftsize=2048,enabled=True): # only default arguments\ \ here\n \"\"\"arguments to this function show up as parameters in GRC\"\ \"\"\n gr.sync_block.__init__(\n self,\n name='BAA:Flipper',\ \ # will show up in GRC\n in_sig=[(np.float32,fftsize)],\n \ \ out_sig=[(np.float32,fftsize)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n self.enabled = enabled\n\n def work(self,\ \ input_items, output_items):\n \"\"\"Flip order\"\"\"\n \n \ \ #\n # For each output item\n #\n # Either stuff\ \ it with flipped input, or non-flipped input\n #\n for x in range(len(output_items[0])):\n\ \ if (self.enabled == True):\n output_items[0][x]\ \ = input_items[0][x][::-1]\n else:\n output_items[0][x]\ \ = input_items[0][x]\n return len(output_items[0])\n" affinity: '' alias: '' comment: 'Optionally flip the spectral vector for display--for conventional display of redshift/blueshift' enabled: True if velocity != 0 else False fftsize: fftsize maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Flipper', 'blk', [('fftsize', '2048'), ('enabled', 'True')], [('0', 'float', 2048)], [('0', 'float', 2048)], 'Flipper -- simply reverse the order of a vector\n fftsize - size of the (probably FFT) vector\n enabled - whether to flip or not\n ', ['enabled']) bus_sink: false bus_source: false bus_structure: null coordinate: [2056, 780.0] rotation: 0 state: true - name: flipper_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\n\n\nclass blk(gr.sync_block): # other base classes\ \ are basic_block, decim_block, interp_block\n \"\"\"Flipper -- simply reverse\ \ the order of a vector\n fftsize - size of the (probably FFT)\ \ vector\n enabled - whether to flip or not\n \"\"\"\n\n \ \ def __init__(self, fftsize=2048,enabled=True): # only default arguments\ \ here\n \"\"\"arguments to this function show up as parameters in GRC\"\ \"\"\n gr.sync_block.__init__(\n self,\n name='BAA:Flipper',\ \ # will show up in GRC\n in_sig=[(np.float32,fftsize)],\n \ \ out_sig=[(np.float32,fftsize)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n self.enabled = enabled\n\n def work(self,\ \ input_items, output_items):\n \"\"\"Flip order\"\"\"\n \n \ \ #\n # For each output item\n #\n # Either stuff\ \ it with flipped input, or non-flipped input\n #\n for x in range(len(output_items[0])):\n\ \ if (self.enabled == True):\n output_items[0][x]\ \ = input_items[0][x][::-1]\n else:\n output_items[0][x]\ \ = input_items[0][x]\n return len(output_items[0])\n" affinity: '' alias: '' comment: 'Optionally flip the spectral vector for display--for conventional display of redshift/blueshift' enabled: True if velocity != 0 else False fftsize: fftsize maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Flipper', 'blk', [('fftsize', '2048'), ('enabled', 'True')], [('0', 'float', 2048)], [('0', 'float', 2048)], 'Flipper -- simply reverse the order of a vector\n fftsize - size of the (probably FFT) vector\n enabled - whether to flip or not\n ', ['enabled']) bus_sink: false bus_source: false bus_structure: null coordinate: [2056, 916.0] rotation: 0 state: true - name: formatter id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\nimport ra_funcs\n\n\nclass blk(gr.sync_block):\ \ # other base classes are basic_block, decim_block, interp_block\n \"\"\ \"A slow data textual formatter\n inputs are expected to be science-data\n\ \ Parameters:\n formatter - pointer to a custom formatter\ \ function\n filepat - pattern used for formatting filename must\ \ provide converters for YYYY MM DD\n extension - filename extension\n\ \ logtime - how often to log, in seconds\n fmtstr\ \ - formatter for data values -- most provide converters for both values\n \ \ nchan - number of interleaved channels on input\"\"\"\n \ \ \n \n\n def __init__(self, formatter=None, filepat=\"\ foonly-%d%d%d\", extension=\".csv\", \n logtime=10,fmtstr=\"%11.9f\"\ ,nchan=1,localtime=False,longitude=-76.03, legend=None): # only default arguments\ \ here\n \"\"\"arguments to this function show up as parameters in GRC\"\ \"\"\n gr.sync_block.__init__(\n self,\n name='BAA:Data\ \ Logger', # will show up in GRC\n in_sig=[np.float32],\n \ \ out_sig=None\n )\n # if an attribute with the same name\ \ as a parameter is found,\n # a callback is registered (properties work,\ \ too).\n \n #\n # Formatter is a function pointer--very\ \ often 'None'\n #\n self.formatter = formatter\n \n \ \ #\n # Controls the template for filename generation\n #\n\ \ self.filepat= filepat\n \n #\n # The filename\ \ extension\n #\n self.extension=extension\n \n \ \ #\n # The logging interval\n #\n self.logtime=logtime\n\ \ \n \n #\n # The data-item formatting string\n\ \ # \n self.fmtstr = fmtstr\n \n #\n \ \ # How many (interleaved) channels\n self.nchan = nchan\n \n\ \ #\n # Use local time, rather than UTC/GMT?\n #\n \ \ self.localtime = localtime\n \n #\n # The averaing\ \ cells\n #\n self.avg = [0.0]*nchan\n self.acnt = [0]*nchan\n\ \n \n #\n # Keep track of the next channel's averaging\ \ cell we\n # need to update\n #\n self.cndx = 0\n \ \ \n \n #\n # This isn't strictly required, since the\ \ work function code\n # will take care of whatever items it gets presented\ \ with.\n #\n self.set_output_multiple(nchan)\n \n \ \ self.now = time.time()\n \n self.longitude = longitude\n\ \ \n self.legend = legend\n \n self.legcount = 0\n\ \ self.fn = \"\"\n self.curlegend = legend\n\n def work(self,\ \ input_items, output_items):\n \n if (self.localtime == False):\n\ \ ltp = time.gmtime()\n else:\n ltp = time.localtime()\n\ \ \n #\n # Distribute the input items over the averaging\ \ buffer as appropriate\n # We assume that the input is interleaved\ \ by 'nchan'\n # We use 'self.cndx' to keep track of which channel's\ \ averaging\n # cell we need to put the next value in.\n #\n\ \ # Because GR's scheduler has no idea what our internal \"shape\"\n\ \ # is, it can hand us many, or a few, items, every time we're\n \ \ # called.\n #\n for x in range(len(input_items[0])):\n\ \ self.avg[self.cndx % self.nchan] += input_items[0][x]\n \ \ self.acnt[self.cndx % self.nchan] += 1\n \n #\n\ \ # Increment and modularly reduce cndx\n #\n \ \ self.cndx += 1\n self.cndx %= self.nchan\n \n\n \ \ if ((time.time() - self.now) > self.logtime):\n self.now\ \ = time.time()\n if (self.formatter == None):\n fn\ \ = self.filepat % (ltp.tm_year, ltp.tm_mon, ltp.tm_mday) + self.extension\n\ \ fp = open(fn, \"a\")\n #\n #\ \ Filename has changed (new date) or\n # legend has changed\ \ (new DEC/FREQ/BW) or\n # legcount >= 30\n #\n\ \ wrlegend = False\n if (self.fn != fn):\n \ \ self.fn = fn\n wrlegend = True\n \ \ elif (self.curlegend != self.legend):\n self.curlegend\ \ = self.legend\n wrlegend = True\n elif (self.legcount\ \ >= 30):\n wrlegend = True\n self.legcount\ \ = 0\n if (wrlegend == True and self.legend != None):\n \ \ self.legcount = 0\n fp.write(\"INFO:%s\\\ n\" % self.legend)\n \n fp.write(\"%02d,%02d,%02d,\"\ \ % (ltp.tm_hour, ltp.tm_min, ltp.tm_sec))\n fp.write(\"%s,\"\ \ % ra_funcs.cur_sidereal(self.longitude))\n for x in range(self.nchan):\n\ \ self.avg[x] /= self.acnt[x]\n self.acnt[x]\ \ = 1\n fp.write (self.fmtstr % (self.avg[x]))\n \ \ if (x < self.nchan-1):\n fp.write(\",\"\ )\n fp.write(\"\\n\")\n self.legcount += 1\n \ \ \n \n fp.close()\n \n \ \ else:\n self.formatter(self.filepat,self.extension,self.avg[0],self.avg[1])\n\ \ \n return len(input_items[0])\n" affinity: '' alias: '' comment: '' extension: '''.csv''' filepat: prefix+'tp-%04d%02d%02d' fmtstr: '''%11.9f''' formatter: None legend: '"Sum,Corr(R),Corr(I),Diff,East,West,DEC=%f,FREQ=%f,BW=%f" % (idecln, (RF*1e9)/1.0e6, srate/1.0e6)' localtime: False if utc != 0 else True logtime: logtime longitude: longitude maxoutbuf: '0' minoutbuf: '0' nchan: '6' states: _io_cache: ('BAA:Data Logger', 'blk', [('formatter', 'None'), ('filepat', "'foonly-%d%d%d'"), ('extension', "'.csv'"), ('logtime', '10'), ('fmtstr', "'%11.9f'"), ('nchan', '1'), ('localtime', 'False'), ('longitude', '-76.03'), ('legend', 'None')], [('0', 'float', 1)], [], 'A slow data textual formatter\n inputs are expected to be science-data\n Parameters:\n formatter - pointer to a custom formatter function\n filepat - pattern used for formatting filename must provide converters for YYYY MM DD\n extension - filename extension\n logtime - how often to log, in seconds\n fmtstr - formatter for data values -- most provide converters for both values\n nchan - number of interleaved channels on input', ['extension', 'filepat', 'fmtstr', 'formatter', 'legend', 'localtime', 'logtime', 'longitude', 'nchan']) bus_sink: false bus_source: false bus_structure: null coordinate: [2528, 4.0] rotation: 0 state: enabled - name: highpass id: parameter parameters: alias: '' comment: '' hide: none label: HIgh pass for differential pathway short_id: '' type: intx value: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [808, 644.0] rotation: 0 state: true - name: import_0 id: import parameters: alias: '' comment: '' imports: import ra_funcs states: bus_sink: false bus_source: false bus_structure: null coordinate: [352, 20.0] rotation: 0 state: true - name: import_0_0 id: import parameters: alias: '' comment: '' imports: import math states: bus_sink: false bus_source: false bus_structure: null coordinate: [496, 16.0] rotation: 0 state: true - name: import_0_0_0 id: import parameters: alias: '' comment: '' imports: import time states: bus_sink: false bus_source: false bus_structure: null coordinate: [472, 160.0] rotation: 0 state: true - name: import_0_1 id: import parameters: alias: '' comment: '' imports: from gnuradio import uhd states: bus_sink: false bus_source: false bus_structure: null coordinate: [192, 20.0] rotation: 0 state: true - name: logtime id: parameter parameters: alias: '' comment: '' hide: none label: Logging Interval (secs) short_id: '' type: eng_float value: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [480, 852.0] rotation: 0 state: true - name: longitude id: parameter parameters: alias: '' comment: '' hide: none label: Longitude short_id: '' type: eng_float value: '152.1414' states: bus_sink: false bus_source: false bus_structure: null coordinate: [208, 852.0] rotation: 0 state: true - name: mulEast id: parameter parameters: alias: '' comment: '' hide: none label: A channel balance multiplier short_id: '' type: eng_float value: '1.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 860.0] rotation: 0 state: true - name: mulWest id: parameter parameters: alias: '' comment: '' hide: none label: B channel balance multiplier short_id: '' type: eng_float value: '1.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [40, 972.0] rotation: 0 state: true - name: note_0 id: note parameters: alias: '' comment: 'The spectral sub-graph Compute the mag^2 Integrate Decimate down to "data_rate"' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [816, 1092.0] rotation: 0 state: true - name: note_0_0 id: note parameters: alias: '' comment: 'The total-power sub-graph Compute mag^2 for both inputs (East and West) Provide East and West outputs as well as sum and difference' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [512, 1548.0] rotation: 0 state: true - name: note_0_0_0 id: note parameters: alias: '' comment: 'The correlation sub-graph Compute the conjugate product Integrate Decimate down to "data_rate"' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [304, 2348.0] rotation: 0 state: true - name: note_1 id: note parameters: alias: '' comment: 'The correlator sub-graph It assumes both halves (East and West) Are equal-phase in the analog sense Otherewise you''d need to add delay and phase adjust blocks.' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [328, 2068.0] rotation: 0 state: true - name: note_2 id: note parameters: alias: '' comment: 'There are 32-bit-float numerical issues when using very-small ALPHA values in the IIR. So, we do the integration in two stages.' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1088, 1580.0] rotation: 0 state: true - name: note_3 id: note parameters: alias: '' comment: 'We implement a high-pass filter, cheaply This allows us to remove any DC offset in the correlation.' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1048, 2460.0] rotation: 0 state: true - name: note_4 id: note parameters: alias: '' comment: 'A simple high-pass for the differential pathway--if using differential interferometry, a high pass can help with DC gain drift.' note: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1624, 1916.0] rotation: 0 state: true - name: pacer_probe id: blocks_probe_signal_x parameters: affinity: '' alias: '' comment: '' type: float states: bus_sink: false bus_source: false bus_structure: null coordinate: [1744, 1796.0] rotation: 0 state: true - name: prefix id: parameter parameters: alias: '' comment: '' hide: none label: File prefix short_id: '' type: str value: '"/home/astro/GNU_Radio/USRP_data/"' states: bus_sink: false bus_source: false bus_structure: null coordinate: [544, 964.0] rotation: 0 state: true - name: qtgui_vector_sink_f_0 id: qtgui_vector_sink_f parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' autoscale: 'False' average: '1.0' color1: '"blue"' color10: '"dark blue"' color2: '"red"' color3: '"green"' color4: '"magenta"' color5: '"cyan"' color6: '"magenta"' color7: '"yellow"' color8: '"dark red"' color9: '"dark green"' comment: '' grid: 'True' gui_hint: Main@0:0,0,1,4 label1: Detector (Sum) label10: '' label2: Detector (Difference) label3: Detector(East) label4: Detector(West) label5: '' label6: '' label7: '' label8: '' label9: '' legend: 'True' maxoutbuf: '0' minoutbuf: '0' name: '"Total Power/Diff. Power"' nconnections: '4' ref_level: '0' showports: 'True' update_time: '0.250' vlen: seconds width1: '2' width10: '1' width2: '2' width3: '2' width4: '2' width5: '1' width6: '1' width7: '1' width8: '1' width9: '1' x_axis_label: '"Time (Seconds)"' x_start: '0' x_step: '1' x_units: Secs y_axis_label: '"Detector Power"' y_units: '""' ymax: '4' ymin: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2536, 228.0] rotation: 0 state: enabled - name: qtgui_vector_sink_f_0_0 id: qtgui_vector_sink_f parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' autoscale: 'False' average: '1.0' color1: '"blue"' color10: '"dark blue"' color2: '"red"' color3: '"green"' color4: '"black"' color5: '"cyan"' color6: '"magenta"' color7: '"yellow"' color8: '"dark red"' color9: '"dark green"' comment: '' grid: 'True' gui_hint: Main@2:0,0,1,4 label1: COS label10: '' label2: SIN label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' legend: 'True' maxoutbuf: '0' minoutbuf: '0' name: Correlator Output nconnections: '2' ref_level: '0' showports: 'True' update_time: '0.250' vlen: seconds width1: '2' width10: '1' width2: '2' width3: '2' width4: '1' width5: '1' width6: '1' width7: '1' width8: '1' width9: '1' x_axis_label: '"Time (Seconds)"' x_start: '0' x_step: '1' x_units: Secs y_axis_label: '"Cross Power"' y_units: '""' ymax: '1.0' ymin: '-1.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2520, 588.0] rotation: 0 state: enabled - name: qtgui_vector_sink_f_1 id: qtgui_vector_sink_f parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' autoscale: 'False' average: '1.0' color1: '"blue"' color10: '"dark blue"' color2: '"red"' color3: '"green"' color4: '"black"' color5: '"cyan"' color6: '"magenta"' color7: '"yellow"' color8: '"dark red"' color9: '"dark green"' comment: '' grid: 'True' gui_hint: Main@1:1,0 label1: '"Spectrum East"' label10: '' label2: '"Spectrum West"' label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' legend: 'True' maxoutbuf: '0' minoutbuf: '0' name: '"Doppler Velocity" if velocity == True else "Frequency"' nconnections: '2' ref_level: '0' showports: 'False' update_time: 1.0/(data_rate) vlen: fftsize width1: '1' width10: '1' width2: '1' width3: '1' width4: '1' width5: '1' width6: '1' width7: '1' width8: '1' width9: '1' x_axis_label: '"Red shift(km/s)" if velocity == True else "Frequency (MHz)"' x_start: doplow if velocity == True else freqlow x_step: (dophigh-doplow)/fftsize if velocity == True else freqstep x_units: '"km/s" if velocity == True else "MHz"' y_axis_label: Rel power (dB) y_units: dB ymax: '-10' ymin: '-80' states: bus_sink: false bus_source: false bus_structure: null coordinate: [2520, 780.0] rotation: 0 state: true - name: rfgain id: parameter parameters: alias: '' comment: '' hide: none label: RF Gain (dB) short_id: '' type: intx value: '65' states: bus_sink: false bus_source: false bus_structure: null coordinate: [824, 756.0] rotation: 0 state: true - name: seconds id: parameter parameters: alias: '' comment: '' hide: none label: Strip chart length, seconds short_id: '' type: intx value: '3600' states: bus_sink: false bus_source: false bus_structure: null coordinate: [216, 980.0] rotation: 0 state: true - name: single_pole_iir_filter_xx_0 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/itinteg,samp_rate/split_ratio) comment: A simple filter/integrator maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1104, 1708.0] rotation: 0 state: enabled - name: single_pole_iir_filter_xx_0_0 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/itinteg,samp_rate/split_ratio) comment: A simple filter/integrator maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [768, 2252.0] rotation: 0 state: enabled - name: single_pole_iir_filter_xx_0_0_0 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/(fper*1.25),samp_rate/split_ratio) comment: 'A simple filter/integrator The lower path helps us make a high-pass filter' maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [736, 2396.0] rotation: 0 state: enabled - name: single_pole_iir_filter_xx_0_1 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/itinteg,samp_rate/split_ratio) comment: A simple filter/integrator maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1048, 1828.0] rotation: 0 state: enabled - name: single_pole_iir_filter_xx_0_1_0 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/(fper*1.25),samp_rate/split_ratio) comment: 'A simple filter/integrator Bottom half of high-pass Assume 15-minute corner for now' maxoutbuf: '0' minoutbuf: '0' type: float vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1528, 2036.0] rotation: 0 state: enabled - name: single_pole_iir_filter_xx_1 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/isinteg,fftrate) comment: Integrate maxoutbuf: '0' minoutbuf: '0' type: float vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [1192, 1244.0] rotation: 0 state: true - name: single_pole_iir_filter_xx_1_0 id: single_pole_iir_filter_xx parameters: affinity: '' alias: '' alpha: ra_funcs.getalpha(1.0/isinteg,fftrate) comment: Integrate maxoutbuf: '0' minoutbuf: '0' type: float vlen: fftsize states: bus_sink: false bus_source: false bus_structure: null coordinate: [1176, 1396.0] rotation: 0 state: true - name: sinteg id: parameter parameters: alias: '' comment: '' hide: none label: Integraton Time(secs) for Spectrum short_id: '' type: eng_float value: '10.0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [984, 772.0] rotation: 0 state: true - name: srate id: parameter parameters: alias: '' comment: '' hide: none label: Sample Rate (SPS) short_id: '' type: eng_float value: 30e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [136, 332.0] rotation: 0 state: true - name: stripchart id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [2232, 244.0] rotation: 0 state: enabled - name: stripchart_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [1936, 572.0] rotation: 0 state: enabled - name: stripchart_0_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [1784, 652.0] rotation: 0 state: enabled - name: stripchart_1 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [2232, 340.0] rotation: 0 state: enabled - name: stripchart_1_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [2240, 444.0] rotation: 0 state: enabled - name: stripchart_1_0_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\n\n\nclass blk(gr.basic_block): # other\ \ base classes are basic_block, decim_block, interp_block\n \"\"\"A strip\ \ chart takes in a stream of floats and produces a 1 hour long\n strip-chart\ \ as output\n \n Params:\n decim - how much to decimate\ \ input to produce 1 SPS\n seconds - how many seconds long is the stripchart\ \ vector\n \"\"\"\n\n def __init__(self, decim=100,seconds=3600): # only\ \ default arguments here\n \"\"\"arguments to this function show up as\ \ parameters in GRC\"\"\"\n gr.basic_block.__init__(\n self,\n\ \ name='BAA:Strip Chart', # will show up in GRC\n in_sig=[np.float32],\n\ \ out_sig=[(np.float32,seconds)]\n )\n # if an attribute\ \ with the same name as a parameter is found,\n # a callback is registered\ \ (properties work, too).\n \n #\n # How much do we need\ \ to average the input to produce a 1SPS\n # output?\n #\n \ \ self.decim = decim\n \n #\n # The stripchart vector\ \ itself--must be persistent in the\n # object instance\n #\n\ \ self.strip = [0.0]*seconds\n \n #\n # keeps track\ \ of decimation\n #\n self.counter = 0\n \n #\n\ \ # We continuously average the input and store it here\n #\n\ \ self.avg = 0.0\n\n def general_work(self, input_items, output_items):\n\ \ \"\"\"take an input item(s), place appropriately in stripchart output\"\ \"\"\n \n #\n # Our averager hasn't been initialized with a\n\ \ # \"prime the pump\" value?\n # Do it now.\n #\n \ \ if (self.avg == 0.0):\n self.avg = input_items[0][0]\n \ \ self.counter = 0\n #\n # Also init the strip-chart\ \ to this level\n #\n self.strip = [self.avg]*len(self.strip)\n\ \ #\n # For each of the input items\n #\n for x\ \ in range(len(input_items[0])):\n #\n # Effectively we\ \ get a N-point moving average\n # WHere \"N\" is \"decim\"\n \ \ #\n self.avg += input_items[0][x]\n self.counter\ \ += 1\n \n #\n # Time to output an item into\ \ the stripchart\n #\n if (self.counter >= self.decim):\n\ \ \n #\n # Reduce by decim\n \ \ #\n self.avg /= self.counter\n \ \ \n #\n # Use python array notation to effect\ \ a quick\n # shift of items in the stripchart array\n \ \ #\n self.strip = [self.avg] + self.strip[:-1]\n \ \ self.counter = 0\n self.avg = 1.0e-15\n \ \ #\n # Stuff output items with the contents of the \n # possibly-updated\ \ stripchart\n #\n for y in range(len(output_items[0])):\n \ \ output_items[0][y] = self.strip\n \n #\n # Tell\ \ scheduler we consumed items\n #\n self.consume(0, len(input_items[0]))\n\ \ return len(output_items[0])\n" affinity: '' alias: '' comment: Produces a "stripchart" type vector decim: data_rate maxoutbuf: '0' minoutbuf: '0' seconds: seconds states: _io_cache: ('BAA:Strip Chart', 'blk', [('decim', '100'), ('seconds', '3600')], [('0', 'float', 1)], [('0', 'float', 3600)], 'A strip chart takes in a stream of floats and produces a 1 hour long\n strip-chart as output\n \n Params:\n decim - how much to decimate input to produce 1 SPS\n seconds - how many seconds long is the stripchart vector\n ', ['decim']) bus_sink: false bus_source: false bus_structure: null coordinate: [2240, 548.0] rotation: 0 state: enabled - name: tinteg id: parameter parameters: alias: '' comment: '' hide: none label: Integraton Time(secs) for TP short_id: '' type: eng_float value: '45' states: bus_sink: false bus_source: false bus_structure: null coordinate: [984, 876.0] rotation: 0 state: true - name: title id: parameter parameters: alias: '' comment: '' hide: none label: Title short_id: '' type: str value: '"BAA Seminar"' states: bus_sink: false bus_source: false bus_structure: null coordinate: [616, 748.0] rotation: 0 state: true - name: uhd_usrp_source_0 id: uhd_usrp_source parameters: affinity: '' alias: '' ant0: '"RX2"' ant1: '"RX2"' ant10: '"RX2"' ant11: '"RX2"' ant12: '"RX2"' ant13: '"RX2"' ant14: '"RX2"' ant15: '"RX2"' ant16: '"RX2"' ant17: '"RX2"' ant18: '"RX2"' ant19: '"RX2"' ant2: '"RX2"' ant20: '"RX2"' ant21: '"RX2"' ant22: '"RX2"' ant23: '"RX2"' ant24: '"RX2"' ant25: '"RX2"' ant26: '"RX2"' ant27: '"RX2"' ant28: '"RX2"' ant29: '"RX2"' ant3: '"RX2"' ant30: '"RX2"' ant31: '"RX2"' ant4: '"RX2"' ant5: '"RX2"' ant6: '"RX2"' ant7: '"RX2"' ant8: '"RX2"' ant9: '"RX2"' bw0: '0' bw1: '0' bw10: '0' bw11: '0' bw12: '0' bw13: '0' bw14: '0' bw15: '0' bw16: '0' bw17: '0' bw18: '0' bw19: '0' bw2: '0' bw20: '0' bw21: '0' bw22: '0' bw23: '0' bw24: '0' bw25: '0' bw26: '0' bw27: '0' bw28: '0' bw29: '0' bw3: '0' bw30: '0' bw31: '0' bw4: '0' bw5: '0' bw6: '0' bw7: '0' bw8: '0' bw9: '0' center_freq0: IF_freq center_freq1: IF_freq center_freq10: '0' center_freq11: '0' center_freq12: '0' center_freq13: '0' center_freq14: '0' center_freq15: '0' center_freq16: '0' center_freq17: '0' center_freq18: '0' center_freq19: '0' center_freq2: '0' center_freq20: '0' center_freq21: '0' center_freq22: '0' center_freq23: '0' center_freq24: '0' center_freq25: '0' center_freq26: '0' center_freq27: '0' center_freq28: '0' center_freq29: '0' center_freq3: '0' center_freq30: '0' center_freq31: '0' center_freq4: '0' center_freq5: '0' center_freq6: '0' center_freq7: '0' center_freq8: '0' center_freq9: '0' clock_rate: 0e0 clock_source0: external clock_source1: '' clock_source2: '' clock_source3: '' clock_source4: '' clock_source5: '' clock_source6: '' clock_source7: '' comment: '' dc_offs0: 0+0j dc_offs1: 0+0j dc_offs10: 0+0j dc_offs11: 0+0j dc_offs12: 0+0j dc_offs13: 0+0j dc_offs14: 0+0j dc_offs15: 0+0j dc_offs16: 0+0j dc_offs17: 0+0j dc_offs18: 0+0j dc_offs19: 0+0j dc_offs2: 0+0j dc_offs20: 0+0j dc_offs21: 0+0j dc_offs22: 0+0j dc_offs23: 0+0j dc_offs24: 0+0j dc_offs25: 0+0j dc_offs26: 0+0j dc_offs27: 0+0j dc_offs28: 0+0j dc_offs29: 0+0j dc_offs3: 0+0j dc_offs30: 0+0j dc_offs31: 0+0j dc_offs4: 0+0j dc_offs5: 0+0j dc_offs6: 0+0j dc_offs7: 0+0j dc_offs8: 0+0j dc_offs9: 0+0j dc_offs_enb0: disabled dc_offs_enb1: disabled dc_offs_enb10: default dc_offs_enb11: default dc_offs_enb12: default dc_offs_enb13: default dc_offs_enb14: default dc_offs_enb15: default dc_offs_enb16: default dc_offs_enb17: default dc_offs_enb18: default dc_offs_enb19: default dc_offs_enb2: default dc_offs_enb20: default dc_offs_enb21: default dc_offs_enb22: default dc_offs_enb23: default dc_offs_enb24: default dc_offs_enb25: default dc_offs_enb26: default dc_offs_enb27: default dc_offs_enb28: default dc_offs_enb29: default dc_offs_enb3: default dc_offs_enb30: default dc_offs_enb31: default dc_offs_enb4: default dc_offs_enb5: default dc_offs_enb6: default dc_offs_enb7: default dc_offs_enb8: default dc_offs_enb9: default dev_addr: '""' dev_args: '"num_recv_frames=256"' gain0: irfgain gain1: irfgain gain10: '0' gain11: '0' gain12: '0' gain13: '0' gain14: '0' gain15: '0' gain16: '0' gain17: '0' gain18: '0' gain19: '0' gain2: '0' gain20: '0' gain21: '0' gain22: '0' gain23: '0' gain24: '0' gain25: '0' gain26: '0' gain27: '0' gain28: '0' gain29: '0' gain3: '0' gain30: '0' gain31: '0' gain4: '0' gain5: '0' gain6: '0' gain7: '0' gain8: '0' gain9: '0' gain_type0: default gain_type1: default gain_type10: default gain_type11: default gain_type12: default gain_type13: default gain_type14: default gain_type15: default gain_type16: default gain_type17: default gain_type18: default gain_type19: default gain_type2: default gain_type20: default gain_type21: default gain_type22: default gain_type23: default gain_type24: default gain_type25: default gain_type26: default gain_type27: default gain_type28: default gain_type29: default gain_type3: default gain_type30: default gain_type31: default gain_type4: default gain_type5: default gain_type6: default gain_type7: default gain_type8: default gain_type9: default iq_imbal0: 0+0j iq_imbal1: 0+0j iq_imbal10: 0+0j iq_imbal11: 0+0j iq_imbal12: 0+0j iq_imbal13: 0+0j iq_imbal14: 0+0j iq_imbal15: 0+0j iq_imbal16: 0+0j iq_imbal17: 0+0j iq_imbal18: 0+0j iq_imbal19: 0+0j iq_imbal2: 0+0j iq_imbal20: 0+0j iq_imbal21: 0+0j iq_imbal22: 0+0j iq_imbal23: 0+0j iq_imbal24: 0+0j iq_imbal25: 0+0j iq_imbal26: 0+0j iq_imbal27: 0+0j iq_imbal28: 0+0j iq_imbal29: 0+0j iq_imbal3: 0+0j iq_imbal30: 0+0j iq_imbal31: 0+0j iq_imbal4: 0+0j iq_imbal5: 0+0j iq_imbal6: 0+0j iq_imbal7: 0+0j iq_imbal8: 0+0j iq_imbal9: 0+0j iq_imbal_enb0: disabled iq_imbal_enb1: disabled iq_imbal_enb10: default iq_imbal_enb11: default iq_imbal_enb12: default iq_imbal_enb13: default iq_imbal_enb14: default iq_imbal_enb15: default iq_imbal_enb16: default iq_imbal_enb17: default iq_imbal_enb18: default iq_imbal_enb19: default iq_imbal_enb2: default iq_imbal_enb20: default iq_imbal_enb21: default iq_imbal_enb22: default iq_imbal_enb23: default iq_imbal_enb24: default iq_imbal_enb25: default iq_imbal_enb26: default iq_imbal_enb27: default iq_imbal_enb28: default iq_imbal_enb29: default iq_imbal_enb3: default iq_imbal_enb30: default iq_imbal_enb31: default iq_imbal_enb4: default iq_imbal_enb5: default iq_imbal_enb6: default iq_imbal_enb7: default iq_imbal_enb8: default iq_imbal_enb9: default lo_export0: 'False' lo_export1: 'False' lo_export10: 'False' lo_export11: 'False' lo_export12: 'False' lo_export13: 'False' lo_export14: 'False' lo_export15: 'False' lo_export16: 'False' lo_export17: 'False' lo_export18: 'False' lo_export19: 'False' lo_export2: 'False' lo_export20: 'False' lo_export21: 'False' lo_export22: 'False' lo_export23: 'False' lo_export24: 'False' lo_export25: 'False' lo_export26: 'False' lo_export27: 'False' lo_export28: 'False' lo_export29: 'False' lo_export3: 'False' lo_export30: 'False' lo_export31: 'False' lo_export4: 'False' lo_export5: 'False' lo_export6: 'False' lo_export7: 'False' lo_export8: 'False' lo_export9: 'False' lo_source0: internal lo_source1: internal lo_source10: internal lo_source11: internal lo_source12: internal lo_source13: internal lo_source14: internal lo_source15: internal lo_source16: internal lo_source17: internal lo_source18: internal lo_source19: internal lo_source2: internal lo_source20: internal lo_source21: internal lo_source22: internal lo_source23: internal lo_source24: internal lo_source25: internal lo_source26: internal lo_source27: internal lo_source28: internal lo_source29: internal lo_source3: internal lo_source30: internal lo_source31: internal lo_source4: internal lo_source5: internal lo_source6: internal lo_source7: internal lo_source8: internal lo_source9: internal maxoutbuf: '0' minoutbuf: '0' nchan: '2' num_mboards: '1' otw: '' rx_agc0: Disabled rx_agc1: Disabled rx_agc10: Default rx_agc11: Default rx_agc12: Default rx_agc13: Default rx_agc14: Default rx_agc15: Default rx_agc16: Default rx_agc17: Default rx_agc18: Default rx_agc19: Default rx_agc2: Default rx_agc20: Default rx_agc21: Default rx_agc22: Default rx_agc23: Default rx_agc24: Default rx_agc25: Default rx_agc26: Default rx_agc27: Default rx_agc28: Default rx_agc29: Default rx_agc3: Default rx_agc30: Default rx_agc31: Default rx_agc4: Default rx_agc5: Default rx_agc6: Default rx_agc7: Default rx_agc8: Default rx_agc9: Default samp_rate: samp_rate sd_spec0: '' sd_spec1: '' sd_spec2: '' sd_spec3: '' sd_spec4: '' sd_spec5: '' sd_spec6: '' sd_spec7: '' show_lo_controls: 'False' start_time: '-1.0' stream_args: '' stream_chans: '[]' sync: sync time_source0: '' time_source1: '' time_source2: '' time_source3: '' time_source4: '' time_source5: '' time_source6: '' time_source7: '' type: fc32 states: bus_sink: false bus_source: false bus_structure: null coordinate: [600, 164.0] rotation: 0 state: enabled - name: utc id: parameter parameters: alias: '' comment: '' hide: none label: Log in UTC time short_id: '' type: intx value: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [824, 860.0] rotation: 0 state: true - name: vectorlogger id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\nimport ra_funcs\n\nclass blk(gr.sync_block):\ \ # other base classes are basic_block, decim_block, interp_block\n \"\"\ \"Logging of vectors (like FFT outputs)\n fftsize - size of fft vector\ \ to log\n formetter - formatter function pointer\n filepat\ \ - pattern for beginning of filenaem\n extension - file extension\n\ \ logtime - how often to log (seconds)\n fmtstr - format string\ \ for data values\n localtime - whether to use local or UTC time\n\ \ fftshift - whether to shift FFT vector before logging\n \ \ longitude - local longitude in decimal form\n \"\"\"\n\n def __init__(self,\ \ fftsize=2048, formatter=None, filepat=\"foonly-%04d%02d%02d\", extension=\"\ .csv\",\n logtime=10, fmtstr=\"%11.9f\", localtime=False, fftshift=False,longitude=-76.03):\ \ # only default arguments here\n \"\"\"arguments to this function show\ \ up as parameters in GRC\"\"\"\n gr.sync_block.__init__(\n \ \ self,\n name='BAA:Vector Logger', # will show up in GRC\n \ \ in_sig=[(np.float32,fftsize)],\n out_sig=None\n \ \ )\n \n self.formatter = formatter\n self.filepat =\ \ filepat\n self.extension = extension\n self.logtime = logtime\n\ \ self.fmtstr = fmtstr\n self.localtime = localtime\n self.vecavg\ \ = np.zeros(fftsize)\n self.now = time.time()\n self.fftshift\ \ = fftshift\n self.longitude = longitude\n\n \n\n def work(self,\ \ input_items, output_items):\n \"\"\"Log a vector into a file\"\"\"\n\ \ for x in range(len(input_items[0])):\n self.vecavg = np.add(self.vecavg,\ \ input_items[0][x])\n self.vecavg = np.divide(self.vecavg, [2.0]*len(self.vecavg))\n\ \ \n #\n # If time to log\n #\n if (time.time()\ \ - self.now >= self.logtime):\n self.now = time.time()\n \ \ #\n # Decide on localtime or gmtime\n #\n \ \ if (self.localtime == True):\n ltp = time.localtime()\n\ \ else:\n ltp = time.gmtime()\n \n \ \ #\n # If they specified a formatter function call it instead\n\ \ #\n if (self.formatter != None):\n self.formatter(self.vecavg,self.filepat,self.extension)\n\ \ \n #\n # Otherwise, do it here\n \ \ #\n else:\n #\n # Open the output\ \ file, with a name according to the filepat\n # specified\n\ \ #\n fp = open(self.filepat % (ltp.tm_year, ltp.tm_mon,\ \ ltp.tm_mday) + self.extension, \"a\")\n \n #\n\ \ # Write record header\n #\n fp.write\ \ (\"%02d,%02d,%02d,\" % (ltp.tm_hour, ltp.tm_min, ltp.tm_sec))\n \ \ fp.write (\"%s,\" % ra_funcs.cur_sidereal(self.longitude))\n \ \ \n #\n # Write each of the data items\ \ in the input vector\n #\n \n \ \ #\n # Check if they want us to do an FFTSHIFT operation\n\ \ # (to normalize the ordering of FFTW3 outputs)\n \ \ #\n if (self.fftshift == True):\n \ \ l = len(self.vecavg)\n l1 = list(self.vecavg[int(l/2):])\n\ \ l2 = list(self.vecavg[0:int(l/2)])\n \ \ lout = l1 + l2\n lout = np.array(lout)\n \ \ else:\n lout = self.vecavg\n for x in\ \ range(len(self.vecavg)):\n fp.write(self.fmtstr % lout[x])\n\ \ if (x < len(self.vecavg)-1):\n fp.write(\"\ ,\")\n fp.write(\"\\n\")\n fp.close()\n \ \ \n \n return len(input_items[0])\n" affinity: '' alias: '' comment: '' extension: '''.csv''' fftshift: 'False' fftsize: fftsize filepat: prefix+'fft-0-%04d%02d%02d' fmtstr: '''%6.2f''' formatter: None localtime: False if utc != 0 else True logtime: logtime*3 longitude: longitude maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Vector Logger', 'blk', [('fftsize', '2048'), ('formatter', 'None'), ('filepat', "'foonly-%04d%02d%02d'"), ('extension', "'.csv'"), ('logtime', '10'), ('fmtstr', "'%11.9f'"), ('localtime', 'False'), ('fftshift', 'False'), ('longitude', '-76.03')], [('0', 'float', 2048)], [], 'Logging of vectors (like FFT outputs)\n fftsize - size of fft vector to log\n formetter - formatter function pointer\n filepat - pattern for beginning of filenaem\n extension - file extension\n logtime - how often to log (seconds)\n fmtstr - format string for data values\n localtime - whether to use local or UTC time\n fftshift - whether to shift FFT vector before logging\n longitude - local longitude in decimal form\n ', ['extension', 'fftshift', 'filepat', 'fmtstr', 'formatter', 'localtime', 'logtime', 'longitude']) bus_sink: false bus_source: false bus_structure: null coordinate: [2520, 972.0] rotation: 0 state: disabled - name: vectorlogger_0 id: epy_block parameters: _source_code: "\"\"\"\nEmbedded Python Blocks:\n\nEach time this file is saved,\ \ GRC will instantiate the first class it finds\nto get ports and parameters\ \ of your block. The arguments to __init__ will\nbe the parameters. All of\ \ them are required to have default values!\n\"\"\"\n\nimport numpy as np\n\ from gnuradio import gr\nimport time\nimport ra_funcs\n\nclass blk(gr.sync_block):\ \ # other base classes are basic_block, decim_block, interp_block\n \"\"\ \"Logging of vectors (like FFT outputs)\n fftsize - size of fft vector\ \ to log\n formetter - formatter function pointer\n filepat\ \ - pattern for beginning of filenaem\n extension - file extension\n\ \ logtime - how often to log (seconds)\n fmtstr - format string\ \ for data values\n localtime - whether to use local or UTC time\n\ \ fftshift - whether to shift FFT vector before logging\n \ \ longitude - local longitude in decimal form\n \"\"\"\n\n def __init__(self,\ \ fftsize=2048, formatter=None, filepat=\"foonly-%04d%02d%02d\", extension=\"\ .csv\",\n logtime=10, fmtstr=\"%11.9f\", localtime=False, fftshift=False,longitude=-76.03):\ \ # only default arguments here\n \"\"\"arguments to this function show\ \ up as parameters in GRC\"\"\"\n gr.sync_block.__init__(\n \ \ self,\n name='BAA:Vector Logger', # will show up in GRC\n \ \ in_sig=[(np.float32,fftsize)],\n out_sig=None\n \ \ )\n \n self.formatter = formatter\n self.filepat =\ \ filepat\n self.extension = extension\n self.logtime = logtime\n\ \ self.fmtstr = fmtstr\n self.localtime = localtime\n self.vecavg\ \ = np.zeros(fftsize)\n self.now = time.time()\n self.fftshift\ \ = fftshift\n self.longitude = longitude\n\n \n\n def work(self,\ \ input_items, output_items):\n \"\"\"Log a vector into a file\"\"\"\n\ \ for x in range(len(input_items[0])):\n self.vecavg = np.add(self.vecavg,\ \ input_items[0][x])\n self.vecavg = np.divide(self.vecavg, [2.0]*len(self.vecavg))\n\ \ \n #\n # If time to log\n #\n if (time.time()\ \ - self.now >= self.logtime):\n self.now = time.time()\n \ \ #\n # Decide on localtime or gmtime\n #\n \ \ if (self.localtime == True):\n ltp = time.localtime()\n\ \ else:\n ltp = time.gmtime()\n \n \ \ #\n # If they specified a formatter function call it instead\n\ \ #\n if (self.formatter != None):\n self.formatter(self.vecavg,self.filepat,self.extension)\n\ \ \n #\n # Otherwise, do it here\n \ \ #\n else:\n #\n # Open the output\ \ file, with a name according to the filepat\n # specified\n\ \ #\n fp = open(self.filepat % (ltp.tm_year, ltp.tm_mon,\ \ ltp.tm_mday) + self.extension, \"a\")\n \n #\n\ \ # Write record header\n #\n fp.write\ \ (\"%02d,%02d,%02d,\" % (ltp.tm_hour, ltp.tm_min, ltp.tm_sec))\n \ \ fp.write (\"%s,\" % ra_funcs.cur_sidereal(self.longitude))\n \ \ \n #\n # Write each of the data items\ \ in the input vector\n #\n \n \ \ #\n # Check if they want us to do an FFTSHIFT operation\n\ \ # (to normalize the ordering of FFTW3 outputs)\n \ \ #\n if (self.fftshift == True):\n \ \ l = len(self.vecavg)\n l1 = list(self.vecavg[int(l/2):])\n\ \ l2 = list(self.vecavg[0:int(l/2)])\n \ \ lout = l1 + l2\n lout = np.array(lout)\n \ \ else:\n lout = self.vecavg\n for x in\ \ range(len(self.vecavg)):\n fp.write(self.fmtstr % lout[x])\n\ \ if (x < len(self.vecavg)-1):\n fp.write(\"\ ,\")\n fp.write(\"\\n\")\n fp.close()\n \ \ \n \n return len(input_items[0])\n" affinity: '' alias: '' comment: '' extension: '''.csv''' fftshift: 'False' fftsize: fftsize filepat: prefix+'fft-1-%04d%02d%02d' fmtstr: '''%6.2f''' formatter: None localtime: False if utc != 0 else True logtime: logtime*3 longitude: longitude maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('BAA:Vector Logger', 'blk', [('fftsize', '2048'), ('formatter', 'None'), ('filepat', "'foonly-%04d%02d%02d'"), ('extension', "'.csv'"), ('logtime', '10'), ('fmtstr', "'%11.9f'"), ('localtime', 'False'), ('fftshift', 'False'), ('longitude', '-76.03')], [('0', 'float', 2048)], [], 'Logging of vectors (like FFT outputs)\n fftsize - size of fft vector to log\n formetter - formatter function pointer\n filepat - pattern for beginning of filenaem\n extension - file extension\n logtime - how often to log (seconds)\n fmtstr - format string for data values\n localtime - whether to use local or UTC time\n fftshift - whether to shift FFT vector before logging\n longitude - local longitude in decimal form\n ', ['extension', 'fftshift', 'filepat', 'fmtstr', 'formatter', 'localtime', 'logtime', 'longitude']) bus_sink: false bus_source: false bus_structure: null coordinate: [2520, 1164.0] rotation: 0 state: disabled - name: velocity id: parameter parameters: alias: '' comment: '' hide: none label: Show velocities short_id: '' type: intx value: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [608, 1076.0] rotation: 0 state: true - name: virtual_sink_0 id: virtual_sink parameters: alias: '' comment: '' stream_id: rf1 states: bus_sink: false bus_source: false bus_structure: null coordinate: [1248, 84.0] rotation: 0 state: true - name: virtual_sink_0_0 id: virtual_sink parameters: alias: '' comment: '' stream_id: rf2 states: bus_sink: false bus_source: false bus_structure: null coordinate: [1240, 228.0] rotation: 0 state: true - name: virtual_sink_1 id: virtual_sink parameters: alias: '' comment: '' stream_id: fft1_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [2576, 1396.0] rotation: 0 state: true - name: virtual_sink_1_0 id: virtual_sink parameters: alias: '' comment: '' stream_id: fft2_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [2576, 1476.0] rotation: 0 state: true - name: virtual_sink_2 id: virtual_sink parameters: alias: '' comment: '' stream_id: sum_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [2384, 1700.0] rotation: 0 state: true - name: virtual_sink_2_0 id: virtual_sink parameters: alias: '' comment: '' stream_id: corr_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [2296, 2324.0] rotation: 0 state: true - name: virtual_sink_2_1 id: virtual_sink parameters: alias: '' comment: '' stream_id: diff_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [2384, 1812.0] rotation: 0 state: true - name: virtual_sink_3 id: virtual_sink parameters: alias: '' comment: '' stream_id: tp_east states: bus_sink: false bus_source: false bus_structure: null coordinate: [1456, 1620.0] rotation: 0 state: true - name: virtual_sink_3_0 id: virtual_sink parameters: alias: '' comment: '' stream_id: tp_west states: bus_sink: false bus_source: false bus_structure: null coordinate: [1304, 1996.0] rotation: 0 state: true - name: virtual_source_0 id: virtual_source parameters: alias: '' comment: '' stream_id: rf1 states: bus_sink: false bus_source: false bus_structure: null coordinate: [96, 1304.0] rotation: 0 state: true - name: virtual_source_0_0 id: virtual_source parameters: alias: '' comment: '' stream_id: rf1 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 1676.0] rotation: 0 state: true - name: virtual_source_0_0_0 id: virtual_source parameters: alias: '' comment: '' stream_id: rf1 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 2116.0] rotation: 0 state: true - name: virtual_source_0_0_0_0 id: virtual_source parameters: alias: '' comment: '' stream_id: rf2 states: bus_sink: false bus_source: false bus_structure: null coordinate: [16, 2244.0] rotation: 0 state: true - name: virtual_source_0_0_1 id: virtual_source parameters: alias: '' comment: '' stream_id: rf2 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 1852.0] rotation: 0 state: true - name: virtual_source_0_1 id: virtual_source parameters: alias: '' comment: '' stream_id: rf2 states: bus_sink: false bus_source: false bus_structure: null coordinate: [88, 1396.0] rotation: 0 state: true - name: virtual_source_1 id: virtual_source parameters: alias: '' comment: '' stream_id: fft1_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [1808, 788.0] rotation: 0 state: true - name: virtual_source_1_0 id: virtual_source parameters: alias: '' comment: '' stream_id: fft2_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [1800, 916.0] rotation: 0 state: true - name: virtual_source_2 id: virtual_source parameters: alias: '' comment: '' stream_id: sum_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [1792, 12.0] rotation: 0 state: true - name: virtual_source_2_0 id: virtual_source parameters: alias: '' comment: '' stream_id: diff_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [1792, 84.0] rotation: 0 state: true - name: virtual_source_3 id: virtual_source parameters: alias: '' comment: '' stream_id: corr_out states: bus_sink: false bus_source: false bus_structure: null coordinate: [1480, 364.0] rotation: 0 state: true - name: virtual_source_5 id: virtual_source parameters: alias: '' comment: '' stream_id: tp_east states: bus_sink: false bus_source: false bus_structure: null coordinate: [1584, 100.0] rotation: 0 state: true - name: virtual_source_5_0 id: virtual_source parameters: alias: '' comment: '' stream_id: tp_west states: bus_sink: false bus_source: false bus_structure: null coordinate: [1488, 196.0] rotation: 0 state: true connections: - [baseline_compensate, '0', blocks_nlog10_ff_0, '0'] - [baseline_compensate_0, '0', blocks_nlog10_ff_0_0, '0'] - [blocks_add_const_vxx_0, '0', baseline_compensate_0, '0'] - [blocks_add_const_vxx_1, '0', blocks_multiply_const_xx_1, '0'] - [blocks_add_const_vxx_1_0, '0', blocks_multiply_const_xx_1_0, '0'] - [blocks_add_xx_0, '0', blocks_keep_one_in_n_0, '0'] - [blocks_add_xx_0, '0', pacer_probe, '0'] - [blocks_complex_to_float_0, '0', blocks_patterned_interleaver_0, '1'] - [blocks_complex_to_float_0, '0', stripchart_0, '0'] - [blocks_complex_to_float_0, '1', blocks_patterned_interleaver_0, '2'] - [blocks_complex_to_float_0, '1', stripchart_0_0, '0'] - [blocks_complex_to_mag_squared_0, '0', blocks_integrate_xx_0, '0'] - [blocks_complex_to_mag_squared_0_0, '0', blocks_integrate_xx_0_1, '0'] - [blocks_complex_to_mag_squared_1, '0', single_pole_iir_filter_xx_1, '0'] - [blocks_complex_to_mag_squared_1_0, '0', single_pole_iir_filter_xx_1_0, '0'] - [blocks_integrate_xx_0, '0', blocks_multiply_const_xx_0, '0'] - [blocks_integrate_xx_0_0, '0', single_pole_iir_filter_xx_0_0, '0'] - [blocks_integrate_xx_0_0, '0', single_pole_iir_filter_xx_0_0_0, '0'] - [blocks_integrate_xx_0_1, '0', blocks_multiply_const_xx_0_1, '0'] - [blocks_keep_one_in_n_0, '0', virtual_sink_2, '0'] - [blocks_keep_one_in_n_0_0, '0', blocks_multiply_const_vxx_0_0, '0'] - [blocks_keep_one_in_n_0_1, '0', diff_gain_corr, '0'] - [blocks_keep_one_in_n_0_1, '0', virtual_sink_2_1, '0'] - [blocks_keep_one_in_n_0_2, '0', blocks_patterned_interleaver_0, '4'] - [blocks_keep_one_in_n_0_2, '0', stripchart_1_0, '0'] - [blocks_keep_one_in_n_0_2_0, '0', blocks_patterned_interleaver_0, '5'] - [blocks_keep_one_in_n_0_2_0, '0', stripchart_1_0_0, '0'] - [blocks_keep_one_in_n_1, '0', baseline_compensate, '0'] - [blocks_keep_one_in_n_1_0, '0', blocks_add_const_vxx_0, '0'] - [blocks_multiply_conjugate_cc_1, '0', blocks_integrate_xx_0_0, '0'] - [blocks_multiply_const_vxx_0_0, '0', virtual_sink_2_0, '0'] - [blocks_multiply_const_xx_0, '0', single_pole_iir_filter_xx_0, '0'] - [blocks_multiply_const_xx_0_0, '0', blocks_keep_one_in_n_0_0, '0'] - [blocks_multiply_const_xx_0_1, '0', single_pole_iir_filter_xx_0_1, '0'] - [blocks_multiply_const_xx_1, '0', virtual_sink_0, '0'] - [blocks_multiply_const_xx_1_0, '0', virtual_sink_0_0, '0'] - [blocks_multiply_const_xx_2, '0', blocks_sub_xx_1_0, '1'] - [blocks_nlog10_ff_0, '0', virtual_sink_1, '0'] - [blocks_nlog10_ff_0_0, '0', virtual_sink_1_0, '0'] - [blocks_patterned_interleaver_0, '0', formatter, '0'] - [blocks_stream_to_vector_0, '0', fft_vxx_0, '0'] - [blocks_stream_to_vector_0_0, '0', fft_vxx_0_0, '0'] - [blocks_sub_xx_0, '0', blocks_multiply_const_xx_0_0, '0'] - [blocks_sub_xx_1, '0', blocks_sub_xx_1_0, '0'] - [blocks_sub_xx_1, '0', single_pole_iir_filter_xx_0_1_0, '0'] - [blocks_sub_xx_1_0, '0', blocks_keep_one_in_n_0_1, '0'] - [fft_vxx_0, '0', blocks_complex_to_mag_squared_1, '0'] - [fft_vxx_0_0, '0', blocks_complex_to_mag_squared_1_0, '0'] - [flipper, '0', qtgui_vector_sink_f_1, '0'] - [flipper, '0', vectorlogger, '0'] - [flipper_0, '0', qtgui_vector_sink_f_1, '1'] - [flipper_0, '0', vectorlogger_0, '0'] - [single_pole_iir_filter_xx_0, '0', blocks_add_xx_0, '0'] - [single_pole_iir_filter_xx_0, '0', blocks_sub_xx_1, '0'] - [single_pole_iir_filter_xx_0, '0', virtual_sink_3, '0'] - [single_pole_iir_filter_xx_0_0, '0', blocks_sub_xx_0, '0'] - [single_pole_iir_filter_xx_0_0_0, '0', blocks_sub_xx_0, '1'] - [single_pole_iir_filter_xx_0_1, '0', blocks_add_xx_0, '1'] - [single_pole_iir_filter_xx_0_1, '0', blocks_sub_xx_1, '1'] - [single_pole_iir_filter_xx_0_1, '0', virtual_sink_3_0, '0'] - [single_pole_iir_filter_xx_0_1_0, '0', blocks_multiply_const_xx_2, '0'] - [single_pole_iir_filter_xx_1, '0', blocks_keep_one_in_n_1, '0'] - [single_pole_iir_filter_xx_1_0, '0', blocks_keep_one_in_n_1_0, '0'] - [stripchart, '0', qtgui_vector_sink_f_0, '0'] - [stripchart_0, '0', qtgui_vector_sink_f_0_0, '0'] - [stripchart_0_0, '0', qtgui_vector_sink_f_0_0, '1'] - [stripchart_1, '0', qtgui_vector_sink_f_0, '1'] - [stripchart_1_0, '0', qtgui_vector_sink_f_0, '2'] - [stripchart_1_0_0, '0', qtgui_vector_sink_f_0, '3'] - [uhd_usrp_source_0, '0', blocks_add_const_vxx_1, '0'] - [uhd_usrp_source_0, '1', blocks_add_const_vxx_1_0, '0'] - [virtual_source_0, '0', blocks_stream_to_vector_0, '0'] - [virtual_source_0_0, '0', blocks_complex_to_mag_squared_0, '0'] - [virtual_source_0_0_0, '0', blocks_multiply_conjugate_cc_1, '0'] - [virtual_source_0_0_0_0, '0', blocks_multiply_conjugate_cc_1, '1'] - [virtual_source_0_0_1, '0', blocks_complex_to_mag_squared_0_0, '0'] - [virtual_source_0_1, '0', blocks_stream_to_vector_0_0, '0'] - [virtual_source_1, '0', flipper, '0'] - [virtual_source_1_0, '0', flipper_0, '0'] - [virtual_source_2, '0', blocks_patterned_interleaver_0, '0'] - [virtual_source_2, '0', stripchart, '0'] - [virtual_source_2_0, '0', blocks_patterned_interleaver_0, '3'] - [virtual_source_2_0, '0', stripchart_1, '0'] - [virtual_source_3, '0', blocks_complex_to_float_0, '0'] - [virtual_source_5, '0', blocks_keep_one_in_n_0_2, '0'] - [virtual_source_5_0, '0', blocks_keep_one_in_n_0_2_0, '0'] metadata: file_format: 1 grc_version: 3.10.9.2