diff --git a/apps/iridium-extractor b/apps/iridium-extractor index 95ae83c..e4a0e2b 100755 --- a/apps/iridium-extractor +++ b/apps/iridium-extractor @@ -3,6 +3,7 @@ import time import getopt import sys +import re import threading import os.path import argparse @@ -291,6 +292,13 @@ if __name__ == "__main__": else: args.file_info = '' + # grab things from filename as fallback + if sample_rate is None and (g := re.search(r"-s(\d+(\.\d+)?(e[+-]\d+)?)-", filename)): + sample_rate = int(float(g.group(1))) + + if center is None and (g := re.search(r"-f(\d+(\.\d+)?(e[+-]\d+)?)-", filename)): + center = int(float(g.group(1))) + if sample_rate == None: print("Sample rate missing!", file=sys.stderr) exit(1)