forked from qoherent/modrec-workflow
added changes to datagen
This commit is contained in:
parent
ec97c78535
commit
9326505fca
|
@ -2,6 +2,7 @@ from utils.data import Recording
|
|||
import numpy as np
|
||||
from utils.signal import block_generator
|
||||
import argparse
|
||||
import os
|
||||
|
||||
mods = {
|
||||
"bpsk": {"num_bits_per_symbol": 1, "constellation_type": "psk"},
|
||||
|
@ -61,9 +62,11 @@ def generate_modulated_signals(output_dir):
|
|||
|
||||
# view if you want
|
||||
# output_recording.view()
|
||||
|
||||
|
||||
fname = f"{modulation}_snr{int(snr)}_{i}.npy"
|
||||
full_path = os.path.join(output_dir, fname)
|
||||
# save to file
|
||||
output_recording.to_npy() # optionally add path and filename parameters
|
||||
output_recording.to_npy(path = full_path) # optionally add path and filename parameters
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue
Block a user