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 ...@@ -6,7 +6,7 @@ import os
cf = MEGA(105) # center frequency cf = MEGA(105) # center frequency
df = MEGA(0.5) # delta 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 nt = 2*n+1 # total number of tweezers
# sampling_rate and sample_len must follow some relationship explained in the wiki page. # sampling_rate and sample_len must follow some relationship explained in the wiki page.
sampling_rate = int(614.4e6) # sampling rate sampling_rate = int(614.4e6) # sampling rate
...@@ -30,22 +30,23 @@ twzr.amplitude = amps ...@@ -30,22 +30,23 @@ twzr.amplitude = amps
# table generations # table generations
tgt = np.zeros(nt) tgt = np.zeros(nt)
tgt[:n] = 1 tgt[int(nt/4)+1:int(3*nt/4)] = 1
t_idx = np.nonzero(tgt)[0] t_idx = np.nonzero(tgt)[0]
print(tgt)
# savepath = 'table/table-half_31_120722' # 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 # moving waveform testings
data = np.load("table/table-half_31_120722.npz", allow_pickle=True) # data = np.load("table/table-half_31_120722.npz", allow_pickle=True)
table = data['table'].item() # table = data['table'].item()
# twzr = data['wfm'].item() # twzr = data['wfm'].item()
static_sig = data['static_sig'] # static_sig = data['static_sig']
# target = data['target'] # target = data['target']
# t_idx = np.nonzero(target)[0] # t_idx = np.nonzero(target)[0]
f_idx = np.array([5,8,20]) # f_idx = np.array([5,8,20])
create_moving_array_reduced(table, static_sig, f_idx, t_idx) # create_moving_array_reduced(table, static_sig, f_idx, t_idx)
np.savez('data/test.npz', signal=static_sig, wfm=twzr) # np.savez('data/test.npz', signal=static_sig, wfm=twzr)
# data = np.load('data/table_5.npz', allow_pickle=True) # data = np.load('data/table_5.npz', allow_pickle=True)
# table = data['table'] # 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