Skip to content
Snippets Groups Projects
Commit a291a09b authored by xiyehu2's avatar xiyehu2
Browse files

minor changes

parent 9b6fb850
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import os
cf = MEGA(105) # center frequency
df = MEGA(0.5) # delta frequency
n = 15 # number of tones to generate in either direction of cf, total number of tweezer is 2*n+1
n = 5 # number of tones to generate in either direction of cf, total number of tweezer is 2*n+1
nt = 2*n+1 # total number of tweezers
# sampling_rate and sample_len must follow some relationship explained in the wiki page.
sampling_rate = int(614.4e6) # sampling rate
......@@ -30,22 +30,23 @@ twzr.amplitude = amps
# table generations
tgt = np.zeros(nt)
tgt[:n] = 1
tgt[int(nt/4)+1:int(3*nt/4)] = 1
t_idx = np.nonzero(tgt)[0]
print(tgt)
# savepath = 'table/table-half_31_120722'
# create_path_table_reduced_gpu(twzr, t_idx, max_dist=n, save_path=savepath)
create_path_table_reduced_gpu(twzr, t_idx, dist_offset=np.inf, partition=True)
# moving waveform testings
data = np.load("table/table-half_31_120722.npz", allow_pickle=True)
table = data['table'].item()
# data = np.load("table/table-half_31_120722.npz", allow_pickle=True)
# table = data['table'].item()
# twzr = data['wfm'].item()
static_sig = data['static_sig']
# static_sig = data['static_sig']
# target = data['target']
# t_idx = np.nonzero(target)[0]
f_idx = np.array([5,8,20])
create_moving_array_reduced(table, static_sig, f_idx, t_idx)
np.savez('data/test.npz', signal=static_sig, wfm=twzr)
# f_idx = np.array([5,8,20])
# create_moving_array_reduced(table, static_sig, f_idx, t_idx)
# np.savez('data/test.npz', signal=static_sig, wfm=twzr)
# data = np.load('data/table_5.npz', allow_pickle=True)
# table = data['table']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment