diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-07 12:43:25 +0200 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-07 12:43:25 +0200 |
commit | 863391aaae8e7b08767ddd9abc7c7c69354ea14c (patch) | |
tree | f3af5bcfd85f4ffcacf8f0083a675eb8799db5f8 /controller/fw/tools/hum_generator.py | |
parent | 5088ff3ae98f7d48743d59d1931f95fcbd0cf987 (diff) | |
download | master-thesis-863391aaae8e7b08767ddd9abc7c7c69354ea14c.tar.gz master-thesis-863391aaae8e7b08767ddd9abc7c7c69354ea14c.tar.bz2 master-thesis-863391aaae8e7b08767ddd9abc7c7c69354ea14c.zip |
fw: some plumbing
Diffstat (limited to 'controller/fw/tools/hum_generator.py')
-rwxr-xr-x | controller/fw/tools/hum_generator.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/controller/fw/tools/hum_generator.py b/controller/fw/tools/hum_generator.py index a139491..fbcabac 100755 --- a/controller/fw/tools/hum_generator.py +++ b/controller/fw/tools/hum_generator.py @@ -18,7 +18,6 @@ def generate_noisy_signal( test_signal_amplitude=20e-3, noise_level=10e-3, noise_spec='synth://grid_freq_psd_spl_108pt.json', - f_nom=50.0, seed=0): #test_data = np.random.RandomState(seed=0).randint(0, 2 * (2**test_nbits), test_duration) @@ -31,7 +30,7 @@ def generate_noisy_signal( noise_gen, noise_params = load_noise_gen(noise_spec) noise = noise_gen(seed, len(signal), **noise_params) - return np.absolute(noise + f_nom + signal*test_signal_amplitude) + return np.absolute(noise + signal*test_signal_amplitude) def write_raw_frequencies_bin(outfile, **kwargs): with open(outfile, 'wb') as f: @@ -84,7 +83,6 @@ def hum_cmd(args): test_signal_amplitude = args.signal_level/1e3, noise_level = args.noise_level/1e3, noise_spec=args.noise_spec, - f_nom = args.nominal_frequency, seed = args.random_seed) @@ -102,7 +100,6 @@ if __name__ == '__main__': hum_parser.add_argument('-n', '--noise-level', type=float, default=1.0, help='Scale synthetic noise level') hum_parser.add_argument('-s', '--signal-level', type=float, default=20.0, help='Synthetic noise level in mHz') hum_parser.add_argument('-d', '--decimation', type=int, default=10, help='DSSS modulation decimation in frequency measurement cycles') - hum_parser.add_argument('-o', '--nominal-frequency', type=float, default=50.0, help='Nominal mains frequency') hum_parser.add_argument('-r', '--random-seed', type=int, default=0) hum_parser.add_argument('--noise-spec', type=str, default='synth://grid_freq_psd_spl_108pt.json') hum_parser.add_argument('out_flac', metavar='out.flac', help='FLAC output file') |