code: def determine_chan_detect_threshold(kal_out):
      
      channel_detect_threshold = ""
      while channel_detect_threshold == "":
          for line in kal_out.splitlines():
              if "channel detect threshold: " in line:
                  channel_detect_threshold = str(line.split()[-1])
          if channel_detect_threshold == "":
              print("Unable to parse sample rate")
              channel_detect_threshold = None
      return channel_detect_threshold
docs: Return channel detect threshold from kal output.