-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
First of all, congratulations on your work. It is really cool stuff!
I would like to use your code to simulate the interaction of waves generated by two distinct sources (different frequency).
I believe this would be best function for such:
def broadcast_func_phased_antenna_focus2(t):
broadcast_el = np.zeros((sz_x, sz_y), float)
broadcast_el_mask = np.zeros((sz_x, sz_y), int)
c_const = 6
c = np.ones((sz_x, sz_y), float) * c_const
my_lambda = c_const * (1 / 0.008) * 0.01 / 0.1
broadcast_el[100:105, 0:1024] = 0
broadcast_el_mask[100:105, 0:1024] = 1
n = 2
if (t<1000):
for a in range(0, n):
phase=-2 * m.pi * m.sqrt(m.pow(400,2)-m.pow(my_lambda/2*(a-n/2),2))/my_lambda
broadcast_el_mask[105:115, int(1024/2-5+my_lambda/2*(a-n/2)):int(1024/2+5+my_lambda/2*(a-n/2))] = 1
broadcast_el[105:115, int(1024/2-5+my_lambda/2*(a-n/2)):int(1024/2+5+my_lambda/2*(a-n/2))] = m.sin(2 * m.pi * (t) * 0.008 + phase)
return broadcast_el, broadcast_el_mask, c
I would like to simulate two sources, wherein one source would have a frequency of 1Hz and the other 10Hz. How could I get this simulation to work? My interpretation is that the constant 0.008 in the code above corresponds to the frequency. What are the other terms in the 'my_lambda' equation?
Thank you in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels