<commit_before><commit_msg>Add calculator for valid symbol lengths.<commit_after>// Calculates:
// Valid symbol lengths.
// Sample rate to achieve the symbol length.
// Number of channels covered.
// Excess bandwidth outside of the captured channels.

package main

import (
	"fmt"
	"math"
)

const (
	DataRate     = 32768
	ChannelWidth = 196568

	// Valid sample rates fall in one of two bands:
	// http://cgit.osmocom.org/rtl-sdr/tree/src/librtlsdr.c#n1069
	LowerMin = 225e3
	LowerMax = 300e3
	UpperMin = 900e3
	UpperMax = 3.2e6
)

func main() {
	for symbolLength := 1; symbolLength < int(math.Ceil(UpperMax/DataRate)); symbolLength++ {
		sampleRate := symbolLength * DataRate
		if (LowerMin < sampleRate && sampleRate <= LowerMax) || (UpperMin < sampleRate && sampleRate <= UpperMax) {
			fmt.Printf("SymbolLength:%d SampleRate:%d Channels:%d ExcessBandwidth:%d\n", symbolLength, sampleRate, sampleRate/ChannelWidth, sampleRate%ChannelWidth)
		}
	}
}

{'fraction_non_alphanumeric': 0.11949685534591195, 'fraction_numerical': 0.03249475890985325, 'mean_word_length': 4.218579234972678, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2074022', 'n_tokens_mistral': 342, 'n_tokens_neox': 310, 'n_words': 84}