-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbxChannelMod3.py
executable file
·40 lines (35 loc) · 1.08 KB
/
bbxChannelMod3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'''
Sometimes it is usful to zero out loud frequencies in LoFASM files. This is a python3
tool to do so.
'''
#!/usr/bin/env python
print("Hello")
from lofasm.bbx import bbx
from lofasm import parse_data as pdat
import numpy as np
import os, sys
import argparse
'''
Intent: Append frequency to be removed to input file name. Ex: bbxfile-rm30.bbx
Preconditions: String holding bbx file name. Integer as a string of frequency to be removed.
Postcondition: String with a dash rm with changed frequency.
'''
def newFileName():
pass
'''
Intent:
'''
def posInt(val):
if isinstance(var, int) and var >= 0:
return val
elif isinstance(var, int) and var < 0:
print("Input frequency must be greater than 0... Correcting")
val *= -1
return val
else:
sys.exit("Error: Input frequency is not an integer.")
# Options
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--path", help="Path to innput bbx file")
parser.add_argument("-f", "--freq", help="Input the frequency to be modified in MHz", type=posInt)
parse_dict = vars(parser.parse_args())