Multiple sources within one simulation

107 views
Skip to first unread message

James Whittaker

unread,
Nov 25, 2021, 9:44:30 AM11/25/21
to gprMax-users
Hi All,

I'm looking within one simulation run activate multiple sources. I tried to use the following as a quick test but this didn't work.

print('#waveform: gaussiandot 1 0.9e9 my_ricker')
print('#waveform: gaussiandot 1 0.9e9 my_ricker2')



#Duel source following the rotation
x1=0.05*np.cos(theta)+pivotx
y1=0.05*np.sin(theta)+pivoty
z1=0
txt='my_ricker'
print('#hertzian_dipole: z {} {} {} {}'.format(x1,y1,z1,txt))

#Duel source following the rotation
x1=0.05*np.cos(theta)+pivotx+0.4
y1=0.05*np.sin(theta)+pivoty
z1=0
txt='my_ricker2'
print('#hertzian_dipole: z {} {} {} {} {}'.format(x1,y1,z1,txt))

I got a error of IndexError: Replacement index 4 out of range for positional args tuple

What am I doing wrong here? I'm looking to project a series of sources with a set time delay as part of a re-working of the RTM method.

Thanks
James

Craig Warren

unread,
Dec 8, 2021, 3:15:50 PM12/8/21
to gprMax-users
James,

Looks like an error with your print function - print('#hertzian_dipole: z {} {} {} {} {}'.format(x1,y1,z1,txt)) 

You have one too many sets of brackets {}.

Kind regards,
Craig

Reply all
Reply to author
Forward
0 new messages